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
This commit is contained in:
RedstoneFuture 2023-07-04 18:44:45 +02:00 committed by GitHub
parent c394108ba6
commit 08b325e37d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -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;
}

View File

@ -41,7 +41,7 @@
"cluster.cluster_deleted": "<prefix><dark_aqua>Successfully deleted the cluster </dark_aqua><gold><cluster></gold><dark_aqua>.</dark_aqua>",
"cluster.cluster_resized": "<prefix><dark_aqua>Successfully resized the cluster.</dark_aqua>",
"cluster.cluster_added_user": "<prefix><dark_aqua>Successfully added user to the cluster.</dark_aqua>",
"cluster.cannot_kick_player": "<prefix><red>You cannot kick that player: </red><gray><name></gray>",
"cluster.cannot_kick_player": "<prefix><red>You cannot kick the player <gray><name></gray>.</red>",
"cluster.cluster_invited": "<prefix><gold>You have been invited to the following cluster: </gold><gray><cluster>.</gray>",
"cluster.cluster_removed": "<prefix><gold>You have been removed from cluster: </gold><gray><cluster>.</gray>",
"cluster.cluster_kicked_user": "<prefix><dark_aqua>Successfully kicked the user from the cluster.</dark_aqua>",
@ -411,6 +411,8 @@
"deny.no_enter": "<prefix><red>You are denied from the plot <red><gold><plot></gold><red> and therefore not allowed to enter.</red>",
"deny.you_got_denied": "<prefix><red>You are denied from the plot you were previously on, and got teleported to spawn.</red>",
"deny.cant_remove_owner": "<prefix><red>You can't remove the plot owner.</red>",
"kick.player_not_in_plot": "<prefix><red>The player <gray><player></gray> is not on this plot.</red>",
"kick.cannot_kick_player": "<prefix><red>You cannot kick the player <gray><player></gray>.</red>",
"kick.you_got_kicked": "<prefix><dark_aqua>You got kicked from the plot!</dark_aqua>",
"trusted.trusted_added": "<prefix><dark_aqua>You successfully trusted a user to the plot.</dark_aqua>",
"trusted.plot_removed_user": "<prefix><red>Plot <plot> of which you were added to has been deleted due to owner inactivity.</red>",