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 c3c889523f
commit 0976d52bbd
261 changed files with 3224 additions and 2923 deletions

View file

@ -1,4 +1,4 @@
From 18c2f27c07c4ae9d951ecf9a7685a0af1b6433fa Mon Sep 17 00:00:00 2001
From 53a81651f2f57c8d8b5a104b7d95a5c7287881f7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 2 Jan 2018 00:31:08 -0500
Subject: [PATCH] Fill Profile Property Events
@ -12,10 +12,10 @@ This is useful for implementing a ProfileCache for Player Skulls
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
new file mode 100644
index 00000000..182bd661
index 000000000..71f36e9ca
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
@@ -0,0 +1,72 @@
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
@ -46,16 +46,16 @@ index 00000000..182bd661
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import javax.annotation.Nonnull;
+import java.util.Set;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired once a profiles additional properties (such as textures) has been filled
+ */
+public class FillProfileEvent extends Event {
+ private final PlayerProfile profile;
+ @NotNull private final PlayerProfile profile;
+
+ public FillProfileEvent(@Nonnull PlayerProfile profile) {
+ public FillProfileEvent(@NotNull PlayerProfile profile) {
+ super(!org.bukkit.Bukkit.isPrimaryThread());
+ this.profile = profile;
+ }
@ -63,7 +63,7 @@ index 00000000..182bd661
+ /**
+ * @return The Profile that had properties filled
+ */
+ @Nonnull
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
@ -74,26 +74,29 @@ index 00000000..182bd661
+ * @see PlayerProfile#getProperties()
+ * @return The new properties on the profile.
+ */
+ @NotNull
+ public Set<ProfileProperty> getProperties() {
+ return profile.getProperties();
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
new file mode 100644
index 00000000..aba0c087
index 000000000..021bc8631
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
@@ -0,0 +1,74 @@
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
@ -124,8 +127,8 @@ index 00000000..aba0c087
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import javax.annotation.Nonnull;
+import java.util.Collection;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when the server is requesting to fill in properties of an incomplete profile, such as textures.
@ -133,9 +136,9 @@ index 00000000..aba0c087
+ * Allows plugins to pre populate cached properties and avoid a call to the Mojang API
+ */
+public class PreFillProfileEvent extends Event {
+ private final PlayerProfile profile;
+ @NotNull private final PlayerProfile profile;
+
+ public PreFillProfileEvent(PlayerProfile profile) {
+ public PreFillProfileEvent(@NotNull PlayerProfile profile) {
+ super(!org.bukkit.Bukkit.isPrimaryThread());
+ this.profile = profile;
+ }
@ -143,6 +146,7 @@ index 00000000..aba0c087
+ /**
+ * @return The profile that needs its properties filled
+ */
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
@ -154,20 +158,22 @@ index 00000000..aba0c087
+ * @see PlayerProfile#setProperties(Collection)
+ * @param properties The properties to set/append
+ */
+ public void setProperties(@Nonnull Collection<ProfileProperty> properties) {
+ public void setProperties(@NotNull Collection<ProfileProperty> properties) {
+ profile.setProperties(properties);
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
--
2.20.1
2.21.0