mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fixes #3073
- Also add new caption if attempting to clear an empty alias
This commit is contained in:
parent
b1fc17e045
commit
dc7e6010cb
@ -179,11 +179,18 @@ public class Alias extends SubCommand {
|
||||
}
|
||||
|
||||
private boolean removeAlias(PlotPlayer<?> player, Plot plot) {
|
||||
String alias = plot.getAlias();
|
||||
if (!plot.getAlias().isEmpty()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("alias.alias_removed"),
|
||||
Template.of("alias", alias)
|
||||
);
|
||||
} else {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("alias.no_alias_set")
|
||||
);
|
||||
}
|
||||
plot.setAlias(null);
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ALIAS_REMOVE))
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -182,10 +182,11 @@
|
||||
"reload.reload_failed": "<prefix><red>Failed to reload file configurations.</red>",
|
||||
"desc.desc_set": "<prefix><gray>Plot description set.</gray>",
|
||||
"desc.desc_unset": "<prefix><gray>Plot description unset.</gray>",
|
||||
"alias.alias_set_to": "<prefix><gray>Plot alias set to </gray><gold><alias></gold><gray>.</gray>",
|
||||
"alias.alias_removed": "<prefix><gray>Plot alias removed.</gray>",
|
||||
"alias.alias_set_to": "<prefix><dark_aqua>Plot alias set to </dark_aqua><gold><alias></gold><dark_aqua>.</dark_aqua>",
|
||||
"alias.alias_removed": "<prefix><dark_aqua>Plot alias </dark_aqua><gold><alias></gold><dark_aqua> removed.</dark_aqua>",
|
||||
"alias.alias_too_long": "<prefix><red>The alias must have less than 50 characters in length.</red>",
|
||||
"alias.alias_is_taken": "<prefix><red>That alias is already taken.</red>",
|
||||
"alias.no_alias_set": "<prefix><red>No plot alias set.</red>",
|
||||
"position.position_set": "<prefix><gold>Home position set to your current location.</gold>",
|
||||
"position.position_unset": "<prefix><gold>Home position reset to the default location.</gold>",
|
||||
"permission.no_schematic_permission": "<prefix><red>You don't have the permission required to use schematic </red><gold><value></gold><red>.</red>",
|
||||
|
Loading…
Reference in New Issue
Block a user