[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002
2024-02-01 10:15:57 +01:00
parent d676979ea0
commit f7e469eb2e
187 changed files with 2415 additions and 2258 deletions

View File

@@ -17,6 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.block.BlockEvent;
+import org.bukkit.event.inventory.InventoryMoveItemEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+/**
@@ -30,6 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private final ItemStack item;
+ private boolean willRaiseLevel;
+
+ @ApiStatus.Internal
+ public CompostItemEvent(@NotNull Block composter, @NotNull ItemStack item, boolean willRaiseLevel) {
+ super(composter);
+ this.item = item;
@@ -49,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ /**
+ * Gets whether the composter will rise a level.
+ *
+ * @return true if successful
+ * @return {@code true} if successful
+ */
+ public boolean willRaiseLevel() {
+ return this.willRaiseLevel;
@@ -58,7 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ /**
+ * Sets whether the composter will rise a level.
+ *
+ * @param willRaiseLevel true if the composter should rise a level
+ * @param willRaiseLevel {@code true} if the composter should rise a level
+ */
+ public void setWillRaiseLevel(boolean willRaiseLevel) {
+ this.willRaiseLevel = willRaiseLevel;
@@ -88,6 +90,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.entity.Entity;
+import org.bukkit.event.Cancellable;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+/**
@@ -95,12 +98,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+public class EntityCompostItemEvent extends CompostItemEvent implements Cancellable {
+
+ private final Entity who;
+ private final Entity entity;
+ private boolean cancelled;
+
+ public EntityCompostItemEvent(@NotNull Entity who, @NotNull Block composter, @NotNull ItemStack item, boolean willRaiseLevel) {
+ @ApiStatus.Internal
+ public EntityCompostItemEvent(@NotNull Entity entity, @NotNull Block composter, @NotNull ItemStack item, boolean willRaiseLevel) {
+ super(composter, item, willRaiseLevel);
+ this.who = who;
+ this.entity = entity;
+ }
+
+ /**
@@ -110,7 +114,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public Entity getEntity() {
+ return this.who;
+ return this.entity;
+ }
+
+ @Override