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:
parent
c3c889523f
commit
0976d52bbd
261 changed files with 3224 additions and 2923 deletions
|
@ -1,4 +1,4 @@
|
|||
From a520009d4480e4b49846a57681d065a651c45419 Mon Sep 17 00:00:00 2001
|
||||
From d83973b95e1f261cb7d70b06771709d73a73624f Mon Sep 17 00:00:00 2001
|
||||
From: AlphaBlend <whizkid3000@hotmail.com>
|
||||
Date: Sun, 16 Oct 2016 23:19:34 -0700
|
||||
Subject: [PATCH] Add EntityZapEvent
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add EntityZapEvent
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..c8f0bb05
|
||||
index 000000000..3b725a489
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
|
||||
@@ -0,0 +1,63 @@
|
||||
@@ -0,0 +1,65 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.apache.commons.lang.Validate;
|
||||
|
@ -20,8 +20,8 @@ index 00000000..c8f0bb05
|
|||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.bukkit.event.entity.EntityTransformEvent;
|
||||
+
|
||||
+import javax.annotation.Nonnull;
|
||||
+import java.util.Collections;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when lightning strikes an entity
|
||||
|
@ -29,9 +29,9 @@ index 00000000..c8f0bb05
|
|||
+public class EntityZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
+ private final LightningStrike bolt;
|
||||
+ @NotNull private final LightningStrike bolt;
|
||||
+
|
||||
+ public EntityZapEvent(final Entity entity, @Nonnull final LightningStrike bolt, @Nonnull final Entity replacementEntity) {
|
||||
+ public EntityZapEvent(@NotNull final Entity entity, @NotNull final LightningStrike bolt, @NotNull final Entity replacementEntity) {
|
||||
+ super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
|
||||
+ Validate.notNull(bolt);
|
||||
+ Validate.notNull(replacementEntity);
|
||||
|
@ -50,7 +50,7 @@ index 00000000..c8f0bb05
|
|||
+ * Gets the lightning bolt that is striking the entity.
|
||||
+ * @return The lightning bolt responsible for this event
|
||||
+ */
|
||||
+ @Nonnull
|
||||
+ @NotNull
|
||||
+ public LightningStrike getBolt() {
|
||||
+ return bolt;
|
||||
+ }
|
||||
|
@ -59,22 +59,24 @@ index 00000000..c8f0bb05
|
|||
+ * Gets the entity that will replace the struck entity.
|
||||
+ * @return The entity that will replace the struck entity
|
||||
+ */
|
||||
+ @Nonnull
|
||||
+ @NotNull
|
||||
+ public Entity getReplacementEntity() {
|
||||
+ return getTransformedEntity();
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
|
||||
index c1d4b30a..de8cad81 100644
|
||||
index 0074423fd..0eaa8df94 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
@ -85,7 +87,7 @@ index c1d4b30a..de8cad81 100644
|
|||
import org.bukkit.entity.LightningStrike;
|
||||
import org.bukkit.entity.Pig;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
@@ -11,14 +12,14 @@ import org.bukkit.event.HandlerList;
|
||||
@@ -12,14 +13,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Stores data for pigs being zapped
|
||||
*/
|
||||
|
@ -97,22 +99,22 @@ index c1d4b30a..de8cad81 100644
|
|||
private final PigZombie pigzombie;
|
||||
private final LightningStrike bolt;
|
||||
|
||||
public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) {
|
||||
public PigZapEvent(@NotNull final Pig pig, @NotNull final LightningStrike bolt, @NotNull final PigZombie pigzombie) {
|
||||
- super(pig, Collections.singletonList((Entity) pigzombie), TransformReason.LIGHTNING);
|
||||
+ super(pig, bolt, pigzombie);
|
||||
this.bolt = bolt;
|
||||
this.pigzombie = pigzombie;
|
||||
}
|
||||
@@ -57,6 +58,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
@@ -61,6 +62,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
return pigzombie;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ /*
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
@@ -65,4 +68,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
@@ -71,4 +74,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
@ -120,5 +122,5 @@ index c1d4b30a..de8cad81 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue