mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-25 17:08:32 +01:00
refactor: Use player friendly done message on restricted building (#3309)
This commit is contained in:
parent
7263290bbe
commit
48c7a3e94e
@ -318,8 +318,7 @@ public class BlockEventListener implements Listener {
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -401,8 +400,7 @@ public class BlockEventListener implements Listener {
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_DESTROY_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
@ -985,8 +985,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
||||
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
@ -1258,8 +1257,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -1332,8 +1330,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -178,8 +178,7 @@ public class BukkitEntityUtil {
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", String.valueOf(Permission.PERMISSION_ADMIN_BUILD_OTHER))
|
||||
TranslatableCaption.of("done.building_restricted")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
@ -94,6 +94,7 @@
|
||||
"done.done_insufficient_complexity": "<prefix><red>This plot is too simple. Please add more detail before using this command.</red>",
|
||||
"done.done_success": "<prefix><gold>Successfully marked this plot as done.</gold>",
|
||||
"done.done_removed": "<prefix><gray>You may now continue building in this plot.</gray>",
|
||||
"done.building_restricted": "<prefix><gray>You can't build on plots marked as done.</gray>",
|
||||
"ratings.ratings_purged": "<prefix><gray>Purged ratings for this plot.</gray>",
|
||||
"ratings.rating_not_valid": "<prefix><red>You need to specify a number between 1 and 10.</red>",
|
||||
"ratings.rating_already_exists": "<prefix><gray>You have already rated plot <plot>.</gray>",
|
||||
|
Loading…
Reference in New Issue
Block a user