Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c7c11188 SPIGOT-2620: Add Player#sendBlockChanges() f63d2b44 Improve annotation test on parameters 3372e7b4 SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes a1e8a9ab PR-793: Ignore .checkstyle file generated by Eclipse IDE CraftBukkit Changes: c2c39089e SPIGOT-2620: Add Player#sendBlockChanges() 8209158db PR-1113: Ignore .checkstyle file generated by Eclipse IDE Spigot Changes: 4aa5ead2 Rebuild patches
This commit is contained in:
parent
f528f53e81
commit
3996e6ef29
73 changed files with 247 additions and 290 deletions
|
@ -1334,7 +1334,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
|
|||
return warning == null || warning.value();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 7e0c6c57976a00f989fe4e5dce83cd986b460e72..1d3bb553c944f5920e81e295f8cd5b7194d37aac 100644
|
||||
index 3a5251cb3b45f50d1ea4ab2c9b430e990cdfc8d5..425cad3b6c365560f6614767d763ad61a92e6722 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -43,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -1839,10 +1839,10 @@ index 259d878ddd4e4e2b289c0de0325ca8fd6203c484..a829779ac56a271cad463806984991b4
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf8af6d694 100644
|
||||
index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e606194b05b30 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -37,7 +37,28 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -39,7 +39,28 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a player, connected or not
|
||||
*/
|
||||
|
@ -1872,7 +1872,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
@@ -54,7 +75,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -56,7 +77,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @return the friendly name
|
||||
|
@ -1882,7 +1882,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
@NotNull
|
||||
public String getDisplayName();
|
||||
|
||||
@@ -66,15 +89,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -68,15 +91,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @param name The new display name.
|
||||
|
@ -1933,7 +1933,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public String getPlayerListName();
|
||||
|
||||
/**
|
||||
@@ -83,14 +141,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -85,14 +143,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* If the value is null, the name will be identical to {@link #getName()}.
|
||||
*
|
||||
* @param name new player list name
|
||||
|
@ -1952,7 +1952,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
@Nullable
|
||||
public String getPlayerListHeader();
|
||||
|
||||
@@ -98,7 +160,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -100,7 +162,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Gets the currently displayed player list footer for this player.
|
||||
*
|
||||
* @return player list header or null
|
||||
|
@ -1962,7 +1962,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
@Nullable
|
||||
public String getPlayerListFooter();
|
||||
|
||||
@@ -106,14 +170,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -108,14 +172,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Sets the currently displayed player list header for this player.
|
||||
*
|
||||
* @param header player list header, null for empty
|
||||
|
@ -1981,7 +1981,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void setPlayerListFooter(@Nullable String footer);
|
||||
|
||||
/**
|
||||
@@ -122,7 +190,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -124,7 +192,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param header player list header, null for empty
|
||||
* @param footer player list footer, null for empty
|
||||
|
@ -1991,7 +1991,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
|
||||
|
||||
/**
|
||||
@@ -160,9 +230,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -162,9 +232,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Kicks player with custom kick message.
|
||||
*
|
||||
* @param message kick message
|
||||
|
@ -2017,7 +2017,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
/**
|
||||
* Says a message (or runs a command).
|
||||
*
|
||||
@@ -514,6 +600,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -538,6 +624,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
|
||||
|
||||
|
@ -2108,7 +2108,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
/**
|
||||
* Send a sign change. This fakes a sign change packet for a user at
|
||||
* a certain location. This will not actually change the world in any way.
|
||||
@@ -528,7 +698,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -552,7 +722,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param lines the new text on the sign or null to clear it
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -2118,7 +2118,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -547,7 +719,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -571,7 +743,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if dyeColor is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -2128,7 +2128,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -567,7 +741,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -591,7 +765,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if dyeColor is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -2138,7 +2138,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -1042,6 +1218,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1023,6 +1199,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
|
@ -2146,7 +2146,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1055,8 +1232,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1079,8 +1256,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -2154,6 +2154,25 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt);
|
||||
|
||||
+ // Paper start
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1116,6 +1295,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param hash The sha1 hash sum of the resource pack file which is used
|
||||
* to apply a cached version of the pack directly without downloading
|
||||
* if it is available. Hast to be 20 bytes long!
|
||||
+ * @param prompt The optional custom prompt message to be shown to client.
|
||||
+ * @throws IllegalArgumentException Thrown if the URL is null.
|
||||
+ * @throws IllegalArgumentException Thrown if the URL is too long. The
|
||||
+ * length restriction is an implementation specific arbitrary value.
|
||||
+ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
+ * long.
|
||||
+ */
|
||||
+ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) {
|
||||
+ this.setResourcePack(url, hash, prompt, false);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ /**
|
||||
+ * Request that the player's client download and switch resource packs.
|
||||
+ * <p>
|
||||
|
@ -2183,36 +2202,17 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
+ * pack correctly.
|
||||
+ * </ul>
|
||||
+ *
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
|
||||
+ * @param url The URL from which the client will download the resource
|
||||
+ * pack. The string must contain only US-ASCII characters and should
|
||||
+ * be encoded as per RFC 1738.
|
||||
+ * @param hash The sha1 hash sum of the resource pack file which is used
|
||||
+ * to apply a cached version of the pack directly without downloading
|
||||
+ * if it is available. Hast to be 20 bytes long!
|
||||
+ * @param prompt The optional custom prompt message to be shown to client.
|
||||
+ * @throws IllegalArgumentException Thrown if the URL is null.
|
||||
+ * @throws IllegalArgumentException Thrown if the URL is too long. The
|
||||
+ * length restriction is an implementation specific arbitrary value.
|
||||
+ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
+ * long.
|
||||
+ */
|
||||
+ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) {
|
||||
+ this.setResourcePack(url, hash, prompt, false);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1131,6 +1357,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1146,8 +1373,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param force If true, the client will be disconnected from the server
|
||||
* when it declines to use the resource pack.
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
@@ -1170,8 +1397,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -2270,7 +2270,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
/**
|
||||
* Gets the Scoreboard displayed to this player
|
||||
*
|
||||
@@ -1263,7 +1539,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1287,7 +1563,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param title Title text
|
||||
* @param subtitle Subtitle text
|
||||
|
@ -2279,7 +2279,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
*/
|
||||
@Deprecated
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle);
|
||||
@@ -1282,7 +1558,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1306,7 +1582,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
|
||||
* @param stay time in ticks for titles to stay. Defaults to 70.
|
||||
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
|
||||
|
@ -2289,7 +2289,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -1509,6 +1787,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1533,6 +1811,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public int getClientViewDistance();
|
||||
|
||||
|
@ -2304,7 +2304,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
/**
|
||||
* Gets the player's estimated ping in milliseconds.
|
||||
*
|
||||
@@ -1534,8 +1820,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1558,8 +1844,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* they wish.
|
||||
*
|
||||
* @return the player's locale
|
||||
|
@ -2315,7 +2315,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public String getLocale();
|
||||
|
||||
/**
|
||||
@@ -1577,6 +1865,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1601,6 +1889,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
|
@ -2330,7 +2330,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
// Spigot start
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
@@ -1631,11 +1927,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1655,11 +1951,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
|
@ -2344,7 +2344,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
@Override
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1646,7 +1944,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1670,7 +1968,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
|
@ -2354,7 +2354,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1656,7 +1956,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1680,7 +1980,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
|
@ -2364,7 +2364,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1667,7 +1969,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1691,7 +1993,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param component the components to send
|
||||
|
@ -2374,7 +2374,7 @@ index c652660f8e053b066d0d40a89ab6f1b86655f71b..2c5fc4f62b2c16de1f4f94f52aae5baf
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1678,7 +1982,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1702,7 +2006,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param components the components to send
|
||||
|
@ -4577,7 +4577,7 @@ index 0db7fe1b9fe5621ceed3f4f046691e359f5949dd..47b10df619ad2520b9bb673e2220f363
|
|||
|
||||
/**
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index c6a8a37a933cfc5a5885602a8a70fdda8fb6aa10..93498307004b68b934fbfa1aeb3aaf0e97cbdac7 100644
|
||||
index 1a71bb8861150c1add6446aa2fad0f7035dd6873..8275a5d7e1de39a5171e254f449a42c6defd3445 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -26,6 +26,12 @@ import org.objectweb.asm.tree.ParameterNode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue