[ci skip] Cleanup events (#10202)
This commit is contained in:
parent
d676979ea0
commit
f7e469eb2e
187 changed files with 2415 additions and 2258 deletions
|
@ -19,6 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.inventory.EquipmentSlot;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.util.List;
|
||||
|
@ -32,15 +33,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * Examples include shearing a pumpkin to turn it into a carved pumpkin or shearing a beehive to get honeycomb.
|
||||
+ */
|
||||
+public class PlayerShearBlockEvent extends PlayerEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private final Block block;
|
||||
+ private final ItemStack item;
|
||||
+ private final EquipmentSlot hand;
|
||||
+ private final List<ItemStack> drops;
|
||||
+
|
||||
+ public PlayerShearBlockEvent(@NotNull Player who, @NotNull Block block, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops) {
|
||||
+ super(who);
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerShearBlockEvent(@NotNull Player player, @NotNull Block block, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops) {
|
||||
+ super(player);
|
||||
+ this.block = block;
|
||||
+ this.item = item;
|
||||
+ this.hand = hand;
|
||||
|
@ -54,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public Block getBlock() {
|
||||
+ return block;
|
||||
+ return this.block;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -64,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public ItemStack getItem() {
|
||||
+ return item;
|
||||
+ return this.item;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -74,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public EquipmentSlot getHand() {
|
||||
+ return hand;
|
||||
+ return this.hand;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -84,7 +89,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public List<ItemStack> getDrops() {
|
||||
+ return drops;
|
||||
+ return this.drops;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -94,7 +99,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -110,11 +115,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue