Expand resource pack API

This commit is contained in:
Shane Freeder 2021-07-12 20:42:17 +01:00
parent 40b34615b0
commit 664eee6e13
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
32 changed files with 166 additions and 81 deletions

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9e4ef22c04b335d81baba2904c5571d17138092b..e72e3adc5783a268e74c09c689be57db8b7df7e2 100644
index 1a5d42d27299191f60fa1fd380dd0827dff4f7b1..d6eeee1ec221e899f20d50aee9b4deed8a6ef8a2 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1151,7 +1151,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -18,7 +18,7 @@ index 9e4ef22c04b335d81baba2904c5571d17138092b..e72e3adc5783a268e74c09c689be57db
public void setResourcePack(@NotNull String url);
/**
@@ -1628,6 +1630,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1628,6 +1630,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName())));
}
@ -55,6 +55,70 @@ index 9e4ef22c04b335d81baba2904c5571d17138092b..e72e3adc5783a268e74c09c689be57db
+ void setResourcePack(@NotNull String url, @NotNull String hash);
+
+ /**
+ * 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 the same
+ * resource pack in the past, it will perform a quick timestamp check
+ * over the network 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.
+ * <li>There is no concept of resetting resource packs back to default
+ * within Minecraft, so players will have to relog to do so.
+ * </ul>
+ *
+ * @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 A 40 character hexadecimal and lowercase SHA-1 digest of
+ * the resource pack file.
+ * @param required Marks if the resource pack should be required by the 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.
+ */
+ void setResourcePack(@NotNull String url, @NotNull String hash, boolean required);
+
+ /**
+ * 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 the same
+ * resource pack in the past, it will perform a quick timestamp check
+ * over the network 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.
+ * <li>There is no concept of resetting resource packs back to default
+ * within Minecraft, so players will have to relog to do so.
+ * </ul>
+ *
+ * @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 A 40 character hexadecimal and lowercase SHA-1 digest of
+ * the resource pack file.
+ * @param required Marks if the resource pack should be required by the client
+ * @param resourcePackPrompt A Prompt to be displayed in the client request
+ * @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.
+ */
+ void setResourcePack(@NotNull String url, @NotNull String hash, boolean required, net.kyori.adventure.text.Component resourcePackPrompt);
+ /**
+ * @return the most recent resource pack status received from the player,
+ * or null if no status has ever been received from this player.
+ */

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e72e3adc5783a268e74c09c689be57db8b7df7e2..88cfc75a7b55dd09c4577d61ac40c3e241fc9e6c 100644
index d6eeee1ec221e899f20d50aee9b4deed8a6ef8a2..cfdf93176160351e4fdf746e5c88d3e301e242dc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -68,7 +68,7 @@ index e72e3adc5783a268e74c09c689be57db8b7df7e2..88cfc75a7b55dd09c4577d61ac40c3e2
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}
@@ -1755,6 +1791,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1819,6 +1855,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends the component to the specified screen position of this player
*
@ -76,7 +76,7 @@ index e72e3adc5783a268e74c09c689be57db8b7df7e2..88cfc75a7b55dd09c4577d61ac40c3e2
* @param position the screen position
* @param component the components to send
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
@@ -1767,6 +1804,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1831,6 +1868,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 4fa6080c151c3c2c0a7d95a2dc95692bd8bbee57..ea4bad15720ce0a31d09999efa6df3988a67be20 100644
index a65bfc33e36dec9a0e41628dcca53b0de9deb66b..6cc305ecf1854ff8cadbe1f677ac7fc69f947d73 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -4,6 +4,7 @@ import java.net.InetSocketAddress;
@ -17,7 +17,7 @@ index 4fa6080c151c3c2c0a7d95a2dc95692bd8bbee57..ea4bad15720ce0a31d09999efa6df398
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -1741,6 +1742,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1805,6 +1806,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index b7bda78eab3a8146b2c361735a19b2a159af215e..685975e7bb8938ce0b2d80855c4c5549f50b262d 100644
index 52d139ae39ceada353720e9928c430de71528233..dfe14cda858fee85c8675c129317951ee801ef04 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1916,6 +1916,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1980,6 +1980,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use
*/
void setPlayerProfile(@NotNull PlayerProfile profile);

View File

@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 685975e7bb8938ce0b2d80855c4c5549f50b262d..e53f641e11dc74c99e656e985caa7c5943fb53a4 100644
index dfe14cda858fee85c8675c129317951ee801ef04..051d33afa1e75156de37fda3d8d1753c46ece574 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity;
@ -187,7 +187,7 @@ index 685975e7bb8938ce0b2d80855c4c5549f50b262d..e53f641e11dc74c99e656e985caa7c59
import com.destroystokyo.paper.Title; // Paper
import net.kyori.adventure.text.Component;
import com.destroystokyo.paper.profile.PlayerProfile; // Paper
@@ -1936,6 +1937,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2000,6 +2001,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Reset the cooldown counter to 0, effectively starting the cooldown period.
*/
void resetCooldown();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e53f641e11dc74c99e656e985caa7c5943fb53a4..6bc4f12e4ef35979c9d99273d14d7b31833d3f75 100644
index 051d33afa1e75156de37fda3d8d1753c46ece574..b53eaacafc6515a501d96f68cf8eb20776aa7f33 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2071,6 +2071,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2135,6 +2135,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6bc4f12e4ef35979c9d99273d14d7b31833d3f75..d281d270bba71da5a7d1326112e73d9cdb1ed57b 100644
index b53eaacafc6515a501d96f68cf8eb20776aa7f33..d06e3bdfb9701451848683b4b6253854a47c39c2 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1943,6 +1943,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2007,6 +2007,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@NotNull
<T> T getClientOption(@NotNull ClientOption<T> option);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d281d270bba71da5a7d1326112e73d9cdb1ed57b..9c7960f56733ff18b949cffe15f082c4cde28317 100644
index d06e3bdfb9701451848683b4b6253854a47c39c2..b5965be8687ded1f48757a43ae6b11edc91570ad 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1956,6 +1956,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2020,6 +2020,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@Nullable
Firework boostElytra(@NotNull ItemStack firework);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose Tracked Players
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9c7960f56733ff18b949cffe15f082c4cde28317..38003de85a8098fc78fc947dd975990d478ee908 100644
index b5965be8687ded1f48757a43ae6b11edc91570ad..eede5c2b69388ec9055653b90b7ddce167213a2e 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,6 +1,7 @@
@ -16,7 +16,7 @@ index 9c7960f56733ff18b949cffe15f082c4cde28317..38003de85a8098fc78fc947dd975990d
import java.util.UUID;
import com.destroystokyo.paper.ClientOption; // Paper
import com.destroystokyo.paper.Title; // Paper
@@ -1969,6 +1970,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2033,6 +2034,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void sendOpLevel(byte level);
// Paper end

View File

@ -23,10 +23,18 @@ index 22c2c121bbcc7b0e15d73d20c9cc83d5fb085e5f..edb66e8c4507597ec8c35883460f88de
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 04e87f895dc3822cd1fe486c6ff0f6cd4415024b..45a8dc649983f1eec3d8eb065cb34d517c55300b 100644
index 65a55bdc3651900f2df0173c267d03335ce56a8a..47758fe59169d019d10f77b40843a44786b43b9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -142,6 +142,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -126,6 +126,7 @@ import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.messaging.StandardMessenger;
import org.bukkit.scoreboard.Scoreboard;
+import org.jetbrains.annotations.NotNull;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@@ -142,6 +143,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double health = 20;
private boolean scaledHealth = false;
private double healthScale = 20;
@ -37,16 +45,29 @@ index 04e87f895dc3822cd1fe486c6ff0f6cd4415024b..45a8dc649983f1eec3d8eb065cb34d51
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -1896,6 +1900,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1896,6 +1901,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}
+
+ @Override
+ public void setResourcePack(String url, String hash) {
+ public void setResourcePack(@NotNull String url, @NotNull String hash) {
+ this.setResourcePack(url, hash, false, null);
+ }
+
+ @Override
+ public void setResourcePack(@NotNull String url, @NotNull String hash, boolean required) {
+ this.setResourcePack(url, hash, required, null);
+ }
+
+ @Override
+ public void setResourcePack(@NotNull String url, @NotNull String hash, boolean required, net.kyori.adventure.text.Component resourcePackPrompt) {
+ Validate.notNull(url, "Resource pack URL cannot be null");
+ Validate.notNull(hash, "Hash cannot be null");
+ this.getHandle().sendTexturePack(url, hash, false, new net.minecraft.network.chat.TextComponent(""));
+ net.minecraft.network.chat.Component promptComponent = resourcePackPrompt != null ?
+ io.papermc.paper.adventure.PaperAdventure.asVanilla(resourcePackPrompt) :
+ new net.minecraft.network.chat.TextComponent("");
+ this.getHandle().sendTexturePack(url, hash, required, promptComponent);
+ }
+
+ @Override

View File

@ -44,10 +44,10 @@ index a492f0b8393c185f0464f0fb0e5d5dce4d0e3824..bcf7fc1bdee10baaff7ec15ad2572061
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 17f1d9b262fc6ee672a3db8dd6fc0acc9a2ee4c2..5f03810447caa30e51e546ad4fdd2a9d6b0d82b7 100644
index 47758fe59169d019d10f77b40843a44786b43b9b..75272f2cd49344fdd243a210d245abc95b34f581 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1702,6 +1702,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1703,6 +1703,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players
SPIGOT-1915 & GH-114
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2dab55e7d807ae8414fbb1f4446df2f38783cfb4..4cbd2fcbbc96d64116665b13f49f0bb3d4b2bca6 100644
index 75272f2cd49344fdd243a210d245abc95b34f581..b0aeda4898fcdfb8c4e005ba1c9ad3ff2adb70f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -894,6 +894,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -895,6 +895,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return true;
}

View File

@ -30,10 +30,10 @@ index 3f676bab4448de3658a4c631916740be7be6a193..a21496bc07c4691b99f9f58a0493e6e0
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 843d7d89253c61d6171368bcfd9ff2263e8c2aaa..b66c96bdfd480c6e913aac32b62ddb0ddba0d93e 100644
index b0aeda4898fcdfb8c4e005ba1c9ad3ff2adb70f9..7f9c1eb4fcfae0fc03e59612de11d69493ddb24d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1899,8 +1899,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1900,8 +1900,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

View File

@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3001399cbbe68621a5605436b74e4e96491b5dad..ea7a937dfd0769d734a056709d3af9d2f2ee5332 100644
index 7f9c1eb4fcfae0fc03e59612de11d69493ddb24d..af292ee192b3ca4a4cfde2e7df114e6004d5c45c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -248,6 +248,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -249,6 +249,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

View File

@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15
+
+}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 242f76a2ee2ca3d67851647bbb14cd123c378e0b..1d46187969b5792c255d0bf1966b427b905cb69c 100644
index b62e373445406ae84b37ec0570ebb1da02cff0b7..06e965996a5c50bce617847e594ae0dd83403484 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -83,6 +83,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -90,10 +90,10 @@ index c4ba069f5124ec151e05813beddf293fddc3b804..484221e5a9c246aa91e0eacef3911b0e
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 08be81ecd34fa2f0289b10179ccc788307a09813..6549ffa087f9955849024fa62cfca9e91cbecf30 100644
index af292ee192b3ca4a4cfde2e7df114e6004d5c45c..b894b849d0063ea54696de8d0cb8286a14c45e7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -192,6 +192,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -193,6 +193,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -28,7 +28,7 @@ index 6f25e9f41d93a225acaa6575954967438a6cabbf..d439e8ce87bf7da03683a336941c7673
return true;
});
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a4063d3c280b145c9754c6df22b0b458f7145ea7..c240910d1baadc40a66e4086fb41cb5aee1eabc6 100644
index b894b849d0063ea54696de8d0cb8286a14c45e7b..05a427f238d48c8bb815083c21e62f8e5cb75ed0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -61,11 +61,14 @@ import net.minecraft.server.level.ServerPlayer;
@ -46,7 +46,7 @@ index a4063d3c280b145c9754c6df22b0b458f7145ea7..c240910d1baadc40a66e4086fb41cb5a
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.SignBlockEntity;
@@ -1202,8 +1205,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1203,8 +1206,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return GameMode.getByValue(this.getHandle().gameMode.getGameModeForPlayer().getId());
}

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 94b1ec73f2039c83203045db42bf0270c985d995..dbdd320eca27e82d5b058a7e6596b0a5fbc2631f 100644
index 261ebb134a5ff40406e74237f730aad1c78a8215..39bdda56aaa5503efc15207261634127b462c3e7 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -340,12 +340,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@ -26,7 +26,7 @@ index 94b1ec73f2039c83203045db42bf0270c985d995..dbdd320eca27e82d5b058a7e6596b0a5
uniqueId = gameProfile.getId();
// Paper end
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 278416af649425890ad00ca6f47d459ebab08e0b..91f96f5718f7a7f2e0ce56f4dbf894d8a052630c 100644
index da0176ed9d51aef76d9c439a03718c1635c35333..f9593486e5382c629e0febd43b3d7464481f0045 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -173,7 +173,7 @@ public abstract class Player extends LivingEntity {
@ -39,7 +39,7 @@ index 278416af649425890ad00ca6f47d459ebab08e0b..91f96f5718f7a7f2e0ce56f4dbf894d8
private ItemStack lastItemInMainHand;
private final ItemCooldowns cooldowns;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f1c56823e1e89251c518d9d51ab7442b30a85336..8f7807409a21369bad1515af9c1ebac778924aec 100644
index 05a427f238d48c8bb815083c21e62f8e5cb75ed0..69314b3a371ba96a91fb9096dd24d7cedf341560 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -71,6 +71,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper;
@ -50,7 +50,7 @@ index f1c56823e1e89251c518d9d51ab7442b30a85336..8f7807409a21369bad1515af9c1ebac7
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.saveddata.maps.MapDecoration;
import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
@@ -1333,8 +1334,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1334,8 +1335,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.hiddenPlayers.put(player.getUniqueId(), hidingPlugins);
// Remove this player from the hidden player's EntityTrackerEntry
@ -65,7 +65,7 @@ index f1c56823e1e89251c518d9d51ab7442b30a85336..8f7807409a21369bad1515af9c1ebac7
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1375,8 +1381,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1376,8 +1382,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
this.hiddenPlayers.remove(player.getUniqueId());
@ -80,7 +80,7 @@ index f1c56823e1e89251c518d9d51ab7442b30a85336..8f7807409a21369bad1515af9c1ebac7
this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, other));
@@ -1385,6 +1396,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1386,6 +1397,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entry.updatePlayer(this.getHandle());
}
}

View File

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8f7807409a21369bad1515af9c1ebac778924aec..60b8d4f974952c131c94c0dd23e44e28135beff9 100644
index 69314b3a371ba96a91fb9096dd24d7cedf341560..f0d0becf8730eac257d5b3d5f6a14ac881359220 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -149,6 +149,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -150,6 +150,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index 8f7807409a21369bad1515af9c1ebac778924aec..60b8d4f974952c131c94c0dd23e44e28
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1602,7 +1603,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1603,7 +1604,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void addChannel(String channel) {

View File

@ -185,10 +185,10 @@ index f1b1d1881d0598503a7ec1022ef5e00f848fb247..a9f8ffa1772de39c74394f8cf324ab77
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9a245d64ce75fbf3cb1953f91d41eff528baefb8..37d1d84d05812adb48e6116c0506f1d460de4038 100644
index f0d0becf8730eac257d5b3d5f6a14ac881359220..281b9fa69f8eb1d1eb6a199228e6a1c53b34714f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -921,7 +921,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -922,7 +922,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 37d1d84d05812adb48e6116c0506f1d460de4038..abe7052b7b5c98328e4ecc1d199e911d5e9dcc2b 100644
index 281b9fa69f8eb1d1eb6a199228e6a1c53b34714f..b588814417c2eb0069228cb54a5e4845388276ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2234,6 +2234,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2248,6 +2248,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.send(new net.minecraft.network.protocol.game.ClientboundOpenBookPacket(net.minecraft.world.InteractionHand.MAIN_HAND));
connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(0, stateId, slot, inventory.getSelected()));
}

View File

@ -70,7 +70,7 @@ index 2c32d7c37d7d9b9c12c5af3a9af576ac88618049..b4d2b9a25ee1c407b3803d59c4fd80f7
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9c2a6fd75f4380230256d9de91082d1bfe2eb961..76ebd1c85fed688ad42ea5f709638015e965cec6 100644
index 616d6404a966153f89ae63b559b5b66cbb832104..676d24a1c57b5d3d14c3599d09196da128b6e19e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
@ -277,10 +277,10 @@ index d545349f659b2a164a28d06e9ff0f9fff8fa8ecf..bbde9b758643c087733064a126d90689
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index abe7052b7b5c98328e4ecc1d199e911d5e9dcc2b..6a075a31690633e277e094290cfb05c3d94a1d91 100644
index b588814417c2eb0069228cb54a5e4845388276ce..02af5c7038dd56d77eaa9ca08bb81950f6f5f499 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1862,7 +1862,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1863,7 +1863,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {

View File

@ -106,10 +106,10 @@ index 93de44b05a698515457052c9c684c4ef44c5cc40..b20bfe5ab165bf86985e5ff2f93f415d
public Location getBedSpawnLocation() {
CompoundTag data = this.getData();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 39b307074f7addc6223a2a2212a3f92feffc4379..8563dca3c712ebb579056a3e2a344616018b7274 100644
index 02af5c7038dd56d77eaa9ca08bb81950f6f5f499..8ce9a182cabd8a537cf847575654842829f133ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -150,6 +150,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -151,6 +151,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
@ -117,7 +117,7 @@ index 39b307074f7addc6223a2a2212a3f92feffc4379..8563dca3c712ebb579056a3e2a344616
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1506,6 +1507,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1507,6 +1508,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index 39b307074f7addc6223a2a2212a3f92feffc4379..8563dca3c712ebb579056a3e2a344616
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1528,6 +1541,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1529,6 +1542,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 39b307074f7addc6223a2a2212a3f92feffc4379..8563dca3c712ebb579056a3e2a344616
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1542,6 +1557,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1543,6 +1558,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

View File

@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d0dbbdc1a99befeb63235cd2b51424dbba023e94..4d5c07031cf38c6acc5b5cda65eabb78f4edffb1 100644
index 8ce9a182cabd8a537cf847575654842829f133ee..01b3749ba0ccd1f81bc966927c59e895e4400f66 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2281,6 +2281,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2295,6 +2295,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

View File

@ -97,10 +97,10 @@ index 22aefdc7a096993c15c9b4e2f37ad84d1279a2df..3cab5fbfc1cae65efbf53b69cc0da012
if (getMainArm() != packet.getMainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 29d1f363348c67f158b8f4aac923e5f30d54b080..a69b9535c18597fec37ce6b50140188203d2b78d 100644
index 01b3749ba0ccd1f81bc966927c59e895e4400f66..638dc61594e86a1423536d2a7fe8405d2451a4ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -520,6 +520,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -521,6 +521,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void setViewDistance(int viewDistance) {
throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO
}

View File

@ -941,7 +941,7 @@ index d94241bcca4f2fd5e464a860bd356af504dc68b7..1cc4e0a1f3d8235ef88b48e01ca8b78a
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index aaeb50d7980a910ff21f9c1ea903acf994392ef8..82b047364608f6ef38b177079fd9543812c198b4 100644
index ec0a9f46b50280324ae0d2eed208c8f332a5d88d..ac9cb37dd91ac449f8943b1279f247846a35025a 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -445,6 +445,26 @@ public class ServerChunkCache extends ChunkSource {
@ -1144,7 +1144,7 @@ index e0c9857a922d8a3f421d7df0f056b82c4775390e..4918f89401cdf6a85d8b71f3e3a66082
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ef5cfd14a2adee048a4ebb61349dad1020aa4842..f948d0de66920e562f2edb0171637d586fb6baba 100644
index 21a3c5fe4cf0ac4f21ffda3d7c0b20f82d4cadf1..2a5f58a87cfe312d2118c1b6ba4df98b046c4db1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -223,7 +223,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -1174,10 +1174,10 @@ index f72471ac82907a0d5112598b3289689495285944..6e1f8323d028790d1f55d51edb3214d0
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
if (chunk != null) addTicket(x, z); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a69b9535c18597fec37ce6b50140188203d2b78d..5aba300b2aa99bcf17fdf19f8203a52bc814168e 100644
index 638dc61594e86a1423536d2a7fe8405d2451a4ee..ead9c15cfe31d1c9582826ad079691a1f147f3fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -889,6 +889,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -890,6 +890,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead.");
}

View File

@ -72,10 +72,10 @@ index 2ebb62c1326e988d28d4fd608f3ee009a975397f..00ce5bfdae67befdb72b01c152ab403f
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7e1af7f10b53a86de38a8d440c1a8d2037eca6e0..a0b6f9e2e7adab1aacec22bcbd47892fa7f0c01d 100644
index ead9c15cfe31d1c9582826ad079691a1f147f3fa..56155f59c9a8ce6dd0e60e23bf346e6ab6312886 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2422,6 +2422,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2436,6 +2436,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6557ae8a996ddb227a9fadd4ac30d44b1c5e47b2..a57bdc69d56c0a0ff510f4103745b18ca7ff863e 100644
index 56155f59c9a8ce6dd0e60e23bf346e6ab6312886..46b36ab9dee6fbb2ab8bbbe605c358d5edf76241 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -538,6 +538,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -539,6 +539,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
throw new RuntimeException("Unknown settings type");
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a57bdc69d56c0a0ff510f4103745b18ca7ff863e..f0ea99248db07e3b992fed5d950014bcbc951370 100644
index 46b36ab9dee6fbb2ab8bbbe605c358d5edf76241..ce437d0fd3194342bb660ff47f35d087522bc935 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2061,7 +2061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2062,7 +2062,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null && !particle.getDataType().isInstance(data)) {
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
}

View File

@ -46,10 +46,10 @@ index 6ac6d05390359bd858673c4941e7d90f4cf98a02..f80e4e2d8311ccfb62b7a61a71d8ae43
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1a2ed6e414b190f7ccb390fa1923222bf38bc36c..5b5c9d1bedb5fb87f390e39942a64f4d87098eeb 100644
index ce437d0fd3194342bb660ff47f35d087522bc935..bdb4e47bb4fe23842abf583d25e0fc043499b675 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -552,6 +552,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -553,6 +553,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
? (org.bukkit.entity.Firework) entity.getBukkitEntity()
: null;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose Tracked Players
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 29ec9f70d15569d45a94dac20bd30cc8ebc2a494..1b1a445a85570c79cc03c6b044962cd064aa4a12 100644
index bdb4e47bb4fe23842abf583d25e0fc043499b675..c5aa6f3edab0dbb6a9121200c46e31e5e5f39293 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2341,6 +2341,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2355,6 +2355,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -45,7 +45,7 @@ index d75f78d2e3fb1376e8f6a8668c98a04a693c99e1..79f6089b934124c3309c6bee2e48b36b
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index eef88ba763edfc6515c5e0f8c0b3e13145bea822..aa366b5facbcb3575aa63da444561700eeb39051 100644
index 91a03f4ed215c882d2ae930402220e4cbbf1ea00..8e2bccc3a9ddb17a4978596056189eb776976338 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1786,8 +1786,15 @@ public class ServerPlayer extends Player {
@ -136,10 +136,10 @@ index 351c293d794d77750740df2e64129786f47cd0fa..32538258b8af2a239f9ab6d6ab4eac7a
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 313bfab694bb93968db927b5e4bd98a7c7931184..3e52ce2bc3a4b1327ab0e01b78966558d77cec9a 100644
index c5aa6f3edab0dbb6a9121200c46e31e5e5f39293..c283d1cb8ba22ba87de1433cbbbcf1d0075a1151 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1249,7 +1249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1250,7 +1250,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new IllegalArgumentException("Mode cannot be null");
}

View File

@ -342,10 +342,10 @@ index fffb31c761625b803ac397799af890df84f26951..65657c009f6d5a5d5740e80f912a5893
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3e52ce2bc3a4b1327ab0e01b78966558d77cec9a..4e95bf2eb6434d8ca44d478262329c56b0b0a079 100644
index c283d1cb8ba22ba87de1433cbbbcf1d0075a1151..7b8885f48245c37ba7166abd44486027779e134e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -498,16 +498,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -499,16 +499,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return;