mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
Added specific success messages for Island(Re)SetnameCommand
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1164
This commit is contained in:
parent
8630c326a5
commit
6c5df58e2c
@ -39,7 +39,7 @@ public class IslandResetnameCommand extends CompositeCommand {
|
||||
// Resets the island name
|
||||
getIslands().getIsland(getWorld(), playerUUID).setName(null);
|
||||
|
||||
user.sendMessage("general.success");
|
||||
user.sendMessage("commands.island.resetname.success");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ public class IslandSetnameCommand extends CompositeCommand {
|
||||
String name = String.join(" ", args);
|
||||
|
||||
// Check if the name isn't too short or too long
|
||||
if (name.length() < getSettings().getNameMinLength()) {
|
||||
user.sendMessage("commands.island.setname.name-too-short", TextVariables.NUMBER, String.valueOf(getSettings().getNameMinLength()));
|
||||
if (name.length() < getSettings().getNameMinLength() || ChatColor.stripColor(name).isEmpty()) {
|
||||
user.sendMessage("commands.island.setname.name-too-short", TextVariables.NUMBER, String.valueOf(getSettings().getNameMinLength()));
|
||||
return false;
|
||||
}
|
||||
if (name.length() > getSettings().getNameMaxLength()) {
|
||||
@ -72,7 +72,7 @@ public class IslandSetnameCommand extends CompositeCommand {
|
||||
|
||||
// Everything's good!
|
||||
getIslands().getIsland(getWorld(), playerUUID).setName(name);
|
||||
user.sendMessage("general.success");
|
||||
user.sendMessage("commands.island.setname.success", TextVariables.NAME, name);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -497,8 +497,10 @@ commands:
|
||||
name-too-long: "&c Too long. Maximum size is [number] characters."
|
||||
name-already-exists: "&c There is already an island with that name in this gamemode."
|
||||
parameters: "<name>"
|
||||
success: "&a Successfully set your island's name to &b [name]&a ."
|
||||
resetname:
|
||||
description: "reset your island name"
|
||||
success: "&a Successfully reset your island name."
|
||||
team:
|
||||
description: "manage your team"
|
||||
info:
|
||||
|
Loading…
Reference in New Issue
Block a user