9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-23 17:09:26 +00:00

Fix Bukkit player getter (#33)

This commit is contained in:
violetc
2023-05-15 00:22:13 +08:00
parent 716855eef4
commit c4aa94426f
8 changed files with 30 additions and 29 deletions

View File

@@ -32,10 +32,10 @@ index 8985a92d78ebf150088f8a1f9df7dd881a7789b0..a859aac2accb462c2f3ed1a93a34e0bb
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 821bb09f385306005c5ad206c532f898b40729df..cb82e2e7cca1d093490de8f6768577eaad01e6ef 100644
index cf961362bcfa2f8d3042a0f0995a35d9bbcb4f6f..61266233d27e97dc21c0291c66341bd2d2efbdf5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -346,6 +346,7 @@ public abstract class PlayerList {
@@ -347,6 +347,7 @@ public abstract class PlayerList {
}
// Leaves end - bot support
top.leavesmc.leaves.protocol.PcaSyncProtocol.onJoin(player); // Leaves - pca
@@ -43,7 +43,7 @@ index 821bb09f385306005c5ad206c532f898b40729df..cb82e2e7cca1d093490de8f6768577ea
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
@@ -589,6 +590,7 @@ public abstract class PlayerList {
@@ -590,6 +591,7 @@ public abstract class PlayerList {
return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName())));
}
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) {
@@ -51,7 +51,7 @@ index 821bb09f385306005c5ad206c532f898b40729df..cb82e2e7cca1d093490de8f6768577ea
// Paper end
ServerLevel worldserver = entityplayer.getLevel();
@@ -1558,7 +1560,7 @@ public abstract class PlayerList {
@@ -1559,7 +1561,7 @@ public abstract class PlayerList {
entityplayer.connection.send(packetplayoutrecipeupdate);
entityplayer.getRecipeBook().sendInitialRecipeBook(entityplayer);
}
@@ -77,7 +77,7 @@ index 19012c60ea6f725248f7e4a18d78eb1025f4b3a4..3a093befff648b394afd51d44b85f935
public Level getLevel() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e4189f444da906d89d7c910c4f0e61e058bc31ab..97ddfc93ddcb8241135d51f742281ed67cd716fd 100644
index 7f2602056b595ab7435defb9ddfb66889ad5f08d..14553aaea6224fe7e6461c64d1ba2b0d427d0cda 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -965,6 +965,13 @@ public final class CraftServer implements Server {