Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Please note that this build includes changes to meet upstreams requirements for nullability annotations. While we aim for a level of accuracy, these might not be 100% correct, if there are any issues, please speak to us on discord, or open an issue on the tracker to discuss. Bukkit Changes: 9a6a1de3 Remove nullability annotations from enum constructors 3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API CraftBukkit Changes: 8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep 8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals 39a287b7 Don't ignore newlines in PlayerListHeader/Footer Spigot Changes: cf694d87 Add nullability annotations
This commit is contained in:
@@ -12,7 +12,7 @@ This can replace many uses of BlockPhysicsEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/block/BlockDestroyEvent.java b/src/main/java/com/destroystokyo/paper/event/block/BlockDestroyEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..a6247718
|
||||
index 000000000..3aee12f1c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/block/BlockDestroyEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -23,6 +23,7 @@ index 00000000..a6247718
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Fired anytime the server intends to 'destroy' a block through some triggering reason.
|
||||
@@ -39,13 +40,13 @@ index 00000000..a6247718
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ private final BlockData newState;
|
||||
+ @NotNull private final BlockData newState;
|
||||
+ private final boolean willDrop;
|
||||
+ private boolean playEffect;
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ public BlockDestroyEvent(Block block, BlockData newState, boolean willDrop) {
|
||||
+ public BlockDestroyEvent(@NotNull Block block, @NotNull BlockData newState, boolean willDrop) {
|
||||
+ super(block);
|
||||
+ this.newState = newState;
|
||||
+ this.willDrop = willDrop;
|
||||
@@ -54,6 +55,7 @@ index 00000000..a6247718
|
||||
+ /**
|
||||
+ * @return The new state of this block (Air, or a Fluid type)
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public BlockData getNewState() {
|
||||
+ return newState;
|
||||
+ }
|
||||
@@ -96,10 +98,12 @@ index 00000000..a6247718
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user