From 08b325e37d11f6eb16628e2506b7de4f8e77666b Mon Sep 17 00:00:00 2001 From: RedstoneFuture Date: Tue, 4 Jul 2023 18:44:45 +0200 Subject: [PATCH] feat: improvement of kick messages (#4099) * Adding new player_not_in_plot message * Adding new cannot_kick_player message * Small typo * Rejection: renaming of the player placeholder --- Core/src/main/java/com/plotsquared/core/command/Kick.java | 8 ++++---- Core/src/main/resources/lang/messages_en.json | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) 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 a9de323e8..cf91f9ad2 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Kick.java +++ b/Core/src/main/java/com/plotsquared/core/command/Kick.java @@ -112,15 +112,15 @@ public class Kick extends SubCommand { for (PlotPlayer player2 : players) { if (!plot.equals(player2.getCurrentPlot())) { player.sendMessage( - TranslatableCaption.of("errors.invalid_player"), - TagResolver.resolver("value", Tag.inserting(Component.text(args[0]))) + TranslatableCaption.of("kick.player_not_in_plot"), + TagResolver.resolver("player", Tag.inserting(Component.text(player2.getName()))) ); return; } if (player2.hasPermission(Permission.PERMISSION_ADMIN_ENTRY_DENIED)) { player.sendMessage( - TranslatableCaption.of("cluster.cannot_kick_player"), - TagResolver.resolver("name", Tag.inserting(Component.text(player2.getName()))) + TranslatableCaption.of("kick.cannot_kick_player"), + TagResolver.resolver("player", Tag.inserting(Component.text(player2.getName()))) ); return; } diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index e863909f1..9434ab814 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -41,7 +41,7 @@ "cluster.cluster_deleted": "Successfully deleted the cluster .", "cluster.cluster_resized": "Successfully resized the cluster.", "cluster.cluster_added_user": "Successfully added user to the cluster.", - "cluster.cannot_kick_player": "You cannot kick that player: ", + "cluster.cannot_kick_player": "You cannot kick the player .", "cluster.cluster_invited": "You have been invited to the following cluster: .", "cluster.cluster_removed": "You have been removed from cluster: .", "cluster.cluster_kicked_user": "Successfully kicked the user from the cluster.", @@ -411,6 +411,8 @@ "deny.no_enter": "You are denied from the plot and therefore not allowed to enter.", "deny.you_got_denied": "You are denied from the plot you were previously on, and got teleported to spawn.", "deny.cant_remove_owner": "You can't remove the plot owner.", + "kick.player_not_in_plot": "The player is not on this plot.", + "kick.cannot_kick_player": "You cannot kick the player .", "kick.you_got_kicked": "You got kicked from the plot!", "trusted.trusted_added": "You successfully trusted a user to the plot.", "trusted.plot_removed_user": "Plot of which you were added to has been deleted due to owner inactivity.",