added remaining hunks from chat/title packets (#5844)

This commit is contained in:
Jake Potrebic 2021-06-15 16:41:38 -07:00 committed by GitHub
parent ba2b40c603
commit 9501e7619f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 212 additions and 158 deletions

View File

@ -1,23 +0,0 @@
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
index 915120cc505c70153f7b70f07d8d42c13eb77ea7..69ff8df7340e60c476803256750a48f0b43414d3 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
@@ -10,6 +10,7 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
private ClientboundSetTitlesPacket.Type type;
private Component text;
+ public net.kyori.adventure.text.Component adventure$text; // Paper
private int fadeInTime;
private int stayTime;
private int fadeOutTime;
@@ -51,6 +52,11 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
public void write(FriendlyByteBuf buf) throws IOException {
buf.writeEnum((Enum) this.type);
if (this.type == ClientboundSetTitlesPacket.Type.TITLE || this.type == ClientboundSetTitlesPacket.Type.SUBTITLE || this.type == ClientboundSetTitlesPacket.Type.ACTIONBAR) {
+ // Paper start
+ if (this.adventure$text != null) {
+ buf.writeComponent(this.adventure$text);
+ } else
+ // Paper end
buf.writeComponent(this.text);
}

View File

@ -1,31 +0,0 @@
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
index fff22c40ba38575951e8e4821ade22b29d580a89..c397c52e8e24b85d892e4906178720cc70edc143 100644
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
@@ -47,6 +47,17 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
}
}
+ // Paper start
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
+
+ public PacketPlayOutTitle(EnumTitleAction action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) {
+ this.a = action;
+ this.components = components;
+ this.c = fadeIn;
+ this.d = stay;
+ this.e = fadeOut;
+ }
+ // Paper end
@Override
public void b(PacketDataSerializer packetdataserializer) throws IOException {
@@ -55,6 +66,8 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
// Paper start
if (this.adventure$text != null) {
packetdataserializer.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ packetdataserializer.writeComponent(this.components);
} else
// Paper end
packetdataserializer.a(this.b);

View File

@ -1,31 +0,0 @@
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
index 69ff8df7340e60c476803256750a48f0b43414d3..df444daeb181ff78170f7b92bd02f1f1862dfa2e 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
@@ -47,6 +47,17 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
}
}
+ // Paper start
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
+
+ public ClientboundSetTitlesPacket(Type action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) {
+ this.type = action;
+ this.components = components;
+ this.fadeInTime = fadeIn;
+ this.stayTime = stay;
+ this.fadeOutTime = fadeOut;
+ }
+ // Paper end
@Override
public void write(FriendlyByteBuf buf) throws IOException {
@@ -55,6 +66,8 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
// Paper start
if (this.adventure$text != null) {
buf.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ buf.writeComponent(this.components);
} else
// Paper end
buf.writeComponent(this.text);

View File

@ -1110,6 +1110,78 @@ index d63a712126973fd1bea547d30c7d116c622669ee..1f5050e6c1d932aa196ab9524f7f1f9b
// Spigot start // Spigot start
if (this.components != null) { if (this.components != null) {
buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(components)); buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(components));
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
index 02183c810f9968621b9b20c1f7b54258b620c507..32ef3edebe94a2014168b7e438752a80b2687e5f 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
@@ -6,6 +6,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetActionBarTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
+ public net.kyori.adventure.text.Component adventure$text; // Paper
public ClientboundSetActionBarTextPacket(Component message) {
this.text = message;
@@ -17,6 +18,11 @@ public class ClientboundSetActionBarTextPacket implements Packet<ClientGamePacke
@Override
public void write(FriendlyByteBuf buf) {
+ // Paper start
+ if (this.adventure$text != null) {
+ buf.writeComponent(this.adventure$text);
+ } else
+ // Paper end
buf.writeComponent(this.text);
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
index bea682c52a95863c474b8283bd4ae795e525a94f..c44a276d201fdfa5144d45d319d7761583c60639 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
@@ -6,6 +6,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetSubtitleTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
+ public net.kyori.adventure.text.Component adventure$text; // Paper
public ClientboundSetSubtitleTextPacket(Component subtitle) {
this.text = subtitle;
@@ -17,6 +18,11 @@ public class ClientboundSetSubtitleTextPacket implements Packet<ClientGamePacket
@Override
public void write(FriendlyByteBuf buf) {
+ // Paper start
+ if (this.adventure$text != null) {
+ buf.writeComponent(this.adventure$text);
+ } else
+ // Paper end
buf.writeComponent(this.text);
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
index 1fb62779527a228f748b49a4d2ddfc57ccb80cf8..bd808eb312ade7122973a47f4b96505829511da5 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
@@ -6,6 +6,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetTitleTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
+ public net.kyori.adventure.text.Component adventure$text; // Paper
public ClientboundSetTitleTextPacket(Component title) {
this.text = title;
@@ -17,6 +18,11 @@ public class ClientboundSetTitleTextPacket implements Packet<ClientGamePacketLis
@Override
public void write(FriendlyByteBuf buf) {
+ // Paper start
+ if (this.adventure$text != null) {
+ buf.writeComponent(this.adventure$text);
+ } else
+ // Paper end
buf.writeComponent(this.text);
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java
index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490015662c2 100644 index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490015662c2 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundTabListPacket.java
@ -2014,7 +2086,7 @@ index d4ea706d5456e709b95e34be8220a0d39be2c8f4..2db149bf57c561d7f8f49341fbefafb5
player.initMenu(container); player.initMenu(container);
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 969d5071dbf3356b80da38526351d488ab936c08..f1f35eeff46f6573b79f1190265a908e5f8855eb 100644 index 969d5071dbf3356b80da38526351d488ab936c08..e1e9319a67441bccf24b6a844036f3432c1cb86d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -244,14 +244,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -244,14 +244,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -2221,8 +2293,8 @@ index 969d5071dbf3356b80da38526351d488ab936c08..f1f35eeff46f6573b79f1190265a908e
+ +
+ @Override + @Override
+ public void sendActionBar(final net.kyori.adventure.text.Component message) { + public void sendActionBar(final net.kyori.adventure.text.Component message) {
+ final net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(message)); + final net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket((net.minecraft.network.chat.Component) null);
+ // packet.adventure$text = message; // TODO: kashike add fields to packet + packet.adventure$text = message;
+ this.getHandle().connection.send(packet); + this.getHandle().connection.send(packet);
+ } + }
+ +
@ -2248,9 +2320,9 @@ index 969d5071dbf3356b80da38526351d488ab936c08..f1f35eeff46f6573b79f1190265a908e
+ private void adventure$sendPlayerListHeaderAndFooter() { + private void adventure$sendPlayerListHeaderAndFooter() {
+ final ServerGamePacketListenerImpl connection = this.getHandle().connection; + final ServerGamePacketListenerImpl connection = this.getHandle().connection;
+ if (connection == null) return; + if (connection == null) return;
+ final ClientboundTabListPacket packet = new net.minecraft.network.protocol.game.ClientboundTabListPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla((this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader), io.papermc.paper.adventure.PaperAdventure.asVanilla((this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter)); + final ClientboundTabListPacket packet = new ClientboundTabListPacket(null, null);
+ // packet.adventure$header = (this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader; // TODO: kashike add fields to packet + packet.adventure$header = (this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader;
+ // packet.adventure$footer = (this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter; + packet.adventure$footer = (this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter;
+ connection.send(packet); + connection.send(packet);
+ } + }
+ +
@ -2261,11 +2333,11 @@ index 969d5071dbf3356b80da38526351d488ab936c08..f1f35eeff46f6573b79f1190265a908e
+ if (times != null) { + if (times != null) {
+ connection.send(new ClientboundSetTitlesAnimationPacket(ticks(times.fadeIn()), ticks(times.stay()), ticks(times.fadeOut()))); + connection.send(new ClientboundSetTitlesAnimationPacket(ticks(times.fadeIn()), ticks(times.stay()), ticks(times.fadeOut())));
+ } + }
+ final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(title.subtitle())); + final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket((net.minecraft.network.chat.Component) null);
+ // sp.adventure$text = title.subtitle(); // TODO: kashike add fields to packet + sp.adventure$text = title.subtitle();
+ connection.send(sp); + connection.send(sp);
+ final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(title.title())); + final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket((net.minecraft.network.chat.Component) null);
+ // tp.adventure$text = title.title(); + tp.adventure$text = title.title();
+ connection.send(tp); + connection.send(tp);
+ } + }
+ +

View File

@ -32,8 +32,50 @@ index 02d19fa4abdee0c8331734932a83e64694356030..969aea457e76b853e34a67a8fd07e0ea
@Nullable @Nullable
public static MutableComponent fromJson(String json) { public static MutableComponent fromJson(String json) {
return (MutableComponent) GsonHelper.fromJson(Component.Serializer.GSON, json, MutableComponent.class, false); return (MutableComponent) GsonHelper.fromJson(Component.Serializer.GSON, json, MutableComponent.class, false);
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
index c44a276d201fdfa5144d45d319d7761583c60639..f68a1a6dc6add9496e25cb52c318e086e356e2bb 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java
@@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetSubtitleTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
public net.kyori.adventure.text.Component adventure$text; // Paper
+ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper
public ClientboundSetSubtitleTextPacket(Component subtitle) {
this.text = subtitle;
@@ -21,6 +22,8 @@ public class ClientboundSetSubtitleTextPacket implements Packet<ClientGamePacket
// Paper start
if (this.adventure$text != null) {
buf.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ buf.writeComponent(this.components);
} else
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a43420b437 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java
@@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetTitleTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
public net.kyori.adventure.text.Component adventure$text; // Paper
+ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper
public ClientboundSetTitleTextPacket(Component title) {
this.text = title;
@@ -21,6 +22,8 @@ public class ClientboundSetTitleTextPacket implements Packet<ClientGamePacketLis
// Paper start
if (this.adventure$text != null) {
buf.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ buf.writeComponent(this.components);
} else
// 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 755dda2de8de4719251be884dcc1ae953df1856c..0a8e043c1a3107d727f42fbf36b14d8d3166a13e 100644 index 184ef22ba2f58f38ac1cc81818fc75eb9fb82a59..dab62713b33cdb7b2324216f7ad229db06e524d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -43,7 +85,7 @@ index 755dda2de8de4719251be884dcc1ae953df1856c..0a8e043c1a3107d727f42fbf36b14d8d
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding; import com.google.common.io.BaseEncoding;
@@ -242,6 +243,98 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -242,6 +243,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
} }
@ -81,8 +123,9 @@ index 755dda2de8de4719251be884dcc1ae953df1856c..0a8e043c1a3107d727f42fbf36b14d8d
+ +
+ @Override + @Override
+ public void setSubtitle(BaseComponent[] subtitle) { + public void setSubtitle(BaseComponent[] subtitle) {
+ final String json = net.md_5.bungee.chat.ComponentSerializer.toString(subtitle); + final ClientboundSetSubtitleTextPacket packet = new ClientboundSetSubtitleTextPacket((net.minecraft.network.chat.Component) null);
+ getHandle().connection.send(new ClientboundSetSubtitleTextPacket(Component.Serializer.fromJson(json))); + packet.components = subtitle;
+ getHandle().connection.send(packet);
+ } + }
+ +
+ @Override + @Override
@ -92,8 +135,9 @@ index 755dda2de8de4719251be884dcc1ae953df1856c..0a8e043c1a3107d727f42fbf36b14d8d
+ +
+ @Override + @Override
+ public void showTitle(BaseComponent[] title) { + public void showTitle(BaseComponent[] title) {
+ final String json = net.md_5.bungee.chat.ComponentSerializer.toString(title); + final ClientboundSetTitleTextPacket packet = new ClientboundSetTitleTextPacket((net.minecraft.network.chat.Component) null);
+ getHandle().connection.send(new ClientboundSetTitleTextPacket(Component.Serializer.fromJson(json))); + packet.components = title;
+ getHandle().connection.send(packet);
+ } + }
+ +
+ @Override + @Override

View File

@ -30,10 +30,10 @@ index 670efbe53241a0ae32d618c83da601ccc1f26e37..abbbe1786eb68af02f9d39650aad730a
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0a8e043c1a3107d727f42fbf36b14d8d3166a13e..8d92b7b28da44b7e63d075975b834c2ad8856448 100644 index dab62713b33cdb7b2324216f7ad229db06e524d6..161fcf68dc85fc6d7b0034f137b1a5aee26cbb69 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -883,7 +883,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -885,7 +885,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) { if (fromWorld == toWorld) {
entity.connection.teleport(to); entity.connection.teleport(to);
} else { } else {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a6d1ce8fd971e8de720e01eaba4ee6c5872c39db..dfab012166354af6233ee1fdab1b0fba6fcbe940 100644 index b5f72467b924d2bb7871b5af547ee794b8080803..cbd7e9b6b3d0cd5cb87ed8b2657daee9368424a0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1641,8 +1641,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1641,8 +1641,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@ -23,7 +23,7 @@ index a6d1ce8fd971e8de720e01eaba4ee6c5872c39db..dfab012166354af6233ee1fdab1b0fba
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8d92b7b28da44b7e63d075975b834c2ad8856448..bd41881de8bfd5fb28a6c415a559e519afaa8203 100644 index 161fcf68dc85fc6d7b0034f137b1a5aee26cbb69..03b2fd38b31de911ef107006a3d10c5534989247 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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 { @@ -142,6 +142,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -37,7 +37,7 @@ index 8d92b7b28da44b7e63d075975b834c2ad8856448..bd41881de8bfd5fb28a6c415a559e519
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity); super(server, entity);
@@ -1894,6 +1898,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1896,6 +1900,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() { public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning; return this.getHandle().affectsSpawning;
} }

View File

@ -49,10 +49,10 @@ index 89db2afd198366ab94c9c074890aa668d3771a79..83eaa3c6581c1a3f588278124fed4c81
} }
+ +
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bd41881de8bfd5fb28a6c415a559e519afaa8203..af9e79e1995ed8c1d5160a7b8ba7eec993e82263 100644 index 03b2fd38b31de911ef107006a3d10c5534989247..2dab55e7d807ae8414fbb1f4446df2f38783cfb4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1700,6 +1700,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1702,6 +1702,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void setRealHealth(double health) { public void setRealHealth(double health) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players
SPIGOT-1915 & GH-114 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index af9e79e1995ed8c1d5160a7b8ba7eec993e82263..d20b4d4cb52e37356b553e5197d650472e03e5b2 100644 index 2dab55e7d807ae8414fbb1f4446df2f38783cfb4..4cbd2fcbbc96d64116665b13f49f0bb3d4b2bca6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -892,6 +892,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -894,6 +894,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return true; return true;
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0cf49517aae9a8d4eafc37dfe8d78304bfe7f8ec..c334989e52b589ba528844eabed314472ea1ce9d 100644 index 0cb26991acf1d8af3da90a739c722596c4394a9d..71e8b6ecc13eccc9981d06a87a52bd0215e5bbec 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1707,7 +1707,7 @@ public class ServerPlayer extends Player { @@ -1707,7 +1707,7 @@ public class ServerPlayer extends Player {
@ -30,10 +30,10 @@ index 0cf49517aae9a8d4eafc37dfe8d78304bfe7f8ec..c334989e52b589ba528844eabed31447
this.locale = packet.language; this.locale = packet.language;
// Paper start // Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d20b4d4cb52e37356b553e5197d650472e03e5b2..3c8cc16ecf277390db3dbe112d0be6adf44e5b0c 100644 index 4cbd2fcbbc96d64116665b13f49f0bb3d4b2bca6..3001399cbbe68621a5605436b74e4e96491b5dad 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1897,8 +1897,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1899,8 +1899,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String getLocale() { public String getLocale() {

View File

@ -4,18 +4,41 @@ Date: Tue, 27 Dec 2016 15:02:42 -0500
Subject: [PATCH] String based Action Bar API Subject: [PATCH] String based Action Bar API
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad7dfad87f 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java
@@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet;
public class ClientboundSetActionBarTextPacket implements Packet<ClientGamePacketListener> {
private final Component text;
public net.kyori.adventure.text.Component adventure$text; // Paper
+ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper
public ClientboundSetActionBarTextPacket(Component message) {
this.text = message;
@@ -21,6 +22,8 @@ public class ClientboundSetActionBarTextPacket implements Packet<ClientGamePacke
// Paper start
if (this.adventure$text != null) {
buf.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ buf.writeComponent(this.components);
} else
// 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3c8cc16ecf277390db3dbe112d0be6adf44e5b0c..4f21d578a65778ab9022b09bee3b84af341ddbdd 100644 index 3001399cbbe68621a5605436b74e4e96491b5dad..ea7a937dfd0769d734a056709d3af9d2f2ee5332 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -248,6 +248,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -248,6 +248,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper start // Paper start
+ @Override + @Override
+ public void sendActionBar(BaseComponent[] message) { + public void sendActionBar(BaseComponent[] message) {
+ if (getHandle().connection == null) return; + if (getHandle().connection == null) return;
+ getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(Component.Serializer.fromJson(net.md_5.bungee.chat.ComponentSerializer.toString(message)))); + net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket((net.minecraft.network.chat.Component) null);
+ packet.components = message;
+ getHandle().connection.send(packet);
+ } + }
+ +
+ @Override + @Override

View File

@ -45,7 +45,7 @@ index 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..069ce59faab5184ab9da8ca3fe1cebf7
return true; return true;
}); });
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1af5e3f3389d5f4e391f05b3f8e7df9d3c799981..7c6e1348cc26c38a844b7324a8372266579e048e 100644 index 7badc90ec9e3b2dfffac6601e432c41224b701f6..44533533c4860a23a0d469c6a544825297d221de 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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; @@ -61,11 +61,14 @@ import net.minecraft.server.level.ServerPlayer;
@ -63,7 +63,7 @@ index 1af5e3f3389d5f4e391f05b3f8e7df9d3c799981..7c6e1348cc26c38a844b7324a8372266
import net.minecraft.world.level.GameType; import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity;
@@ -1198,8 +1201,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1202,8 +1205,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return GameMode.getByValue(this.getHandle().gameMode.getGameModeForPlayer().getId()); return GameMode.getByValue(this.getHandle().gameMode.getGameModeForPlayer().getId());
} }

View File

@ -39,7 +39,7 @@ index 4e8d38a6379d3dc1b7167b27479e6a27ea19ea19..3c0aca2b90521da83cf494d9fff953a1
private ItemStack lastItemInMainHand; private ItemStack lastItemInMainHand;
private final ItemCooldowns cooldowns; 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7c6e1348cc26c38a844b7324a8372266579e048e..c40b96a88ec6c33364cd7a04e5354900cba72f05 100644 index 44533533c4860a23a0d469c6a544825297d221de..be339681a63db12222a2e5727399f088c053fa4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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; @@ -71,6 +71,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper;
@ -50,7 +50,7 @@ index 7c6e1348cc26c38a844b7324a8372266579e048e..c40b96a88ec6c33364cd7a04e5354900
import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.saveddata.maps.MapDecoration; import net.minecraft.world.level.saveddata.maps.MapDecoration;
import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
@@ -1329,8 +1330,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1333,8 +1334,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.hiddenPlayers.put(player.getUniqueId(), hidingPlugins); this.hiddenPlayers.put(player.getUniqueId(), hidingPlugins);
// Remove this player from the hidden player's EntityTrackerEntry // Remove this player from the hidden player's EntityTrackerEntry
@ -65,7 +65,7 @@ index 7c6e1348cc26c38a844b7324a8372266579e048e..c40b96a88ec6c33364cd7a04e5354900
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) { if (entry != null) {
entry.removePlayer(this.getHandle()); entry.removePlayer(this.getHandle());
@@ -1371,8 +1377,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1375,8 +1381,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
this.hiddenPlayers.remove(player.getUniqueId()); this.hiddenPlayers.remove(player.getUniqueId());
@ -80,7 +80,7 @@ index 7c6e1348cc26c38a844b7324a8372266579e048e..c40b96a88ec6c33364cd7a04e5354900
this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, other)); this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, other));
@@ -1381,6 +1392,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1385,6 +1396,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entry.updatePlayer(this.getHandle()); entry.updatePlayer(this.getHandle());
} }
} }

View File

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c40b96a88ec6c33364cd7a04e5354900cba72f05..87f48b648d7523ccd573fa673666fdaaadbb9eda 100644 index be339681a63db12222a2e5727399f088c053fa4f..8c41ec25ed14ae2541ae3412fb1f4c11e641a32c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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 { @@ -149,6 +149,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -20,7 +20,7 @@ index c40b96a88ec6c33364cd7a04e5354900cba72f05..87f48b648d7523ccd573fa673666fdaa
// Paper end // Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1598,7 +1599,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1602,7 +1603,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void addChannel(String channel) { public void addChannel(String channel) {

View File

@ -29,7 +29,7 @@ index c7ac5b323c731e5a7929f87d59e62796e8d4a107..5a5733124bd8395bb996e9d5426c4a26
} }
// Spigot End // Spigot End
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index aeea85ce319c8583c70dee632ff68d430c2cae02..c8652e3bf325d3c557257ad88fe195f7a31683d6 100644 index 6f9a28a505f387387a42d607bd14cda75b5611eb..b3286a015f89068719381411f92ecc407e2dd796 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -602,7 +602,7 @@ public class ServerPlayer extends Player { @@ -602,7 +602,7 @@ public class ServerPlayer extends Player {
@ -84,7 +84,7 @@ index aeea85ce319c8583c70dee632ff68d430c2cae02..c8652e3bf325d3c557257ad88fe195f7
this.doCloseContainer(); this.doCloseContainer();
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d5c3c97e5205ef94578bc2d9d39f1a4c2600db94..ec473952e9f35db15cbb743a3c77c45c26d40ac5 100644 index 3bc5749f0e93b0298fa9a170e53f11dd05730eb1..f9f1eb0d7e85278186f42a4975d113bf07f367e9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -188,6 +188,7 @@ import org.bukkit.event.inventory.ClickType; @@ -188,6 +188,7 @@ import org.bukkit.event.inventory.ClickType;
@ -185,10 +185,10 @@ index c839ea0b68fbdccfb7ed667c705a3f0f347fd89c..43cee8b0b2b94d6db6303a1631731ed5
@Override @Override
public boolean isBlocking() { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 87f48b648d7523ccd573fa673666fdaaadbb9eda..b0a6ef41f5065e02c0eada4f2fb6cc9335307bde 100644 index 8c41ec25ed14ae2541ae3412fb1f4c11e641a32c..b810ea97165d4a5e1f93cc6ca64c9bdbce740313 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -917,7 +917,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -921,7 +921,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory // Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
@ -198,7 +198,7 @@ index 87f48b648d7523ccd573fa673666fdaaadbb9eda..b0a6ef41f5065e02c0eada4f2fb6cc93
// Check if the fromWorld and toWorld are the same. // Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 1fce91a05a6b04a8d93d2707637c5b96c318a641..5d0bbdd342eda5660b461b99fed7e80afaefbff9 100644 index deb331a95d1c8e53c21e2ab68f205c2427cdbef4..378e09eca16738bce048837752149f212a6e2cc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1170,7 +1170,7 @@ public class CraftEventFactory { @@ -1170,7 +1170,7 @@ public class CraftEventFactory {

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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b0a6ef41f5065e02c0eada4f2fb6cc9335307bde..9683b5e7045050ee0a6f279749dd159ff4366a7d 100644 index b810ea97165d4a5e1f93cc6ca64c9bdbce740313..189e9ea6d40f560ec4e01c3c7cb71f7c2a89b442 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2208,6 +2208,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2212,6 +2212,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.ClientboundOpenBookPacket(net.minecraft.world.InteractionHand.MAIN_HAND));
connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(0, slot, inventory.getSelected())); connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(0, slot, inventory.getSelected()));
} }

View File

@ -70,7 +70,7 @@ index b9fdccfc9815b0aec7bb5f5ad633c69b8eba6af2..df02d712e7daf1603885547995d69cb7
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9382bc7569a39a0d5729fb7441f07b84f0d0c566..a629b6e3cd085f79ad231747cce996bb1fbdc3b2 100644 index dd61eacfa417ed77bf09f482249bdd3a5a566ace..252a935db848a1001c6109b582886a98d21941cb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/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 { @@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
@ -275,10 +275,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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9683b5e7045050ee0a6f279749dd159ff4366a7d..686dc5859c081d3b86d8e58a63abee49258208d7 100644 index 189e9ea6d40f560ec4e01c3c7cb71f7c2a89b442..3120bb241dfdaac4ccebf9a708b7f2187dad91bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1858,7 +1858,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1862,7 +1862,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void sendHealthUpdate() { public void sendHealthUpdate() {

View File

@ -106,7 +106,7 @@ index 93de44b05a698515457052c9c684c4ef44c5cc40..b20bfe5ab165bf86985e5ff2f93f415d
public Location getBedSpawnLocation() { public Location getBedSpawnLocation() {
CompoundTag data = this.getData(); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 686dc5859c081d3b86d8e58a63abee49258208d7..f0bdf17d86458da3678945aeb23fdb5bceabc366 100644 index 3120bb241dfdaac4ccebf9a708b7f2187dad91bb..62ccb0aee9b80fd9dcfaf2dfa6abc68567221294 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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 { @@ -150,6 +150,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -117,7 +117,7 @@ index 686dc5859c081d3b86d8e58a63abee49258208d7..f0bdf17d86458da3678945aeb23fdb5b
// Paper end // Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1502,6 +1503,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1506,6 +1507,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed; this.firstPlayed = firstPlayed;
} }
@ -136,7 +136,7 @@ index 686dc5859c081d3b86d8e58a63abee49258208d7..f0bdf17d86458da3678945aeb23fdb5b
public void readExtraData(CompoundTag nbttagcompound) { public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true; this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) { if (nbttagcompound.contains("bukkit")) {
@@ -1524,6 +1537,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1528,6 +1541,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void setExtraData(CompoundTag nbttagcompound) { public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 686dc5859c081d3b86d8e58a63abee49258208d7..f0bdf17d86458da3678945aeb23fdb5b
if (!nbttagcompound.contains("bukkit")) { if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag()); nbttagcompound.put("bukkit", new CompoundTag());
} }
@@ -1538,6 +1553,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1542,6 +1557,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis()); data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName()); 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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f0bdf17d86458da3678945aeb23fdb5bceabc366..2ed7920b0e046bc9d581878a10b04ad784bb8655 100644 index 62ccb0aee9b80fd9dcfaf2dfa6abc68567221294..2b44b1137fb5795b778baeab84097f58cee4eab5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2255,6 +2255,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2259,6 +2259,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() { public void resetCooldown() {
getHandle().resetAttackStrengthTicker(); getHandle().resetAttackStrengthTicker();
} }

View File

@ -97,10 +97,10 @@ index c8adcdbb8075ab8a1645c4dd809f7de31ad13d34..9500fb90db765095afb1ecd91bbef609
if (getMainArm() != packet.getMainHand()) { if (getMainArm() != packet.getMainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2ed7920b0e046bc9d581878a10b04ad784bb8655..0a6d6ea67eaf8b2a59ec45fb3ffb85096f509997 100644 index 2b44b1137fb5795b778baeab84097f58cee4eab5..5bab49aa7f4a99dc6387fcf57bc39b16f912e6ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -516,6 +516,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -520,6 +520,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void setViewDistance(int viewDistance) { 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 throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO
} }

View File

@ -1173,10 +1173,10 @@ index f72471ac82907a0d5112598b3289689495285944..29b2f5d3e6fd4859fbe94ad1cd5c355b
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null); net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
if (chunk != null) addTicket(x, z); // Paper 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0a6d6ea67eaf8b2a59ec45fb3ffb85096f509997..e4386cf8bc6170f0c144560905ab285e44ebd5bb 100644 index 5bab49aa7f4a99dc6387fcf57bc39b16f912e6ab..0ff8a2d898b2fce5a7234841bb10cd5be050e326 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -885,6 +885,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -889,6 +889,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead.");
} }

View File

@ -72,10 +72,10 @@ index d1574bf0a326212898378b72b44c1b08e633dc27..d7c0d82eecb6c601a0ef038ec970a3b6
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e4386cf8bc6170f0c144560905ab285e44ebd5bb..a574848e34a391650efd09e5a5ec010ea5eb769e 100644 index 0ff8a2d898b2fce5a7234841bb10cd5be050e326..737a7cfafe3125e6e9647fccffaf765531153979 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2393,6 +2393,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2397,6 +2397,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end // 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a574848e34a391650efd09e5a5ec010ea5eb769e..776c79ff21ddd1e3a3644104ae91f15c119acd29 100644 index 737a7cfafe3125e6e9647fccffaf765531153979..7b810dac74831aa7faac5520c5b72689140c9398 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -534,6 +534,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -538,6 +538,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
throw new RuntimeException("Unknown settings type"); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 776c79ff21ddd1e3a3644104ae91f15c119acd29..0f832a1cec5dbe3f4fb8638af2ea1dc129ea5970 100644 index 7b810dac74831aa7faac5520c5b72689140c9398..2acd3895d696d8473a4ca75c9b08da379c0bfab0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2054,7 +2054,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2058,7 +2058,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null && !particle.getDataType().isInstance(data)) { if (data != null && !particle.getDataType().isInstance(data)) {
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
} }

View File

@ -46,10 +46,10 @@ index bbb2b5d96b35328e0b6041145a3d8234fd43dd03..213bfc7637b649a8e578d9a122fc4fce
// Paper start // Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0f832a1cec5dbe3f4fb8638af2ea1dc129ea5970..79527b4806c306b9811f6e93733836e658fea0fe 100644 index 2acd3895d696d8473a4ca75c9b08da379c0bfab0..dd0293ebf6ba95469189e6c0f7f038ad98cd3d01 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -548,6 +548,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -552,6 +552,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
? (org.bukkit.entity.Firework) entity.getBukkitEntity() ? (org.bukkit.entity.Firework) entity.getBukkitEntity()
: null; : 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 79527b4806c306b9811f6e93733836e658fea0fe..db920ef12e918b7dfdcc4612c4bec0b9961d9a3e 100644 index dd0293ebf6ba95469189e6c0f7f038ad98cd3d01..2314b1ab177fdc5dcbf96a998d9b1d0a86e10037 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2312,6 +2312,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2316,6 +2316,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper end // Paper end

View File

@ -136,10 +136,10 @@ index 3bee52c6a9d449599b8547437db50daee5014017..7ea9f362c19e5f3a67e4b5a46e708014
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index db920ef12e918b7dfdcc4612c4bec0b9961d9a3e..d46c2e85c845c769391af98619b9c771f13f90f7 100644 index 2314b1ab177fdc5dcbf96a998d9b1d0a86e10037..23bbb36a8035fe29046d51cf18b958d5cad7ea68 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1242,7 +1242,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1246,7 +1246,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
throw new IllegalArgumentException("Mode cannot be null"); throw new IllegalArgumentException("Mode cannot be null");
} }

View File

@ -351,10 +351,10 @@ index 34de9e2b0e52eb7a7e993678fd54ac1b883be4aa..bc3fe18dd32da2d381b9546aae675a47
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d46c2e85c845c769391af98619b9c771f13f90f7..a210ce9438455e3bf15e189fb5aea8f23dc9aae0 100644 index 23bbb36a8035fe29046d51cf18b958d5cad7ea68..4b5711af1416634df0fe11d49d10535adf6ad140 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -494,16 +494,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -498,16 +498,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;