Updated Upstream (Bukkit/CraftBukkit) (#10242)
* Updated Upstream (Bukkit/CraftBukkit) 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: a6a9d2a4 Remove some old ApiStatus.Experimental annotations be72314c SPIGOT-7300, PR-829: Add new DamageSource API providing enhanced information about entity damage b252cf05 SPIGOT-7576, PR-970: Add methods in MushroomCow to change stew effects b1c689bd PR-902: Add Server#isLoggingIPs to get log-ips configuration 08f86d1c PR-971: Add Player methods for client-side potion effects 2e3024a9 PR-963: Add API for in-world structures a23292a7 SPIGOT-7530, PR-948: Improve Resource Pack API with new 1.20.3 functionality 1851857b SPIGOT-3071, PR-969: Add entity spawn method with spawn reason cde4c52a SPIGOT-5553, PR-964: Add EntityKnockbackEvent CraftBukkit Changes: 38fd4bd50 Fix accidentally renamed internal damage method 80f0ce4be SPIGOT-7300, PR-1180: Add new DamageSource API providing enhanced information about entity damage 7e43f3b16 SPIGOT-7581: Fix typo in BlockMushroom ea14b7d90 SPIGOT-7576, PR-1347: Add methods in MushroomCow to change stew effects 4c687f243 PR-1259: Add Server#isLoggingIPs to get log-ips configuration 22a541a29 Improve support for per-world game rules cb7dccce2 PR-1348: Add Player methods for client-side potion effects b8d6109f0 PR-1335: Add API for in-world structures 4398a1b5b SPIGOT-7577: Make CraftWindCharge#explode discard the entity e74107678 Fix Crafter maximum stack size 0bb0f4f6a SPIGOT-7530, PR-1314: Improve Resource Pack API with new 1.20.3 functionality 4949f556d SPIGOT-3071, PR-1345: Add entity spawn method with spawn reason 20ac73ca2 PR-1353: Fix Structure#place not working as documented with 0 palette 3c1b77871 SPIGOT-6911, PR-1349: Change max book length in CraftMetaBook 333701839 SPIGOT-7572: Bee nests generated without bees f48f4174c SPIGOT-5553, PR-1336: Add EntityKnockbackEvent
This commit is contained in:
parent
cde5587e58
commit
31699ae9a8
1161 changed files with 1950 additions and 2302 deletions
|
@ -779,10 +779,10 @@ index 0000000000000000000000000000000000000000..6e94562d79206d88b74b53814f9423f1
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad29dc438f 100644
|
||||
index 2e619279cb06cbe26bb4933a0312b245f8691d0b..bd1a010bb4e18a16d02549d64333ce7641be7910 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -400,7 +400,9 @@ public final class Bukkit {
|
||||
@@ -420,7 +420,9 @@ public final class Bukkit {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -792,7 +792,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static int broadcastMessage(@NotNull String message) {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
@@ -1191,6 +1193,19 @@ public final class Bukkit {
|
||||
@@ -1211,6 +1213,19 @@ public final class Bukkit {
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
|
@ -812,7 +812,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
/**
|
||||
* Broadcasts the specified message to every user with the given
|
||||
* permission name.
|
||||
@@ -1200,6 +1215,21 @@ public final class Bukkit {
|
||||
@@ -1220,6 +1235,21 @@ public final class Bukkit {
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
*/
|
||||
|
@ -834,7 +834,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
||||
return server.broadcast(message, permission);
|
||||
}
|
||||
@@ -1461,6 +1491,7 @@ public final class Bukkit {
|
||||
@@ -1481,6 +1511,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, type);
|
||||
}
|
||||
|
||||
|
@ -842,7 +842,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1486,6 +1517,38 @@ public final class Bukkit {
|
||||
@@ -1506,6 +1537,38 @@ public final class Bukkit {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -881,7 +881,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
||||
return server.createInventory(owner, type, title);
|
||||
}
|
||||
@@ -1504,6 +1567,7 @@ public final class Bukkit {
|
||||
@@ -1524,6 +1587,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, size);
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1516,10 +1580,30 @@ public final class Bukkit {
|
||||
@@ -1536,10 +1600,30 @@ public final class Bukkit {
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -920,7 +920,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1527,7 +1611,20 @@ public final class Bukkit {
|
||||
@@ -1547,7 +1631,20 @@ public final class Bukkit {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -941,7 +941,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static Merchant createMerchant(@Nullable String title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
@@ -1644,12 +1741,43 @@ public final class Bukkit {
|
||||
@@ -1664,12 +1761,43 @@ public final class Bukkit {
|
||||
return server.isPrimaryThread();
|
||||
}
|
||||
|
||||
|
@ -985,7 +985,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static String getMotd() {
|
||||
return server.getMotd();
|
||||
}
|
||||
@@ -1658,7 +1786,9 @@ public final class Bukkit {
|
||||
@@ -1678,7 +1806,9 @@ public final class Bukkit {
|
||||
* Set the message that is displayed on the server list.
|
||||
*
|
||||
* @param motd The message to be displayed
|
||||
|
@ -995,7 +995,7 @@ index 5680a77cc98cdb4b4c002d1366e775acaf747e51..a0fce496d2b90f484d2723c4ea4099ad
|
|||
public static void setMotd(@NotNull String motd) {
|
||||
server.setMotd(motd);
|
||||
}
|
||||
@@ -1667,8 +1797,10 @@ public final class Bukkit {
|
||||
@@ -1687,8 +1817,10 @@ public final class Bukkit {
|
||||
* Gets the default message that is displayed when the server is stopped.
|
||||
*
|
||||
* @return the shutdown message
|
||||
|
@ -1177,10 +1177,10 @@ index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcdc62a5c01 100644
|
||||
index 76b365f98b81234ae1c35014387b0e44f722d5ea..6aed59819cc3d70f1b5975c3c7df40cc0b0afd8a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -62,13 +62,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -63,13 +63,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a server implementation.
|
||||
*/
|
||||
|
@ -1196,7 +1196,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
*/
|
||||
public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
|
||||
|
||||
@@ -76,7 +76,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -77,7 +77,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Used for all announcement messages, such as informing users that a
|
||||
* player has joined.
|
||||
* <p>
|
||||
|
@ -1205,7 +1205,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
*/
|
||||
public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
|
||||
|
||||
@@ -337,7 +337,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -353,7 +353,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -1215,7 +1215,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
/**
|
||||
@@ -1023,8 +1025,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1039,8 +1041,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @param permission the required permission {@link Permissible
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
|
@ -1249,7 +1249,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
|
||||
/**
|
||||
* Gets the player by the given name, regardless if they are offline or
|
||||
@@ -1241,6 +1268,35 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1257,6 +1284,35 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1262,9 +1318,11 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1278,9 +1334,11 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @return The new inventory.
|
||||
* @throws IllegalArgumentException if the {@link InventoryType} cannot be
|
||||
* viewed.
|
||||
|
@ -1297,7 +1297,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
||||
|
||||
@@ -1280,6 +1338,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1296,6 +1354,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
||||
|
||||
|
@ -1320,7 +1320,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1290,18 +1364,32 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1306,18 +1380,32 @@ public interface Server extends PluginMessageRecipient {
|
||||
* viewed
|
||||
* @return a new inventory
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
|
@ -1353,7 +1353,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
Merchant createMerchant(@Nullable String title);
|
||||
|
||||
/**
|
||||
@@ -1397,27 +1485,56 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1413,27 +1501,56 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
boolean isPrimaryThread();
|
||||
|
||||
|
@ -1410,7 +1410,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
String getShutdownMessage();
|
||||
|
||||
/**
|
||||
@@ -1799,7 +1916,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1815,7 +1932,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends the component to the player
|
||||
*
|
||||
* @param component the components to send
|
||||
|
@ -1420,7 +1420,7 @@ index c394954cab8213bd1073356524cdd5705ef54d12..83ae1490f6c48d931541e13f76950fcd
|
|||
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1808,7 +1927,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1824,7 +1943,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends an array of components as a single message to the player
|
||||
*
|
||||
* @param components the components to send
|
||||
|
@ -1492,10 +1492,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 4a9a82540e40685d2b837c76c431827a00cf4ba3..a3ee6f2f588bc9c87e49378359f450820b9af1b9 100644
|
||||
index 6ca5f7a85087ca1c7e5e2d940bd3c65b84d2d356..0f902aec66ec550f80709f7f314ca90d374ebb53 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -26,6 +26,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
@Deprecated
|
||||
public interface UnsafeValues {
|
||||
|
@ -1524,10 +1524,10 @@ 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 d453a9753620e23e93e24b0c62bec5515d11dbcc..4c878531d9d8d0aee6832fd10b339a32f219fa9a 100644
|
||||
index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddecefbd863e 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -45,7 +45,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a world, which may contain entities, chunks and blocks
|
||||
*/
|
||||
|
@ -1536,7 +1536,7 @@ index d453a9753620e23e93e24b0c62bec5515d11dbcc..4c878531d9d8d0aee6832fd10b339a32
|
|||
|
||||
/**
|
||||
* Gets the {@link Block} at the given coordinates
|
||||
@@ -606,6 +606,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -608,6 +608,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public List<Player> getPlayers();
|
||||
|
||||
|
@ -2116,7 +2116,7 @@ index 7ad7bcf9a9333c8d6d1d7cab53a6d457ec20bbf6..c4f86ba1037f3f0e5d697a0962d71d6f
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 8532b8484d5a493c1c37ad7508597f624f1831c8..978431fd88cfb7d42fcdea8c904633df5c64daed 100644
|
||||
index cc577b5af6832ea9c98aceb587de378095277ada..0025139f403cfc80ace9f8584ccf42d3a5cbb718 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -2128,7 +2128,7 @@ index 8532b8484d5a493c1c37ad7508597f624f1831c8..978431fd88cfb7d42fcdea8c904633df
|
|||
|
||||
/**
|
||||
* Gets the entity's current position
|
||||
@@ -768,4 +768,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -763,4 +763,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
@ -2150,10 +2150,10 @@ index 8532b8484d5a493c1c37ad7508597f624f1831c8..978431fd88cfb7d42fcdea8c904633df
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e87ca26dec 100644
|
||||
index 764390e5b258ab3cadedb14be00d0c0d601b8a1f..5c55715c8cdd79f2214b265a81d94a8904c998ea 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -52,7 +52,41 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -54,7 +54,41 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a player, connected or not
|
||||
*/
|
||||
|
@ -2196,7 +2196,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
@@ -69,7 +103,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -71,7 +105,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @return the friendly name
|
||||
|
@ -2206,7 +2206,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
@NotNull
|
||||
public String getDisplayName();
|
||||
|
||||
@@ -81,15 +117,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -83,15 +119,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @param name The new display name.
|
||||
|
@ -2257,7 +2257,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public String getPlayerListName();
|
||||
|
||||
/**
|
||||
@@ -98,14 +169,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -100,14 +171,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
|
||||
|
@ -2276,7 +2276,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
@Nullable
|
||||
public String getPlayerListHeader();
|
||||
|
||||
@@ -113,7 +188,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -115,7 +190,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
|
||||
|
@ -2286,7 +2286,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
@Nullable
|
||||
public String getPlayerListFooter();
|
||||
|
||||
@@ -121,14 +198,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -123,14 +200,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
|
||||
|
@ -2305,7 +2305,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void setPlayerListFooter(@Nullable String footer);
|
||||
|
||||
/**
|
||||
@@ -137,7 +218,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -139,7 +220,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
|
||||
|
@ -2315,7 +2315,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
|
||||
|
||||
/**
|
||||
@@ -175,9 +258,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -177,9 +260,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Kicks player with custom kick message.
|
||||
*
|
||||
* @param message kick message
|
||||
|
@ -2341,7 +2341,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
* update the entry.
|
||||
@@ -840,6 +939,106 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -842,6 +941,106 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
|
||||
|
||||
|
@ -2448,7 +2448,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
/**
|
||||
* 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.
|
||||
@@ -857,7 +1056,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -859,7 +1058,11 @@ 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
|
||||
|
@ -2460,7 +2460,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -879,7 +1082,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -881,7 +1084,11 @@ 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
|
||||
|
@ -2472,7 +2472,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -902,7 +1109,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -904,7 +1111,11 @@ 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
|
||||
|
@ -2484,7 +2484,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -1350,7 +1561,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1372,7 +1583,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
* @throws IllegalArgumentException Thrown if the URL is too long.
|
||||
* @deprecated Minecraft no longer uses textures packs. Instead you
|
||||
|
@ -2493,7 +2493,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
*/
|
||||
@Deprecated
|
||||
public void setTexturePack(@NotNull String url);
|
||||
@@ -1386,7 +1597,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1408,7 +1619,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @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.
|
||||
|
@ -2503,7 +2503,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void setResourcePack(@NotNull String url);
|
||||
|
||||
/**
|
||||
@@ -1418,6 +1631,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1440,6 +1653,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
|
@ -2511,7 +2511,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
* @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.
|
||||
@@ -1430,6 +1644,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1452,6 +1666,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -2519,7 +2519,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash);
|
||||
|
||||
/**
|
||||
@@ -1454,12 +1669,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1476,12 +1691,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>To remove a resource pack you can use
|
||||
|
@ -2534,7 +2534,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
* @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.
|
||||
@@ -1473,8 +1689,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1495,8 +1711,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -2542,28 +2542,14 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
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>
|
||||
+ * The player's client will download the new resource pack asynchronously
|
||||
+ * in the background, and will automatically switch to it once the
|
||||
+ * download is complete. If the client has downloaded and cached a
|
||||
+ * resource pack with the same hash in the past it will not download but
|
||||
+ * directly apply the cached pack. If the hash is null and the client has
|
||||
+ * downloaded and cached the same resource pack in the past, it will
|
||||
+ * perform a file size check against the response content to determine if
|
||||
+ * the resource pack has changed and needs to be downloaded again. When
|
||||
+ * this request is sent for the very first time from a given server, the
|
||||
+ * client will first display a confirmation GUI to the player before
|
||||
+ * proceeding with the download.
|
||||
+ * <p>
|
||||
+ * Notes:
|
||||
+ * <ul>
|
||||
+ * <li>Players can disable server resources on their client, in which
|
||||
+ * case this method will have no affect on them. Use the
|
||||
+ * {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
+ * the player loaded the pack!
|
||||
+ * <li>To remove a resource pack you can use
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1519,7 +1737,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>To remove a resource pack you can use
|
||||
- * {@link #removeResourcePack(UUID)} or {@link #removeResourcePacks()}.
|
||||
+ * {@link #removeResourcePacks(UUID, UUID...)} or {@link #clearResourcePacks()}.
|
||||
+ * <li>The request is sent with empty string as the hash when the hash is
|
||||
+ * not provided. This might result in newer versions not loading the
|
||||
|
@ -2589,19 +2575,33 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1497,7 +1762,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>To remove a resource pack you can use
|
||||
- * {@link #removeResourcePack(UUID)} or {@link #removeResourcePacks()}.
|
||||
+ /**
|
||||
+ * Request that the player's client download and switch resource packs.
|
||||
+ * <p>
|
||||
+ * The player's client will download the new resource pack asynchronously
|
||||
+ * in the background, and will automatically switch to it once the
|
||||
+ * download is complete. If the client has downloaded and cached a
|
||||
+ * resource pack with the same hash in the past it will not download but
|
||||
+ * directly apply the cached pack. If the hash is null and the client has
|
||||
+ * downloaded and cached the same resource pack in the past, it will
|
||||
+ * perform a file size check against the response content to determine if
|
||||
+ * the resource pack has changed and needs to be downloaded again. When
|
||||
+ * this request is sent for the very first time from a given server, the
|
||||
+ * client will first display a confirmation GUI to the player before
|
||||
+ * proceeding with the download.
|
||||
+ * <p>
|
||||
+ * Notes:
|
||||
+ * <ul>
|
||||
+ * <li>Players can disable server resources on their client, in which
|
||||
+ * case this method will have no affect on them. Use the
|
||||
+ * {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
+ * the player loaded the pack!
|
||||
+ * <li>To remove a resource pack you can use
|
||||
+ * {@link #removeResourcePacks(UUID, UUID...)} or {@link #clearResourcePacks()}.
|
||||
* <li>The request is sent with empty string as the hash when the hash is
|
||||
* not provided. This might result in newer versions not loading the
|
||||
* pack correctly.
|
||||
@@ -1516,7 +1781,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1538,7 +1803,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
|
@ -2611,7 +2611,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, boolean force);
|
||||
|
||||
/**
|
||||
@@ -1541,7 +1808,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1563,7 +1830,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>To remove a resource pack you can use
|
||||
|
@ -2620,7 +2620,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
* <li>The request is sent with empty string as the hash when the hash is
|
||||
* not provided. This might result in newer versions not loading the
|
||||
* pack correctly.
|
||||
@@ -1561,9 +1828,61 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1583,9 +1850,61 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
|
@ -2682,7 +2682,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1586,7 +1905,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1608,7 +1927,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>To remove a resource pack you can use
|
||||
|
@ -2691,7 +2691,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
* <li>The request is sent with empty string as the hash when the hash is
|
||||
* not provided. This might result in newer versions not loading the
|
||||
* pack correctly.
|
||||
@@ -1607,21 +1926,74 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1629,9 +1948,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
|
@ -2750,8 +2750,9 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Request that the player's client remove a resource pack sent by the
|
||||
* server.
|
||||
* Request that the player's client download and include another resource pack.
|
||||
* <p>
|
||||
@@ -1684,12 +2054,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param id the id of the resource pack.
|
||||
* @throws IllegalArgumentException If the ID is null.
|
||||
|
@ -2766,7 +2767,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
*/
|
||||
public void removeResourcePacks();
|
||||
|
||||
@@ -1759,7 +2131,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1827,7 +2199,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param title Title text
|
||||
* @param subtitle Subtitle text
|
||||
|
@ -2775,7 +2776,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
*/
|
||||
@Deprecated
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle);
|
||||
@@ -1778,7 +2150,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1846,7 +2218,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.
|
||||
|
@ -2785,7 +2786,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -2005,6 +2379,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2073,6 +2447,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public int getClientViewDistance();
|
||||
|
||||
|
@ -2800,7 +2801,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
/**
|
||||
* Gets the player's estimated ping in milliseconds.
|
||||
*
|
||||
@@ -2030,8 +2412,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2098,8 +2480,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* they wish.
|
||||
*
|
||||
* @return the player's locale
|
||||
|
@ -2811,7 +2812,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public String getLocale();
|
||||
|
||||
/**
|
||||
@@ -2083,6 +2467,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2151,6 +2535,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
|
@ -2826,7 +2827,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
// Spigot start
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
@@ -2114,11 +2506,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2182,11 +2574,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
|
@ -2840,7 +2841,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
@Override
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -2129,7 +2523,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2197,7 +2591,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
|
@ -2850,7 +2851,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
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.");
|
||||
}
|
||||
@@ -2139,7 +2535,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2207,7 +2603,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
|
@ -2860,7 +2861,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
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.");
|
||||
}
|
||||
@@ -2150,7 +2548,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2218,7 +2616,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
|
||||
|
@ -2870,7 +2871,7 @@ index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e8
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -2161,7 +2561,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2229,7 +2629,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue