From cc48f273c00f84205cc2042262b519127d2d0ae0 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 20 May 2021 21:59:05 +0200 Subject: [PATCH] Fixes #3057 Actually execute a kick from server if ordered --- Core/src/main/java/com/plotsquared/core/command/Deny.java | 4 +++- Core/src/main/java/com/plotsquared/core/command/Kick.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Deny.java b/Core/src/main/java/com/plotsquared/core/command/Deny.java index 551101139..5a28bf392 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Deny.java +++ b/Core/src/main/java/com/plotsquared/core/command/Deny.java @@ -180,7 +180,9 @@ public class Deny extends SubCommand { Location newSpawn = this.worldUtil.getSpawn(this.plotAreaManager.getAllWorlds()[0]); if (plot.equals(newSpawn.getPlot())) { // Kick from server if you can't be teleported to spawn - player.sendMessage(TranslatableCaption.of("deny.you_got_denied")); + // Use string based message here for legacy uses + player.kick("You got kicked from the plot! This server did not set up a loaded spawn, so you got " + + "kicked from the server."); } else { player.teleport(newSpawn); } diff --git a/Core/src/main/java/com/plotsquared/core/command/Kick.java b/Core/src/main/java/com/plotsquared/core/command/Kick.java index a4d40c96c..2b565ff51 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Kick.java +++ b/Core/src/main/java/com/plotsquared/core/command/Kick.java @@ -138,7 +138,9 @@ public class Kick extends SubCommand { Location newSpawn = this.worldUtil.getSpawn(this.plotAreaManager.getAllWorlds()[0]); if (plot.equals(newSpawn.getPlot())) { // Kick from server if you can't be teleported to spawn - player2.sendMessage(TranslatableCaption.of("kick.you_got_kicked")); + // Use string based message here for legacy uses + player2.kick("You got kicked from the plot! This server did not set up a loaded spawn, so you got " + + "kicked from the server."); } else { player2.plotkick(newSpawn); }