diff options
Diffstat (limited to 'patches/server/0548-Add-PlayerKickEvent-causes.patch')
-rw-r--r-- | patches/server/0548-Add-PlayerKickEvent-causes.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0548-Add-PlayerKickEvent-causes.patch b/patches/server/0548-Add-PlayerKickEvent-causes.patch index 050372991d..5cb94d101b 100644 --- a/patches/server/0548-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0548-Add-PlayerKickEvent-causes.patch @@ -480,15 +480,15 @@ index f472dea0bd4f834c0c8f0aa59ae7cdae082b14af..2fa51c3a70f43cd23b8f494fc643d66c } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 868c6f5ee5d67b92ad5834e05f9f1795cca879db..c8a4677db69b0f4111d550ca457b9196e7acebdd 100644 +index 00ccb9ae0d41ba87db2617853206d714a4225563..ddd5bdf07f92f18ad27b34ce63a98a61f8263733 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -635,7 +635,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot if (this.getHandle().connection == null) return; -- this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message)); -+ this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message), org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN); // Paper - kick event cause +- this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message, true)); ++ this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message, true), org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN); // Paper - kick event cause } // Paper start @@ -519,15 +519,15 @@ index 868c6f5ee5d67b92ad5834e05f9f1795cca879db..c8a4677db69b0f4111d550ca457b9196 if (msg.startsWith("/")) { this.getHandle().connection.handleCommand(msg); diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 9a1fffa0c07c24eed8bd6ea8f3cd26c9f926c54d..f3fa0340babfc5eb627066115164e2d885c602c2 100644 +index 824c4ad135ea5177f416687c7042639ed126b70b..39e56b95aaafbcd8ebe68fdefaace83702e9510d 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -74,7 +74,7 @@ public class RestartCommand extends Command // Kick all players for ( ServerPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) { -- p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage ) ); -+ p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage ), org.bukkit.event.player.PlayerKickEvent.Cause.RESTART_COMMAND); // Paper - kick event reason (cause is never used)) +- p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage, true ) ); ++ p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage, true ), org.bukkit.event.player.PlayerKickEvent.Cause.RESTART_COMMAND); // Paper - kick event reason (cause is never used)) } // Give the socket a chance to send the packets try |