mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
Enhance alias message with placeholders
This commit is contained in:
parent
c146d6207d
commit
c509882a18
@ -154,7 +154,10 @@ public class Alias extends SubCommand {
|
|||||||
if (PlotQuery.newQuery().inArea(plot.getArea())
|
if (PlotQuery.newQuery().inArea(plot.getArea())
|
||||||
.withAlias(alias)
|
.withAlias(alias)
|
||||||
.anyMatch()) {
|
.anyMatch()) {
|
||||||
player.sendMessage(TranslatableCaption.of("alias.alias_is_taken"));
|
player.sendMessage(
|
||||||
|
TranslatableCaption.of("alias.alias_is_taken"),
|
||||||
|
Template.of("alias", alias)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.UUID.OFFLINE) {
|
if (Settings.UUID.OFFLINE) {
|
||||||
@ -166,7 +169,10 @@ public class Alias extends SubCommand {
|
|||||||
if (throwable instanceof TimeoutException) {
|
if (throwable instanceof TimeoutException) {
|
||||||
player.sendMessage(TranslatableCaption.of("players.fetching_players_timeout"));
|
player.sendMessage(TranslatableCaption.of("players.fetching_players_timeout"));
|
||||||
} else if (uuid != null) {
|
} else if (uuid != null) {
|
||||||
player.sendMessage(TranslatableCaption.of("alias.alias_is_taken"));
|
player.sendMessage(
|
||||||
|
TranslatableCaption.of("alias.alias_is_taken"),
|
||||||
|
Template.of("alias", alias)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
plot.setAlias(alias);
|
plot.setAlias(alias);
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
|
@ -170,7 +170,10 @@ public class Cluster extends SubCommand {
|
|||||||
// check if name is taken
|
// check if name is taken
|
||||||
String name = args[1];
|
String name = args[1];
|
||||||
if (area.getCluster(name) != null) {
|
if (area.getCluster(name) != null) {
|
||||||
player.sendMessage(TranslatableCaption.of("alias.alias_is_taken"));
|
player.sendMessage(
|
||||||
|
TranslatableCaption.of("alias.alias_is_taken"),
|
||||||
|
Template.of("alias", name)
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (pos2.getX() < pos1.getX() || pos2.getY() < pos1.getY()) {
|
if (pos2.getX() < pos1.getX() || pos2.getY() < pos1.getY()) {
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
"alias.alias_set_to": "<prefix><dark_aqua>Plot alias set to </dark_aqua><gold><alias></gold><dark_aqua>.</dark_aqua>",
|
"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_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_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.alias_is_taken": "<prefix><red>That alias </red><gold><alias></gold><red> is already taken.</red>",
|
||||||
"alias.no_alias_set": "<prefix><red>No plot alias set.</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_set": "<prefix><gold>Home position set to your current location.</gold>",
|
||||||
"position.position_unset": "<prefix><gold>Home position reset to the default location.</gold>",
|
"position.position_unset": "<prefix><gold>Home position reset to the default location.</gold>",
|
||||||
|
Loading…
Reference in New Issue
Block a user