9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00

Add comment in EntityResurrectEvent

This commit is contained in:
violetc
2022-04-09 14:32:43 +08:00
parent cfa7dd3724
commit bf560e342b

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent
diff --git a/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java b/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java
index fa6b6c3b047edd1653f3c81027ec752821bcdb09..8e0cffef88ba3277062e177a867be3b732cfd7f9 100644
index fa6b6c3b047edd1653f3c81027ec752821bcdb09..4e2e345bafa812c37a46b86e20fb2ce9c8660425 100644
--- a/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java
@@ -13,11 +13,21 @@ import org.jetbrains.annotations.NotNull;
@@ -13,11 +13,36 @@ import org.jetbrains.annotations.NotNull;
public class EntityResurrectEvent extends EntityEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
@@ -17,16 +17,30 @@ index fa6b6c3b047edd1653f3c81027ec752821bcdb09..8e0cffef88ba3277062e177a867be3b7
private boolean cancelled;
+ private boolean shrink;
- public EntityResurrectEvent(@NotNull LivingEntity what) {
+ public EntityResurrectEvent(@NotNull LivingEntity what, boolean shrink) {
public EntityResurrectEvent(@NotNull LivingEntity what) {
super(what);
+ this.shrink = true;
+ }
+
+ public EntityResurrectEvent(@NotNull LivingEntity what, boolean shrink) {
+ super(what);
+ this.shrink = shrink;
+ }
+
+ /**
+ * Get is shrink item
+ *
+ * @return is shrink item
+ */
+ public boolean isShrink() {
+ return shrink;
+ }
+
+ /**
+ * Set is shrink item
+ *
+ * @param shrink is shrink item
+ */
+ public void setShrink(boolean shrink) {
+ this.shrink = shrink;
}