PaperMC/paper-server/patches/sources/net/minecraft/server/commands/KickCommand.java.patch

12 lines
681 B
Diff
Raw Normal View History

2021-05-16 05:30:45 +02:00
--- a/net/minecraft/server/commands/KickCommand.java
+++ b/net/minecraft/server/commands/KickCommand.java
2024-12-14 22:42:43 +01:00
@@ -48,7 +_,7 @@
2021-05-16 05:30:45 +02:00
2024-12-14 22:42:43 +01:00
for (ServerPlayer serverPlayer : players) {
2021-05-16 05:30:45 +02:00
if (!source.getServer().isSingleplayerOwner(serverPlayer.getGameProfile())) {
- serverPlayer.connection.disconnect(reason);
+ serverPlayer.connection.disconnect(reason, org.bukkit.event.player.PlayerKickEvent.Cause.KICK_COMMAND); // Paper - kick event cause
source.sendSuccess(() -> Component.translatable("commands.kick.success", serverPlayer.getDisplayName(), reason), true);
i++;
}