Fix /plot cluster sethome triggering usage message

Enhance cluster messages a bit
This commit is contained in:
NotMyFault 2021-05-07 01:18:33 +02:00
parent 78655102b9
commit 8bfdf8ecf2
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 22 additions and 12 deletions

View File

@ -67,7 +67,9 @@ public class Cluster extends SubCommand {
// list, create, delete, resize, invite, kick, leave, helpers, tp, sethome
if (args.length == 0) {
// return arguments
player.sendMessage(TranslatableCaption.of("cluster.cluster_available_args"));
player.sendMessage(TranslatableCaption.of("cluster.cluster_available_args"),
Template.of("list", "<dark_aqua>list</dark_aqua><gray>, </gray><dark_aqua>create</dark_aqua><gray>, </gray><dark_aqua>delete</dark_aqua><gray>, </gray><dark_aqua>resize</dark_aqua><gray>, </gray><dark_aqua>invite</dark_aqua><gray>, </gray><dark_aqua>kick</dark_aqua><gray>, </gray><dark_aqua>leave</dark_aqua><gray>, </gray><dark_aqua>members</dark_aqua><gray>, </gray><dark_aqua>info</dark_aqua><gray>, </gray><dark_aqua>tp</dark_aqua><gray>, </gray><dark_aqua>sethome</dark_aqua>")
);
return false;
}
String sub = args[0].toLowerCase();
@ -241,7 +243,10 @@ public class Cluster extends SubCommand {
}
}
}
player.sendMessage(TranslatableCaption.of("cluster.cluster_added"));
player.sendMessage(
TranslatableCaption.of("cluster.cluster_created"),
Template.of("name", name)
);
return true;
}
case "disband":
@ -294,7 +299,8 @@ public class Cluster extends SubCommand {
}
}
DBFunc.delete(cluster);
player.sendMessage(TranslatableCaption.of("cluster.cluster_deleted"), Template.of("cluster",
player.sendMessage(TranslatableCaption.of("cluster.cluster_deleted"), Template.of(
"cluster",
String.valueOf(cluster)
));
return true;
@ -797,7 +803,7 @@ public class Cluster extends SubCommand {
}
case "sh":
case "setspawn":
case "sethome":
case "sethome": {
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_SETHOME)) {
player.sendMessage(
TranslatableCaption.of("permission.no_permission"),
@ -840,8 +846,12 @@ public class Cluster extends SubCommand {
relative.getX() + "," + relative.getY() + "," + relative.getZ()
);
player.sendMessage(TranslatableCaption.of("position.position_set"));
return true;
}
}
player.sendMessage(TranslatableCaption.of("cluster.cluster_available_args"));
player.sendMessage(TranslatableCaption.of("cluster.cluster_available_args"),
Template.of("list", "<dark_aqua>list</dark_aqua><gray>, </gray><dark_aqua>create</dark_aqua><gray>, </gray><dark_aqua>delete</dark_aqua><gray>, </gray><dark_aqua>resize</dark_aqua><gray>, </gray><dark_aqua>invite</dark_aqua><gray>, </gray><dark_aqua>kick</dark_aqua><gray>, </gray><dark_aqua>leave</dark_aqua><gray>, </gray><dark_aqua>members</dark_aqua><gray>, </gray><dark_aqua>info</dark_aqua><gray>, </gray><dark_aqua>tp</dark_aqua><gray>, </gray><dark_aqua>sethome</dark_aqua>")
);
return false;
}

View File

@ -28,16 +28,16 @@
"web.load_list": "<prefix><gray>To load a schematic, use </gray><gold><command></gold><gray>.</gray>",
"web.save_success": "<prefix><gold>Successfully saved!</gold>",
"compass.compass_target": "<prefix><dark_aqua>Successfully targeted plot with your compass.</dark_aqua>",
"cluster.cluster_available_args": "<prefix><gold>The following sub commands are available: </gold><dark_aqua>list</dark_aqua><gray>, </gray><dark_aqua>create</dark_aqua><gray>, </gray><dark_aqua>delete</dark_aqua><gray>, </gray><dark_aqua>resize</dark_aqua><gray>, </gray><dark_aqua>invite</dark_aqua><gray>, </gray><dark_aqua>kick</dark_aqua><gray>, </gray><dark_aqua>leave</dark_aqua><gray>, </gray><dark_aqua>members</dark_aqua><gray>, </gray><dark_aqua>info</dark_aqua><gray>, </gray><dark_aqua>tp</dark_aqua><gray>, </gray><dark_aqua>sethome</dark_aqua>",
"cluster.cluster_list_heading": "<prefix><gray>There are </gray><gold><amount></gold><gray> clusters in this world.</gray>",
"cluster.cluster_available_args": "<prefix><gold>The following sub commands are available: </gold><list>",
"cluster.cluster_list_heading": "<prefix><gray>There are </gray><gold><amount></gold><gray> cluster(s) in this world.</gray>",
"cluster.cluster_list_element": "<prefix><gray> - </gray><gold><cluster></gold>\n",
"cluster.cluster_list_element_owner": "<prefix><gray> - </gray><green><cluster></green>\n",
"cluster.cluster_list_element_helpers": "<prefix><gray> - </gray><dark_aqua><cluster></dark_aqua>\n",
"cluster.cluster_list_element_invited": "<prefix><gray> - </gray><blue><cluster></blue>\n",
"cluster.cluster_intersection": "<prefix><gray>The proposed area overlaps with: <cluster></gray>",
"cluster.cluster_outside": "<prefix><gray>The proposed area is outside the plot area: <area></gray>",
"cluster.cluster_added": "<prefix><dark_aqua>Successfully created the cluster.</dark_aqua>",
"cluster.cluster_deleted": "<prefix><dark_aqua>Successfully deleted the cluster <cluster>.</dark_aqua>",
"cluster.cluster_created": "<prefix><dark_aqua>Successfully created the cluster </dark_aqua><gold><name></gold><dark_aqua>.</dark_aqua>",
"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>",
@ -352,11 +352,11 @@
"info.area_list_tooltip": "<gold>Claimed=</gold><gray><claimed></gray>\n<gold>Usage=</gold><gray><usage></gray>\n<gold>Clusters=</gold><gray><clusters></gray>\n<gold>Region=</gold><gray><region></gray>\n<gold>Generator=</gold><gray><generator></gray>",
"info.area_list_item": "<click:run_command:<command_tp>><hover:show_text:\"<command_tp>\"><dark_gray>[</dark_gray><gold><number></gold><dark_gray>]</dark_gray></hover></click> <click:run_command:<command_info>><hover:show_text:\"<hover_info>\"><gold><area_name></gold></hover></click><gray> - </gray><gray><area_type>:<area_terrain></gray>",
"working.generating_component": "<prefix><gold>Started generating component from your settings.</gold>",
"working.clearing_done": "<prefix><dark_aqua>Plot <plot> has been cleared! Took <amount>ms.</dark_aqua>",
"working.deleting_done": "<prefix><dark_aqua>Plot <plot> has been deleted! Took <amount>ms.</dark_aqua>",
"working.clearing_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><plot></gold><dark_aqua> has been cleared! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
"working.deleting_done": "<prefix><dark_aqua>Plot </dark_aqua><gold><plot></gold><dark_aqua> has been deleted! Took </dark_aqua><gold><amount>ms</gold><dark_aqua>.</dark_aqua>",
"working.plot_not_claimed": "<prefix><gray>Plot not claimed.</gray>",
"working.plot_is_claimed": "<prefix><gray>This plot is already claimed.</gray>",
"working.claimed": "<prefix><dark_aqua>You successfully claimed the plot <plot>.</dark_aqua>",
"working.claimed": "<prefix><dark_aqua>You successfully claimed the plot </dark_aqua><gold><plot></gold><dark_aqua>.</dark_aqua>",
"working.progress": "<prefix><gray>Current progress: </gray><gold><progress></gold><gray>%</gray>",
"working.component_complete": "<prefix><gold>Component generation has finished for plot <plot>.</gold>",
"list.comment_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> comment(s):</gold>",