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:
Shane Freeder
2019-03-20 00:28:15 +00:00
parent 2b722719b3
commit a7ba5db3de
260 changed files with 2328 additions and 2021 deletions

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 43239f84..fe8d3468 100644
index ffebffd8b..f5e3929aa 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -0,0 +0,0 @@ public final class NamespacedKey {
@@ -21,7 +21,7 @@ index 43239f84..fe8d3468 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 8a0f992f..d499e41b 100644
index 846b0619a..84abeb216 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -30,7 +30,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
@@ -38,7 +38,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
@@ -46,7 +46,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
@@ -54,7 +54,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
@@ -62,7 +62,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
@@ -70,7 +70,7 @@ index 8a0f992f..d499e41b 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended
@@ -78,7 +78,7 @@ index 8a0f992f..d499e41b 100644
* settings
+ * @param <T> Particle data type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended
@@ -86,10 +86,10 @@ index 8a0f992f..d499e41b 100644
* settings
+ * @param <T> Particle data type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
index 10757454..6d5410ea 100644
index 2f1956724..234aa9dd2 100644
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
@@ -0,0 +0,0 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
@@ -102,7 +102,7 @@ index 10757454..6d5410ea 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index 9a569d3a..8c5efd17 100644
index d258e734e..123d87954 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -0,0 +0,0 @@ public interface AreaEffectCloud extends Entity {
@@ -111,10 +111,10 @@ index 9a569d3a..8c5efd17 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> the particle data type // Paper
*/
<T> void setParticle(Particle particle, T data);
<T> void setParticle(@NotNull Particle particle, @Nullable T data);
diff --git a/src/main/java/org/bukkit/entity/Guardian.java b/src/main/java/org/bukkit/entity/Guardian.java
index 98af0563..ec6890ae 100644
index 98af0563c..ec6890ae6 100644
--- a/src/main/java/org/bukkit/entity/Guardian.java
+++ b/src/main/java/org/bukkit/entity/Guardian.java
@@ -0,0 +0,0 @@ public interface Guardian extends Monster {
@@ -127,7 +127,7 @@ index 98af0563..ec6890ae 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Horse.java b/src/main/java/org/bukkit/entity/Horse.java
index cfce8fa5..8660070b 100644
index 734f5ac7b..5efa4e606 100644
--- a/src/main/java/org/bukkit/entity/Horse.java
+++ b/src/main/java/org/bukkit/entity/Horse.java
@@ -0,0 +0,0 @@ public interface Horse extends AbstractHorse {
@@ -140,7 +140,7 @@ index cfce8fa5..8660070b 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d9965ddc..bf284f2c 100644
index 219556ed5..c21785d58 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -151,7 +151,7 @@ index d9965ddc..bf284f2c 100644
+ * @param alternateChar Alternate symbol such as '&amp;'
* @param message The message to send
*/
public void sendActionBar(char alternateChar, String message);
public void sendActionBar(char alternateChar, @NotNull String message);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
@@ -190,7 +190,7 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param count the number of particles
@@ -198,7 +198,7 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis
@@ -206,7 +206,7 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis
@@ -214,7 +214,7 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed)
@@ -222,7 +222,7 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed)
@@ -230,10 +230,10 @@ index d9965ddc..bf284f2c 100644
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 2a02ab85..e33d00b3 100644
index 2a0b01097..2ac30c0f6 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -0,0 +0,0 @@ public interface Skeleton extends Monster {
@@ -245,7 +245,7 @@ index 2a02ab85..e33d00b3 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index bdc6206a..48034198 100644
index 756f285eb..ee2e70c67 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -0,0 +0,0 @@ public interface Zombie extends Monster {
@@ -257,6 +257,7 @@ index bdc6206a..48034198 100644
* @deprecated must spawn {@link ZombieVillager}.
*/
@Deprecated
@@ -0,0 +0,0 @@ public interface Zombie extends Monster {
public void setVillager(boolean flag);
/**
@@ -266,7 +267,7 @@ index bdc6206a..48034198 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 6532c24f..ee0b1273 100644
index 8d4c70031..b493173e2 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -0,0 +0,0 @@ public class PlayerLoginEvent extends PlayerEvent {
@@ -275,7 +276,7 @@ index 6532c24f..ee0b1273 100644
* timing issues
+ * @param realAddress The unspoofed, actual address, that the player used to connect
*/
public PlayerLoginEvent(final Player player, final String hostname, final InetAddress address, final InetAddress realAddress) { // Spigot
public PlayerLoginEvent(@NotNull final Player player, @NotNull final String hostname, @NotNull final InetAddress address, final @NotNull InetAddress realAddress) { // Spigot
super(player);
@@ -0,0 +0,0 @@ public class PlayerLoginEvent extends PlayerEvent {
* timing issues
@@ -283,10 +284,10 @@ index 6532c24f..ee0b1273 100644
* @param message The message to be displayed if result denies login
+ * @param realAddress The unspoofed, actual address, that the player used to connect
*/
public PlayerLoginEvent(final Player player, String hostname, final InetAddress address, final Result result, final String message, final InetAddress realAddress) { // Spigot
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 762c43d6..ec2b8b8e 100644
index 07d2b4cfe..cbcbe8c8a 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -0,0 +0,0 @@ public interface ItemFactory {
@@ -304,7 +305,7 @@ index 762c43d6..ec2b8b8e 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/inventory/Merchant.java b/src/main/java/org/bukkit/inventory/Merchant.java
index c8e68570..45431b36 100644
index 668e91958..5ff1f93d1 100644
--- a/src/main/java/org/bukkit/inventory/Merchant.java
+++ b/src/main/java/org/bukkit/inventory/Merchant.java
@@ -0,0 +0,0 @@ public interface Merchant {
@@ -314,8 +315,8 @@ index c8e68570..45431b36 100644
- * @throws IndexOutOfBoundsException
+ * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
*/
@NotNull
MerchantRecipe getRecipe(int i) throws IndexOutOfBoundsException;
@@ -0,0 +0,0 @@ public interface Merchant {
*
* @param i the index
@@ -323,10 +324,10 @@ index c8e68570..45431b36 100644
- * @throws IndexOutOfBoundsException
+ * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
*/
void setRecipe(int i, MerchantRecipe recipe) throws IndexOutOfBoundsException;
void setRecipe(int i, @NotNull MerchantRecipe recipe) throws IndexOutOfBoundsException;
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java
index 1413b361..b4a8051c 100644
index 63b7c70ce..a57f70ec6 100644
--- a/src/main/java/org/bukkit/potion/Potion.java
+++ b/src/main/java/org/bukkit/potion/Potion.java
@@ -0,0 +0,0 @@ public class Potion {
@@ -338,7 +339,7 @@ index 1413b361..b4a8051c 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java
index 40f8d12b..33d19228 100644
index 9f913e1ee..254bd6f3e 100644
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
@@ -0,0 +0,0 @@ public interface PotionBrewer {
@@ -349,9 +350,9 @@ index 40f8d12b..33d19228 100644
+ * @param extended Whether the potion is extended
* @return The list of effects
*/
public Collection<PotionEffect> getEffects(PotionType type, boolean upgraded, boolean extended);
@NotNull
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 034421a7..f1a54c23 100644
index 9b0fcf2da..e83e4b4fd 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -0,0 +0,0 @@ public enum PotionType {
@@ -380,17 +381,4 @@ index 034421a7..f1a54c23 100644
* @deprecated Misleading
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index ab71f3c3..358ea386 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -0,0 +0,0 @@ public interface Team {
* names are handled by prefixes / suffixes.
*
* @return team color, defaults to {@link ChatColor#RESET}
- * @throws IllegalStateException
+ * @throws IllegalStateException if this team has been unregistered
*/
ChatColor getColor() throws IllegalStateException;
--