mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Refactor Captions to Permission, reimplement message list in debug command
This commit is contained in:
parent
50cfecb3fd
commit
21a97863ac
@ -28,7 +28,7 @@ package com.plotsquared.bukkit.listener;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.plotsquared.bukkit.player.BukkitPlayer;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
@ -112,7 +112,7 @@ public class ForceFieldListener {
|
||||
Set<PlotPlayer> players = getNearbyPlayers(player, plot);
|
||||
for (PlotPlayer oPlayer : players) {
|
||||
if (!Permissions
|
||||
.hasPermission(oPlayer, Captions.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
|
||||
.hasPermission(oPlayer, Permission.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
|
||||
((BukkitPlayer) oPlayer).player
|
||||
.setVelocity(calculateVelocity(plotPlayer, oPlayer));
|
||||
}
|
||||
@ -123,7 +123,7 @@ public class ForceFieldListener {
|
||||
return;
|
||||
}
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_ENTRY_FORCEFIELD)) {
|
||||
player.setVelocity(calculateVelocity(oPlayer, plotPlayer));
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import com.plotsquared.bukkit.player.BukkitPlayer;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.bukkit.util.UpdateUtility;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -539,14 +539,14 @@ import java.util.regex.Pattern;
|
||||
if (shooter instanceof Player) {
|
||||
PlotPlayer<?> pp = BukkitUtil.adapt((Player) shooter);
|
||||
if (plot == null) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_PROJECTILE_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_PROJECTILE_UNOWNED)) {
|
||||
entity.remove();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (plot.isAdded(pp.getUUID()) || Permissions
|
||||
.hasPermission(pp, Captions.PERMISSION_PROJECTILE_OTHER)) {
|
||||
.hasPermission(pp, Permission.PERMISSION_PROJECTILE_OTHER)) {
|
||||
return true;
|
||||
}
|
||||
entity.remove();
|
||||
@ -594,7 +594,7 @@ import java.util.regex.Pattern;
|
||||
case "worldedit:up":
|
||||
case "worldedit:/up":
|
||||
if (plot == null || (!plot.isAdded(plotPlayer.getUUID()) && !Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER, true))) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER, true))) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
@ -607,7 +607,7 @@ import java.util.regex.Pattern;
|
||||
plot.getFlag(BlockedCmdsFlag.class) :
|
||||
area.getFlag(BlockedCmdsFlag.class);
|
||||
if (!blockedCommands.isEmpty() && !Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS)) {
|
||||
String part = parts[0];
|
||||
if (parts[0].contains(":")) {
|
||||
part = parts[0].split(":")[1];
|
||||
@ -706,7 +706,7 @@ import java.util.regex.Pattern;
|
||||
this.eventDispatcher.doJoinTask(pp);
|
||||
}, TaskTime.seconds(1L));
|
||||
|
||||
if (pp.hasPermission(Captions.PERMISSION_ADMIN_UPDATE_NOTIFICATION.getTranslated())
|
||||
if (pp.hasPermission(Permission.PERMISSION_ADMIN_UPDATE_NOTIFICATION.getTranslated())
|
||||
&& Settings.Enabled_Components.UPDATE_NOTIFICATIONS && PremiumVerification.isPremium()
|
||||
&& UpdateUtility.hasUpdate) {
|
||||
new PlotMessage("-----------------------------------").send(pp);
|
||||
@ -1021,7 +1021,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
if (plot.isDenied(plotPlayer.getUUID()) && !Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_CHAT_BYPASS)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_CHAT_BYPASS)) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
@ -1075,7 +1075,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
|
||||
if (event.getBlock().getY() == 0) {
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_GROUNDLEVEL)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.groundlevel")
|
||||
@ -1085,7 +1085,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
} else if ((location.getY() > area.getMaxBuildHeight() || location.getY() < area
|
||||
.getMinBuildHeight()) && !Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||
event.setCancelled(true);
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("height.height_limit"),
|
||||
@ -1094,7 +1094,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_UNOWNED, true)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED, true)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
@ -1109,7 +1109,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
}
|
||||
if (Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
return;
|
||||
}
|
||||
plotPlayer.sendMessage(
|
||||
@ -1118,7 +1118,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
event.setCancelled(true);
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -1130,7 +1130,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
BukkitPlayer pp = BukkitUtil.adapt(player);
|
||||
if (Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
return;
|
||||
}
|
||||
if (this.worldEdit!= null && pp.getAttribute("worldedit")) {
|
||||
@ -1216,7 +1216,7 @@ import java.util.regex.Pattern;
|
||||
plotExit(pp, plot);
|
||||
}
|
||||
if (this.worldEdit != null) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_WORLDEDIT_BYPASS)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_WORLDEDIT_BYPASS)) {
|
||||
if (pp.getAttribute("worldedit")) {
|
||||
pp.removeAttribute("worldedit");
|
||||
}
|
||||
@ -1399,7 +1399,7 @@ import java.util.regex.Pattern;
|
||||
if (!plot.hasOwner()) {
|
||||
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
|
||||
if (Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
@ -1412,7 +1412,7 @@ import java.util.regex.Pattern;
|
||||
if (destroy
|
||||
.contains(BlockTypeWrapper.get(BukkitAdapter.asBlockType(block.getType())))
|
||||
|| Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
return;
|
||||
}
|
||||
plot.debug(player.getName() + " could not break " + block.getType()
|
||||
@ -1423,7 +1423,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
|
||||
if (Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
@ -1820,7 +1820,7 @@ import java.util.regex.Pattern;
|
||||
if (plot != null) {
|
||||
if (plot.getFlag(PreventCreativeCopyFlag.class) && !plot
|
||||
.isAdded(player.getUniqueId()) && !Permissions
|
||||
.hasPermission(pp, Captions.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||
.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||
final ItemStack newStack =
|
||||
new ItemStack(newItem.getType(), newItem.getAmount());
|
||||
event.setCursor(newStack);
|
||||
@ -1968,7 +1968,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
} else {
|
||||
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -2360,7 +2360,7 @@ import java.util.regex.Pattern;
|
||||
if (player != null) {
|
||||
BukkitPlayer pp = BukkitUtil.adapt(player);
|
||||
if (plot == null) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.road")
|
||||
@ -2368,7 +2368,7 @@ import java.util.regex.Pattern;
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.unowned")
|
||||
@ -2376,7 +2376,7 @@ import java.util.regex.Pattern;
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (!plot.isAdded(pp.getUUID())) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -2444,7 +2444,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer pp = BukkitUtil.adapt(event.getPlayer());
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot == null) {
|
||||
if (Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
return;
|
||||
}
|
||||
pp.sendMessage(
|
||||
@ -2453,7 +2453,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
event.setCancelled(true);
|
||||
} else if (!plot.hasOwner()) {
|
||||
if (Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
return;
|
||||
}
|
||||
pp.sendMessage(
|
||||
@ -2469,7 +2469,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
return;
|
||||
}
|
||||
pp.sendMessage(
|
||||
@ -2478,7 +2478,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
event.setCancelled(true);
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -2517,7 +2517,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer plotPlayer = BukkitUtil.adapt(player);
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot == null) {
|
||||
if (Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
return;
|
||||
}
|
||||
plotPlayer.sendMessage(
|
||||
@ -2526,7 +2526,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
event.setCancelled(true);
|
||||
} else if (!plot.hasOwner()) {
|
||||
if (Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
return;
|
||||
}
|
||||
plotPlayer.sendMessage(
|
||||
@ -2543,7 +2543,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
return;
|
||||
}
|
||||
plotPlayer.sendMessage(
|
||||
@ -2552,7 +2552,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
event.setCancelled(true);
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -2597,7 +2597,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer pp = BukkitUtil.adapt(p);
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot == null) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.road")
|
||||
@ -2606,7 +2606,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
} else {
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.unwoned")
|
||||
@ -2617,7 +2617,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
if (!plot.isAdded(pp.getUUID())) {
|
||||
if (!plot.getFlag(HangingPlaceFlag.class)) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -2647,7 +2647,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer pp = BukkitUtil.adapt(p);
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot == null) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.road")
|
||||
@ -2655,7 +2655,7 @@ import java.util.regex.Pattern;
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.unowned")
|
||||
@ -2666,7 +2666,7 @@ import java.util.regex.Pattern;
|
||||
if (plot.getFlag(HangingBreakFlag.class)) {
|
||||
return;
|
||||
}
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.other")
|
||||
@ -2690,7 +2690,7 @@ import java.util.regex.Pattern;
|
||||
if (plot != null) {
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_UNOWNED)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.unowned")
|
||||
@ -2700,7 +2700,7 @@ import java.util.regex.Pattern;
|
||||
} else if (!plot.isAdded(player.getUUID())) {
|
||||
if (!plot.getFlag(HangingBreakFlag.class)) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_DESTROY_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.destroy.other")
|
||||
@ -2729,7 +2729,7 @@ import java.util.regex.Pattern;
|
||||
BukkitPlayer pp = BukkitUtil.adapt(p);
|
||||
Plot plot = area.getPlot(location);
|
||||
if (plot == null && !area.isRoadFlags()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_INTERACT_ROAD)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_ROAD)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.interact.road")
|
||||
@ -2737,7 +2737,7 @@ import java.util.regex.Pattern;
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (plot != null && !plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_UNOWNED)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.interact.unowned")
|
||||
@ -2795,7 +2795,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.interact.other")
|
||||
@ -3026,7 +3026,7 @@ import java.util.regex.Pattern;
|
||||
.isAdded(plotPlayer.getUUID()))) {
|
||||
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions
|
||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
plotPlayer.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -3235,7 +3235,7 @@ import java.util.regex.Pattern;
|
||||
if (plot != null) {
|
||||
if ((location.getY() > area.getMaxBuildHeight() || location.getY() < area
|
||||
.getMinBuildHeight()) && !Permissions
|
||||
.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||
.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||
event.setCancelled(true);
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("height.height_limit"),
|
||||
@ -3243,7 +3243,7 @@ import java.util.regex.Pattern;
|
||||
);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_UNOWNED)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -3260,7 +3260,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -3271,7 +3271,7 @@ import java.util.regex.Pattern;
|
||||
return;
|
||||
}
|
||||
} else if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||
if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_OTHER)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
@ -3288,7 +3288,7 @@ import java.util.regex.Pattern;
|
||||
+ " did not fall because of disable-physics = true");
|
||||
}
|
||||
}
|
||||
} else if (!Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
} else if (!Permissions.hasPermission(pp, Permission.PERMISSION_ADMIN_BUILD_ROAD)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
Template.of("node", "plots.admin.build.other")
|
||||
|
@ -28,7 +28,7 @@ package com.plotsquared.bukkit.player;
|
||||
import com.google.common.base.Charsets;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
import com.plotsquared.core.location.Location;
|
||||
@ -162,15 +162,15 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
|
||||
@Override @Nonnegative public int hasPermissionRange(@Nonnull final String stub,
|
||||
@Nonnegative final int range) {
|
||||
if (hasPermission(Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||
if (hasPermission(Permission.PERMISSION_ADMIN.getTranslated())) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
final String[] nodes = stub.split("\\.");
|
||||
final StringBuilder n = new StringBuilder();
|
||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||
n.append(nodes[i]).append(".");
|
||||
if (!stub.equals(n + Captions.PERMISSION_STAR.getTranslated())) {
|
||||
if (hasPermission(n + Captions.PERMISSION_STAR.getTranslated())) {
|
||||
if (!stub.equals(n + Permission.PERMISSION_STAR.getTranslated())) {
|
||||
if (hasPermission(n + Permission.PERMISSION_STAR.getTranslated())) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -69,7 +69,7 @@ public class Add extends Command {
|
||||
final Plot plot = check(player.getCurrentPlot(), TranslatableCaption.of("errors.not_in_plot"));
|
||||
checkTrue(plot.hasOwner(), TranslatableCaption.of("info.plot_unowned"));
|
||||
checkTrue(plot.isOwner(player.getUUID()) || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
TranslatableCaption.of("permission.no_plot_perms"));
|
||||
checkTrue(args.length == 1, TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot add <player | *>"));
|
||||
@ -93,8 +93,8 @@ public class Add extends Command {
|
||||
while (iterator.hasNext()) {
|
||||
UUID uuid = iterator.next();
|
||||
if (uuid == DBFunc.EVERYONE && !(
|
||||
Permissions.hasPermission(player, Captions.PERMISSION_TRUST_EVERYONE) || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
||||
Permissions.hasPermission(player, Permission.PERMISSION_TRUST_EVERYONE) || Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
||||
player.sendMessage(TranslatableCaption.of("errors.invalid_player"),
|
||||
Template.of("value", PlayerManager.getName(uuid)));
|
||||
iterator.remove();
|
||||
@ -115,7 +115,7 @@ public class Add extends Command {
|
||||
size += plot.getTrusted().contains(uuid) ? 0 : 1;
|
||||
}
|
||||
checkTrue(!uuids.isEmpty(), null);
|
||||
checkTrue(size <= plot.getArea().getMaxPlotMembers() || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
checkTrue(size <= plot.getArea().getMaxPlotMembers() || Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
TranslatableCaption.of("members.plot_max_members"));
|
||||
// Success
|
||||
confirm.run(this, () -> {
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -84,9 +84,9 @@ public class Alias extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
|
||||
permission = isPermitted(player, Captions.PERMISSION_ALIAS_SET)
|
||||
|| isPermitted(player, Captions.PERMISSION_ALIAS_SET_OBSOLETE);
|
||||
admin = isPermitted(player, Captions.PERMISSION_ADMIN_ALIAS_SET);
|
||||
permission = isPermitted(player, Permission.PERMISSION_ALIAS_SET)
|
||||
|| isPermitted(player, Permission.PERMISSION_ALIAS_SET_OBSOLETE);
|
||||
admin = isPermitted(player, Permission.PERMISSION_ADMIN_ALIAS_SET);
|
||||
if (!admin && !owner) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
@ -101,8 +101,8 @@ public class Alias extends SubCommand {
|
||||
|
||||
break;
|
||||
case "remove":
|
||||
permission = isPermitted(player, Captions.PERMISSION_ALIAS_REMOVE);
|
||||
admin = isPermitted(player, Captions.PERMISSION_ADMIN_ALIAS_REMOVE);
|
||||
permission = isPermitted(player, Permission.PERMISSION_ALIAS_REMOVE);
|
||||
admin = isPermitted(player, Permission.PERMISSION_ADMIN_ALIAS_REMOVE);
|
||||
if (!admin && !owner) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
@ -172,7 +172,7 @@ public class Alias extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isPermitted(PlotPlayer<?> player, Captions caption) {
|
||||
return Permissions.hasPermission(player, caption);
|
||||
private boolean isPermitted(PlotPlayer<?> player, Permission permission) {
|
||||
return Permissions.hasPermission(player, permission);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.ConfigurationUtil;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
|
@ -29,7 +29,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -285,7 +285,7 @@ public class Auto extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
if (!force && !Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_CLAIM_SCHEMATIC.getTranslated(), schematic))
|
||||
.format(player, Permission.PERMISSION_CLAIM_SCHEMATIC.toString(), schematic))
|
||||
&& !Permissions
|
||||
.hasPermission(player, "plots.admin.command.schematic")) {
|
||||
player.sendMessage(
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotFlagRemoveEvent;
|
||||
import com.plotsquared.core.events.Result;
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -127,7 +127,7 @@ public class Claim extends SubCommand {
|
||||
);
|
||||
}
|
||||
if (!Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_CLAIM_SCHEMATIC.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_CLAIM_SCHEMATIC.toString(),
|
||||
schematic)) && !Permissions.hasPermission(player, "plots.admin.command.schematic")
|
||||
&& !force) {
|
||||
player.sendMessage(
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.backup.BackupManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotFlagRemoveEvent;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
@ -210,7 +210,7 @@ public class Cluster extends SubCommand {
|
||||
current = player.getPlayerClusterCount(player.getLocation().getWorldName());
|
||||
}
|
||||
int allowed = Permissions
|
||||
.hasPermissionRange(player, Captions.PERMISSION_CLUSTER_SIZE,
|
||||
.hasPermissionRange(player, Permission.PERMISSION_CLUSTER_SIZE,
|
||||
Settings.Limit.MAX_PLOTS);
|
||||
if (current + cluster.getArea() > allowed) {
|
||||
player.sendMessage(
|
||||
@ -238,7 +238,7 @@ public class Cluster extends SubCommand {
|
||||
case "disband":
|
||||
case "del":
|
||||
case "delete": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_DELETE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_DELETE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.delete")
|
||||
@ -276,7 +276,7 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
if (!cluster.owner.equals(player.getUUID())) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_DELETE_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_DELETE_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.delete.other"));
|
||||
@ -289,7 +289,7 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
case "res":
|
||||
case "resize": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_RESIZE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_RESIZE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.resize"));
|
||||
@ -329,7 +329,7 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
if (!cluster.hasHelperRights(player.getUUID())) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_RESIZE_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_RESIZE_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.resize.other"));
|
||||
@ -354,7 +354,7 @@ public class Cluster extends SubCommand {
|
||||
// Check expand / shrink
|
||||
if (!removed.isEmpty()) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_RESIZE_SHRINK)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_RESIZE_SHRINK)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.resize.shrink")
|
||||
@ -365,7 +365,7 @@ public class Cluster extends SubCommand {
|
||||
newPlots.removeAll(existing);
|
||||
if (!newPlots.isEmpty()) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_RESIZE_EXPAND)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_RESIZE_EXPAND)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.cluster.resize.expand")
|
||||
@ -381,7 +381,7 @@ public class Cluster extends SubCommand {
|
||||
current = player.getPlayerClusterCount(player.getLocation().getWorldName());
|
||||
}
|
||||
current -= cluster.getArea() + (1 + pos2.getX() - pos1.getX()) * (1 + pos2.getY() - pos1.getY());
|
||||
int allowed = Permissions.hasPermissionRange(player, Captions.PERMISSION_CLUSTER,
|
||||
int allowed = Permissions.hasPermissionRange(player, Permission.PERMISSION_CLUSTER,
|
||||
Settings.Limit.MAX_PLOTS);
|
||||
if (current + cluster.getArea() > allowed) {
|
||||
player.sendMessage(
|
||||
@ -424,10 +424,10 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
if (!cluster.hasHelperRights(player.getUUID())) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_INVITE_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_INVITE_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_INVITE_OTHER.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_INVITE_OTHER.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -464,10 +464,10 @@ public class Cluster extends SubCommand {
|
||||
case "k":
|
||||
case "remove":
|
||||
case "kick": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_KICK)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_KICK)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_KICK.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_KICK.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -489,10 +489,10 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
if (!cluster.hasHelperRights(player.getUUID())) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_KICK_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_KICK_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_KICK_OTHER.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_KICK_OTHER.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -546,10 +546,10 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
case "quit":
|
||||
case "leave": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_LEAVE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_LEAVE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_LEAVE.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_LEAVE.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -613,10 +613,10 @@ public class Cluster extends SubCommand {
|
||||
case "admin":
|
||||
case "helper":
|
||||
case "helpers": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_HELPERS)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_HELPERS)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_HELPERS.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_HELPERS.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -668,10 +668,10 @@ public class Cluster extends SubCommand {
|
||||
case "spawn":
|
||||
case "home":
|
||||
case "tp": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_TP)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_TP)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_TP.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_TP.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -697,10 +697,10 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
UUID uuid = player.getUUID();
|
||||
if (!cluster.isAdded(uuid)) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_TP_OTHER)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_TP_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_TP_OTHER.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_TP_OTHER.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -712,10 +712,10 @@ public class Cluster extends SubCommand {
|
||||
case "info":
|
||||
case "show":
|
||||
case "information": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_INFO)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_INFO)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_TP.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_TP.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -774,10 +774,10 @@ public class Cluster extends SubCommand {
|
||||
case "sh":
|
||||
case "setspawn":
|
||||
case "sethome":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_CLUSTER_SETHOME)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_SETHOME)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_SETHOME.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_SETHOME.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -799,10 +799,10 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
if (!cluster.hasHelperRights(player.getUUID())) {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_CLUSTER_SETHOME_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_CLUSTER_SETHOME_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_CLUSTER_SETHOME_OTHER.toString())
|
||||
Template.of("node", Permission.PERMISSION_CLUSTER_SETHOME_OTHER.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.LocaleHolder;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotFlagRemoveEvent;
|
||||
@ -61,7 +61,7 @@ public class Continue extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_CONTINUE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_CONTINUE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", TranslatableCaption.of("permission.no_plot_perms").getComponent(player))
|
||||
@ -77,7 +77,7 @@ public class Continue extends SubCommand {
|
||||
< player.getPlotCount() + size)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_ADMIN_COMMAND_CONTINUE.toString())
|
||||
Template.of("node", Permission.PERMISSION_ADMIN_COMMAND_CONTINUE.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -50,7 +50,7 @@ public class Copy extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN.toString())) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN.toString())) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
|
@ -27,9 +27,10 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.ConsolePlayer;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.util.RegionManager;
|
||||
@ -50,6 +51,7 @@ import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@CommandDeclaration(command = "debug",
|
||||
category = CommandCategory.DEBUG,
|
||||
@ -133,10 +135,11 @@ public class Debug extends SubCommand {
|
||||
});
|
||||
return true;
|
||||
}
|
||||
Set<TranslatableCaption> captions = PlotSquared.get().getCaptionMap(TranslatableCaption.DEFAULT_NAMESPACE).getCaptions().keySet();
|
||||
if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
for (Captions caption : Captions.values()) {
|
||||
msg.append(caption.getTranslated()).append("\n");
|
||||
for (Caption caption : captions) {
|
||||
msg.append(caption.getComponent(ConsolePlayer.getConsole())).append("\n");
|
||||
}
|
||||
player.sendMessage(StaticCaption.of(msg.toString()));
|
||||
return true;
|
||||
@ -152,8 +155,7 @@ public class Debug extends SubCommand {
|
||||
information.append(
|
||||
MINI_MESSAGE.parse(line, Template.of("var", "Owned Plots"), Template.of("val", String.valueOf(PlotQuery.newQuery().allPlots().count()))));
|
||||
information.append(MINI_MESSAGE.parse(section, Template.of("val", "Messages")));
|
||||
information
|
||||
.append(MINI_MESSAGE.parse(line, Template.of("var", "Total Messages"), Template.of("val", String.valueOf(Captions.values().length))));
|
||||
information.append(MINI_MESSAGE.parse(line, Template.of("var", "Total Messages"), Template.of("val", String.valueOf(captions.size()))));
|
||||
information.append(MINI_MESSAGE.parse(line, Template.of("var", "View all captions"), Template.of("val", "/plot debug msg")));
|
||||
player.sendMessage(StaticCaption.of(information.toString()));
|
||||
return true;
|
||||
|
@ -28,7 +28,7 @@ package com.plotsquared.core.command;
|
||||
import com.google.common.io.Files;
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.CaptionHolder;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
@ -198,7 +198,7 @@ public class DebugExec extends SubCommand {
|
||||
this.scope.put("MainCommand", MainCommand.getInstance());
|
||||
|
||||
// enums
|
||||
for (Enum<?> value : Captions.values()) {
|
||||
for (Enum<?> value : Permission.values()) {
|
||||
this.scope.put("C_" + value.name(), value);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.Result;
|
||||
@ -84,7 +84,7 @@ public class Delete extends SubCommand {
|
||||
}
|
||||
boolean force = eventResult == Result.FORCE;
|
||||
if (!force && !plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_DELETE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DELETE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.location.Location;
|
||||
@ -82,7 +82,7 @@ public class Deny extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_DENY)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DENY)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return true;
|
||||
}
|
||||
@ -98,8 +98,8 @@ public class Deny extends SubCommand {
|
||||
} else {
|
||||
for (UUID uuid : uuids) {
|
||||
if (uuid == DBFunc.EVERYONE && !(
|
||||
Permissions.hasPermission(player, Captions.PERMISSION_DENY_EVERYONE) || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_DENY))) {
|
||||
Permissions.hasPermission(player, Permission.PERMISSION_DENY_EVERYONE) || Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DENY))) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("errors.invalid_player"),
|
||||
Template.of("value", args[0])
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotDoneEvent;
|
||||
@ -80,7 +80,7 @@ public class Done extends SubCommand {
|
||||
}
|
||||
boolean force = event.getEventResult() == Result.FORCE;
|
||||
if (!force && !plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_DONE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DONE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
@ -82,12 +82,12 @@ public class Download extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if ((Settings.Done.REQUIRED_FOR_DOWNLOAD && (!DoneFlag.isDone(plot))) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_DOWNLOAD)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_DOWNLOAD)) {
|
||||
player.sendMessage(TranslatableCaption.of("done.done_not_done"));
|
||||
return false;
|
||||
}
|
||||
if ((!plot.isOwner(player.getUUID())) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN.toString())) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN.toString())) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
@ -119,10 +119,10 @@ public class Download extends SubCommand {
|
||||
});
|
||||
} else if (args.length == 1 && StringMan
|
||||
.isEqualIgnoreCaseToAny(args[0], "mcr", "world", "mca")) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_DOWNLOAD_WORLD)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_DOWNLOAD_WORLD)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_DOWNLOAD_WORLD.toString())
|
||||
Template.of("node", Permission.PERMISSION_DOWNLOAD_WORLD.toString())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
@ -96,7 +96,7 @@ public final class FlagCommand extends Command {
|
||||
key = key.toLowerCase();
|
||||
value = value.toLowerCase();
|
||||
String perm = CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY_VALUE.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY_VALUE.toString(),
|
||||
key.toLowerCase(), value.toLowerCase());
|
||||
if (flag instanceof IntegerFlag && MathMan.isInteger(value)) {
|
||||
try {
|
||||
@ -108,8 +108,8 @@ public final class FlagCommand extends Command {
|
||||
Settings.Limit.MAX_PLOTS;
|
||||
final boolean result = player.hasPermissionRange(perm, checkRange) >= numeric;
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY_VALUE.getTranslated(),
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY_VALUE.toString(),
|
||||
key.toLowerCase(), value.toLowerCase()));
|
||||
}
|
||||
return result;
|
||||
@ -122,12 +122,12 @@ public final class FlagCommand extends Command {
|
||||
PlotFlag<? extends List<?>, ?> parsedFlag = listFlag.parse(value);
|
||||
for (final Object entry : parsedFlag.getValue()) {
|
||||
final String permission = CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY_VALUE.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY_VALUE.toString(),
|
||||
key.toLowerCase(), entry.toString().toLowerCase());
|
||||
final boolean result = Permissions.hasPermission(player, permission);
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY_VALUE.getTranslated(),
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY_VALUE.toString(),
|
||||
key.toLowerCase(), value.toLowerCase()));
|
||||
return false;
|
||||
}
|
||||
@ -147,8 +147,8 @@ public final class FlagCommand extends Command {
|
||||
}
|
||||
final boolean result = Permissions.hasPermission(player, perm);
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY_VALUE.getTranslated(),
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY_VALUE.toString(),
|
||||
key.toLowerCase(), value.toLowerCase()));
|
||||
}
|
||||
return result;
|
||||
@ -171,7 +171,7 @@ public final class FlagCommand extends Command {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_SET_FLAG_OTHER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_SET_FLAG_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.set.flag.other")
|
||||
@ -441,11 +441,11 @@ public final class FlagCommand extends Command {
|
||||
boolean force = event.getEventResult() == Result.FORCE;
|
||||
flag = event.getFlag();
|
||||
if (!force && !Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY.toString(),
|
||||
args[0].toLowerCase()))) {
|
||||
if (args.length != 2) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_FLAG_KEY.getTranslated(),
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_SET_FLAG_KEY.toString(),
|
||||
args[0].toLowerCase()));
|
||||
return;
|
||||
}
|
||||
@ -481,7 +481,7 @@ public final class FlagCommand extends Command {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// MainUtil.sendMessage(player, Captions.FLAG_REMOVED);
|
||||
// MainUtil.sendMessage(player, Permission.FLAG_REMOVED);
|
||||
PlotFlag plotFlag = parsedFlag.createFlagInstance(list);
|
||||
PlotFlagAddEvent addEvent = new PlotFlagAddEvent(plotFlag, plot);
|
||||
if (addEvent.getEventResult() == Result.DENY) {
|
||||
|
@ -28,7 +28,7 @@ package com.plotsquared.core.command;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.player.MetaDataAccess;
|
||||
@ -67,9 +67,9 @@ public class Grant extends Command {
|
||||
case "add":
|
||||
case "check":
|
||||
if (!Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_GRANT.getTranslated(), arg0))) {
|
||||
Captions.NO_PERMISSION.send(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_GRANT.getTranslated(), arg0));
|
||||
.format(player, Permission.PERMISSION_GRANT.toString(), arg0))) {
|
||||
Permission.NO_PERMISSION.send(player, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_GRANT.toString(), arg0));
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
if (args.length > 2) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -104,11 +104,11 @@ public class HomeCommand extends Command {
|
||||
// /plot home <[area;]x;y>
|
||||
// /plot home <area> <x;y>
|
||||
// /plot home <area> <page>
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OWNED) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_HOME)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_OWNED) && !Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_HOME)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", Captions.PERMISSION_VISIT_OWNED.toString())
|
||||
Template.of("node", Permission.PERMISSION_VISIT_OWNED.toString())
|
||||
);
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
@ -99,7 +99,7 @@ public class Info extends SubCommand {
|
||||
for (final String argument : args) {
|
||||
if (argument.equalsIgnoreCase("-f")) {
|
||||
if (!player
|
||||
.hasPermission(Captions.PERMISSION_AREA_INFO_FORCE.toString())) {
|
||||
.hasPermission(Permission.PERMISSION_AREA_INFO_FORCE.toString())) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.area.info.force")
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.location.Location;
|
||||
@ -75,7 +75,7 @@ public class Kick extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if ((!plot.hasOwner() || !plot.isOwner(player.getUUID())) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_KICK)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_KICK)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"));
|
||||
return false;
|
||||
}
|
||||
@ -94,7 +94,7 @@ public class Kick extends SubCommand {
|
||||
if (uuid == DBFunc.EVERYONE) {
|
||||
for (PlotPlayer<?> pp : plot.getPlayersInPlot()) {
|
||||
if (pp == player || Permissions
|
||||
.hasPermission(pp, Captions.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
.hasPermission(pp, Permission.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
continue;
|
||||
}
|
||||
players.add(pp);
|
||||
@ -122,7 +122,7 @@ public class Kick extends SubCommand {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (Permissions.hasPermission(player2, Captions.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
if (Permissions.hasPermission(player2, Permission.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("cluster.cannot_kick_player"),
|
||||
Template.of("name", player2.getName())
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -96,7 +96,7 @@ public class Like extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_RATE, true)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_RATE, true)) {
|
||||
return false;
|
||||
}
|
||||
plot.clearRatings();
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.CaptionHolder;
|
||||
@ -90,40 +90,40 @@ public class ListCmd extends SubCommand {
|
||||
private String[] getArgumentList(PlotPlayer player) {
|
||||
List<String> args = new ArrayList<>();
|
||||
if (this.econHandler != null && Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_LIST_FOR_SALE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_LIST_FOR_SALE)) {
|
||||
args.add("forsale");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_MINE)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_MINE)) {
|
||||
args.add("mine");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_SHARED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_SHARED)) {
|
||||
args.add("shared");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_WORLD)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_WORLD)) {
|
||||
args.add("world");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_TOP)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_TOP)) {
|
||||
args.add("top");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_ALL)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_ALL)) {
|
||||
args.add("all");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_UNOWNED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_UNOWNED)) {
|
||||
args.add("unowned");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_PLAYER)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_PLAYER)) {
|
||||
args.add("<player>");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_WORLD)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_WORLD)) {
|
||||
args.add("<world>");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_DONE)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_DONE)) {
|
||||
args.add("done");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_EXPIRED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_EXPIRED)) {
|
||||
args.add("expired");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_FUZZY)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_FUZZY)) {
|
||||
args.add("fuzzy <search...>");
|
||||
}
|
||||
return args.toArray(new String[args.size()]);
|
||||
@ -190,7 +190,7 @@ public class ListCmd extends SubCommand {
|
||||
|
||||
switch (arg) {
|
||||
case "mine":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_MINE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_MINE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.mine"));
|
||||
return false;
|
||||
@ -199,7 +199,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().ownedBy(player).whereBasePlot().withSortingStrategy(SortingStrategy.SORT_BY_TEMP));
|
||||
break;
|
||||
case "shared":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_SHARED)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_SHARED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.shared"));
|
||||
return false;
|
||||
@ -207,7 +207,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().withMember(player.getUUID()).thatPasses(plot -> !plot.isOwnerAbs(player.getUUID())));
|
||||
break;
|
||||
case "world":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_WORLD)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_WORLD)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.world"));
|
||||
return false;
|
||||
@ -220,7 +220,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().inWorld(world));
|
||||
break;
|
||||
case "expired":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_EXPIRED)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_EXPIRED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.expired"));
|
||||
return false;
|
||||
@ -232,7 +232,7 @@ public class ListCmd extends SubCommand {
|
||||
}
|
||||
break;
|
||||
case "area":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_AREA)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_AREA)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.area"));
|
||||
return false;
|
||||
@ -249,7 +249,7 @@ public class ListCmd extends SubCommand {
|
||||
}
|
||||
break;
|
||||
case "all":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_ALL)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_ALL)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.all"));
|
||||
return false;
|
||||
@ -257,7 +257,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().allPlots());
|
||||
break;
|
||||
case "done":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_DONE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_DONE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.done"));
|
||||
return false;
|
||||
@ -266,7 +266,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().allPlots().thatPasses(DoneFlag::isDone).withSortingStrategy(SortingStrategy.SORT_BY_DONE));
|
||||
break;
|
||||
case "top":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_TOP)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_TOP)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.top"));
|
||||
return false;
|
||||
@ -275,7 +275,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().allPlots().withSortingStrategy(SortingStrategy.SORT_BY_RATING));
|
||||
break;
|
||||
case "forsale":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_FOR_SALE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_FOR_SALE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.forsale"));
|
||||
return false;
|
||||
@ -286,7 +286,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().allPlots().thatPasses(plot -> plot.getFlag(PriceFlag.class) > 0));
|
||||
break;
|
||||
case "unowned":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_UNOWNED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.unowned"));
|
||||
return false;
|
||||
@ -294,7 +294,7 @@ public class ListCmd extends SubCommand {
|
||||
plotConsumer.accept(PlotQuery.newQuery().allPlots().thatPasses(plot -> plot.getOwner() == null));
|
||||
break;
|
||||
case "fuzzy":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_FUZZY)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_FUZZY)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.fuzzy"));
|
||||
return false;
|
||||
@ -315,7 +315,7 @@ public class ListCmd extends SubCommand {
|
||||
break;
|
||||
default:
|
||||
if (this.plotAreaManager.hasPlotArea(args[0])) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_LIST_WORLD)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_LIST_WORLD)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.world"));
|
||||
return false;
|
||||
@ -346,7 +346,7 @@ public class ListCmd extends SubCommand {
|
||||
Templates.of("value", args[0]));
|
||||
} else {
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_LIST_PLAYER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_LIST_PLAYER)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.list.player"));
|
||||
} else {
|
||||
@ -431,31 +431,31 @@ public class ListCmd extends SubCommand {
|
||||
@Override public Collection<Command> tab(PlotPlayer<?> player, String[] args, boolean space) {
|
||||
final List<String> completions = new LinkedList<>();
|
||||
if (this.econHandler != null && Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_LIST_FOR_SALE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_LIST_FOR_SALE)) {
|
||||
completions.add("forsale");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_MINE)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_MINE)) {
|
||||
completions.add("mine");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_SHARED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_SHARED)) {
|
||||
completions.add("shared");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_WORLD)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_WORLD)) {
|
||||
completions.addAll(PlotSquared.platform().getWorldManager().getWorlds());
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_TOP)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_TOP)) {
|
||||
completions.add("top");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_ALL)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_ALL)) {
|
||||
completions.add("all");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_UNOWNED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_UNOWNED)) {
|
||||
completions.add("unowned");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_DONE)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_DONE)) {
|
||||
completions.add("done");
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_EXPIRED)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_EXPIRED)) {
|
||||
completions.add("expired");
|
||||
}
|
||||
|
||||
@ -463,7 +463,7 @@ public class ListCmd extends SubCommand {
|
||||
.map(completion -> new Command(null, true, completion, "", RequiredType.NONE, CommandCategory.TELEPORT) {
|
||||
}).collect(Collectors.toCollection(LinkedList::new));
|
||||
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_LIST_PLAYER) && args[0].length() > 0) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_LIST_PLAYER) && args[0].length() > 0) {
|
||||
commands.addAll(TabCompletions.completePlayers(args[0], Collections.emptyList()));
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
@ -84,7 +84,7 @@ public class Load extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_LOAD)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_LOAD)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Injector;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
@ -241,8 +241,8 @@ public class MainCommand extends Command {
|
||||
PlotArea area = player.getApplicablePlotArea();
|
||||
Plot newPlot = Plot.fromString(area, args[0]);
|
||||
if (newPlot != null && (player instanceof ConsolePlayer || newPlot.getArea()
|
||||
.equals(area) || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN)
|
||||
|| Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_SUDO_AREA))
|
||||
.equals(area) || Permissions.hasPermission(player, Permission.PERMISSION_ADMIN)
|
||||
|| Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_SUDO_AREA))
|
||||
&& !newPlot.isDenied(player.getUUID())) {
|
||||
Location newLoc = newPlot.getCenterSynchronous();
|
||||
if (player.canTeleport(newLoc)) {
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotMergeEvent;
|
||||
@ -175,7 +175,7 @@ public class Merge extends SubCommand {
|
||||
terrain = "true".equalsIgnoreCase(args[1]);
|
||||
}
|
||||
if (!force && !terrain && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||
.hasPermission(player, Permission.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.merge.keeproad")
|
||||
@ -197,7 +197,7 @@ public class Merge extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!force && !plot.isOwner(uuid)) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_MERGE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_MERGE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
} else {
|
||||
@ -219,7 +219,7 @@ public class Merge extends SubCommand {
|
||||
terrain = true;
|
||||
}
|
||||
if (!force && !terrain && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||
.hasPermission(player, Permission.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.merge.keeproad")
|
||||
@ -243,7 +243,7 @@ public class Merge extends SubCommand {
|
||||
player.sendMessage(TranslatableCaption.of("merge.no_available_automerge"));
|
||||
return false;
|
||||
}
|
||||
if (!force && !Permissions.hasPermission(player, Captions.PERMISSION_MERGE_OTHER)) {
|
||||
if (!force && !Permissions.hasPermission(player, Permission.PERMISSION_MERGE_OTHER)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.merge.other")
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -66,7 +66,7 @@ public class Move extends SubCommand {
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
@ -98,7 +98,7 @@ public class Move extends SubCommand {
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
if (!plot1.getArea().isCompatible(plot2.getArea()) && (!override || !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN))) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN))) {
|
||||
player.sendMessage(TranslatableCaption.of("errors.plotworld_incompatible"));
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotChangeOwnerEvent;
|
||||
@ -95,7 +95,7 @@ public class Owner extends SetCommand {
|
||||
boolean force = event.getEventResult() == Result.FORCE;
|
||||
if (uuid == null) {
|
||||
if (!force && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_SET_OWNER,
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_SET_OWNER,
|
||||
true)) {
|
||||
return;
|
||||
}
|
||||
@ -124,7 +124,7 @@ public class Owner extends SetCommand {
|
||||
return;
|
||||
}
|
||||
if (!force && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_SET_OWNER)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_SET_OWNER)) {
|
||||
if (other == null) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("invalid_player_offline"),
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -114,7 +114,7 @@ public class Rate extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_RATE, true)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_RATE, true)) {
|
||||
return false;
|
||||
}
|
||||
plot.clearRatings();
|
||||
@ -168,7 +168,7 @@ public class Rate extends SubCommand {
|
||||
Template.of("plot", plot.getId().toString())
|
||||
);
|
||||
if (Permissions
|
||||
.hasPermission(this.player, Captions.PERMISSION_COMMENT)) {
|
||||
.hasPermission(this.player, Permission.PERMISSION_COMMENT)) {
|
||||
Command command =
|
||||
MainCommand.getInstance().getCommand(Comment.class);
|
||||
if (command != null) {
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.MemorySection;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.location.Location;
|
||||
@ -72,7 +72,7 @@ public class Remove extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_REMOVE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_REMOVE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return true;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.MetaDataAccess;
|
||||
@ -78,7 +78,7 @@ public class Save extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_SAVE)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_SAVE)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
@ -81,7 +81,7 @@ public class SchematicCmd extends SubCommand {
|
||||
String arg = args[0].toLowerCase();
|
||||
switch (arg) {
|
||||
case "paste": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_SCHEMATIC_PASTE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_SCHEMATIC_PASTE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.schematic.paste")
|
||||
@ -212,7 +212,7 @@ public class SchematicCmd extends SubCommand {
|
||||
}
|
||||
case "export":
|
||||
case "save":
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_SCHEMATIC_SAVE)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_SCHEMATIC_SAVE)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.schematic.save")
|
||||
@ -251,7 +251,7 @@ public class SchematicCmd extends SubCommand {
|
||||
}
|
||||
break;
|
||||
case "list": {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_SCHEMATIC_LIST)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_SCHEMATIC_LIST)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.schematic.list")
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.backup.BackupManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
@ -104,7 +104,7 @@ public class Set extends SubCommand {
|
||||
BlockType::getName).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_ALLOW_UNSAFE) &&
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_ALLOW_UNSAFE) &&
|
||||
!forbiddenTypes.isEmpty()) {
|
||||
for (String forbiddenType : forbiddenTypes) {
|
||||
forbiddenType = forbiddenType.toLowerCase(Locale.ENGLISH);
|
||||
@ -141,10 +141,10 @@ public class Set extends SubCommand {
|
||||
for (String component : components) {
|
||||
if (component.equalsIgnoreCase(args[0])) {
|
||||
if (!Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_COMPONENT.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_SET_COMPONENT.toString(),
|
||||
component))) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_SET_COMPONENT.getTranslated(),
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_SET_COMPONENT.toString(),
|
||||
component));
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -45,9 +45,9 @@ public abstract class SetCommand extends SubCommand {
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_ADMIN_COMMAND.getTranslated(), getFullId()))) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_ADMIN_COMMAND.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_ADMIN_COMMAND.toString(), getFullId()))) {
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_ADMIN_COMMAND.toString(),
|
||||
getFullId()));
|
||||
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
||||
return false;
|
||||
@ -55,9 +55,9 @@ public abstract class SetCommand extends SubCommand {
|
||||
}
|
||||
if (!plot.isOwner(player.getUUID())) {
|
||||
if (!Permissions.hasPermission(player, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_ADMIN_COMMAND.getTranslated(), getFullId()))) {
|
||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Captions.PERMISSION_ADMIN_COMMAND.getTranslated(),
|
||||
.format(player, Permission.PERMISSION_ADMIN_COMMAND.toString(), getFullId()))) {
|
||||
MainUtil.sendMessage(player, Permission.NO_PERMISSION, CaptionUtility
|
||||
.format(player, Permission.PERMISSION_ADMIN_COMMAND.toString(),
|
||||
getFullId()));
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return false;
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.generator.GeneratorWrapper;
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
@ -56,7 +56,7 @@ public class Swap extends SubCommand {
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.Templates;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -73,7 +73,7 @@ public class Trust extends Command {
|
||||
}
|
||||
checkTrue(currentPlot.hasOwner(), TranslatableCaption.of("info.plot_unowned"));
|
||||
checkTrue(currentPlot.isOwner(player.getUUID()) || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
TranslatableCaption.of("permission.no_plot_perms"));
|
||||
|
||||
checkTrue(args.length == 1, TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
@ -101,8 +101,8 @@ public class Trust extends Command {
|
||||
while (iterator.hasNext()) {
|
||||
UUID uuid = iterator.next();
|
||||
if (uuid == DBFunc.EVERYONE && !(
|
||||
Permissions.hasPermission(player, Captions.PERMISSION_TRUST_EVERYONE) || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
||||
Permissions.hasPermission(player, Permission.PERMISSION_TRUST_EVERYONE) || Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("errors.invalid_player"),
|
||||
Template.of("value", PlayerManager.getName(uuid))
|
||||
@ -130,7 +130,7 @@ public class Trust extends Command {
|
||||
}
|
||||
checkTrue(!uuids.isEmpty(), null);
|
||||
checkTrue(size <= currentPlot.getArea().getMaxPlotMembers() || Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||
TranslatableCaption.of("member.plot_max_members"));
|
||||
// Success
|
||||
confirm.run(this, () -> {
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlotUnlinkEvent;
|
||||
import com.plotsquared.core.events.Result;
|
||||
@ -92,7 +92,7 @@ public class Unlink extends SubCommand {
|
||||
}
|
||||
boolean force = event.getEventResult() == Result.FORCE;
|
||||
if (!force && !plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_UNLINK)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_UNLINK)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
}
|
||||
Runnable runnable = () -> {
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.caption.Templates;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
@ -106,32 +106,32 @@ public class Visit extends Command {
|
||||
|
||||
final Plot plot = plots.get(page - 1);
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_UNOWNED)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_UNOWNED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.visit.unowned"));
|
||||
return;
|
||||
}
|
||||
} else if (plot.isOwner(player.getUUID())) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OWNED) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_HOME)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_OWNED) && !Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_HOME)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.visit.owned"));
|
||||
return;
|
||||
}
|
||||
} else if (plot.isAdded(player.getUUID())) {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_SHARED)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_SHARED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.visit.shared"));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!Permissions.hasPermission(player, Captions.PERMISSION_VISIT_OTHER)) {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_OTHER)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.visit.other"));
|
||||
return;
|
||||
}
|
||||
if (!plot.getFlag(UntrustedVisitFlag.class) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_VISIT_UNTRUSTED)) {
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_VISIT_UNTRUSTED)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_permission"),
|
||||
Templates.of("node", "plots.admin.visit.untrusted"));
|
||||
return;
|
||||
|
@ -1,827 +0,0 @@
|
||||
/*
|
||||
* _____ _ _ _____ _
|
||||
* | __ \| | | | / ____| | |
|
||||
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
|
||||
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
|
||||
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
|
||||
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
|
||||
* | |
|
||||
* |_|
|
||||
* PlotSquared plot management system for Minecraft
|
||||
* Copyright (C) 2020 IntellectualSites
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.plotsquared.core.configuration;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Captions class.
|
||||
*/
|
||||
public enum Captions {
|
||||
|
||||
//@formatter:off
|
||||
//<editor-fold desc="Static Permission">
|
||||
PERMISSION_STAR("*"),
|
||||
PERMISSION_ADMIN("plots.admin"),
|
||||
PERMISSION_ADMIN_SUDO_AREA("plots.admin.area.sudo"),
|
||||
PERMISSION_PROJECTILE_UNOWNED("plots.projectile.unowned"),
|
||||
PERMISSION_PROJECTILE_OTHER("plots.projectile.other"),
|
||||
PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS("plots.admin.interact.blockedcommands"),
|
||||
PERMISSION_WORLDEDIT_BYPASS("plots.worldedit.bypass"),
|
||||
PERMISSION_PLOT_TOGGLE_TITLES("plots.toggle.titles"),
|
||||
PERMISSION_PLOT_TOGGLE_CHAT("plots.toggle.chat"),
|
||||
PERMISSION_PLOT_TOGGLE_TIME("plots.toggle.time"),
|
||||
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify"),
|
||||
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied"),
|
||||
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied"),
|
||||
PERMISSION_ADMIN_VISIT_UNTRUSTED("plots.admin.visit.untrusted"),
|
||||
PERMISSION_ADMIN_ENTRY_FORCEFIELD("plots.admin.entry.forcefield"),
|
||||
PERMISSION_COMMANDS_CHAT("plots.admin.command.chat"),
|
||||
PERMISSION_MERGE_OTHER("plots.merge.other"),
|
||||
PERMISSION_MERGE_KEEP_ROAD("plots.merge.keeproad"),
|
||||
PERMISSION_ADMIN_CAPS_OTHER("plots.admin.caps.other"),
|
||||
PERMISSION_ADMIN_DESTROY_UNOWNED("plots.admin.destroy.unowned"),
|
||||
PERMISSION_ADMIN_DESTROY_GROUNDLEVEL("plots.admin.destroy.groundlevel"),
|
||||
PERMISSION_ADMIN_DESTROY_OTHER("plots.admin.destroy.other"),
|
||||
PERMISSION_ADMIN_DESTROY_ROAD("plots.admin.destroy.road"),
|
||||
PERMISSION_ADMIN_BUILD_ROAD("plots.admin.build.road"),
|
||||
PERMISSION_ADMIN_BUILD_UNOWNED("plots.admin.build.unowned"),
|
||||
PERMISSION_ADMIN_BUILD_OTHER("plots.admin.build.other"),
|
||||
PERMISSION_ADMIN_INTERACT_ROAD("plots.admin.interact.road"),
|
||||
PERMISSION_ADMIN_INTERACT_UNOWNED("plots.admin.interact.unowned"),
|
||||
PERMISSION_ADMIN_INTERACT_OTHER("plots.admin.interact.other"),
|
||||
PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT("plots.admin.build.heightlimit"),
|
||||
PERMISSION_ADMIN_UPDATE("plots.admin.command.update"),
|
||||
PERMISSION_ADMIN_COMMAND_RATE("plots.admin.command.rate"),
|
||||
PERMISSION_ADMIN_COMMAND_TRUST("plots.admin.command.trust"),
|
||||
PERMISSION_TRUST_EVERYONE("plots.trust.everyone"),
|
||||
PERMISSION_AREA_CREATE("plots.area.create"),
|
||||
PERMISSION_AREA_INFO("plots.area.info","static.permissions"),
|
||||
PERMISSION_AREA_INFO_FORCE("plots.admin.info.force"),
|
||||
PERMISSION_AREA_LIST("plots.area.list"),
|
||||
PERMISSION_AREA_REGEN("plots.area.regen"),
|
||||
PERMISSION_AREA_TP("plots.area.tp"),
|
||||
PERMISSION_AUTO_MEGA("plots.auto.mega"),
|
||||
PERMISSION_CLAIM_SCHEMATIC("plots.claim.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC("plots.admin.command.schematic"),
|
||||
PERMISSION_ADMIN_COMMAND_CLEAR("plots.admin.command.clear"),
|
||||
PERMISSION_CONTINUE("plots.continue"),
|
||||
PERMISSION_CLUSTER_LIST("plots.cluster.list"),
|
||||
PERMISSION_CLUSTER_CREATE("plots.cluster.create"),
|
||||
PERMISSION_CLUSTER_CREATE_OTHER("plots.cluster.create.other"),
|
||||
PERMISSION_CLUSTER_SIZE("plots.cluster.size"),
|
||||
PERMISSION_CLUSTER_DELETE("plots.cluster.delete"),
|
||||
PERMISSION_CLUSTER_DELETE_OTHER("plots.cluster.delete.other"),
|
||||
PERMISSION_CLUSTER_RESIZE("plots.cluster.resize"),
|
||||
PERMISSION_CLUSTER_RESIZE_OTHER("plots.cluster.resize.other"),
|
||||
PERMISSION_CLUSTER_RESIZE_SHRINK("plots.cluster.resize.shrink"),
|
||||
PERMISSION_CLUSTER_RESIZE_EXPAND("plots.cluster.resize.expand"),
|
||||
PERMISSION_CLUSTER("plots.cluster"),
|
||||
PERMISSION_CLUSTER_INVITE("plots.cluster.invite"),
|
||||
PERMISSION_CLUSTER_INVITE_OTHER("plots.cluster.invite.other"),
|
||||
PERMISSION_CLUSTER_KICK("plots.cluster.kick"),
|
||||
PERMISSION_CLUSTER_KICK_OTHER("plots.cluster.kick.other"),
|
||||
PERMISSION_CLUSTER_LEAVE("plots.cluster.leave"),
|
||||
PERMISSION_CLUSTER_HELPERS("plots.cluster.helpers"),
|
||||
PERMISSION_CLUSTER_TP("plots.cluster.tp"),
|
||||
PERMISSION_CLUSTER_TP_OTHER("plots.cluster.tp.other"),
|
||||
PERMISSION_CLUSTER_INFO("plots.cluster.info"),
|
||||
PERMISSION_CLUSTER_SETHOME("plots.cluster.sethome"),
|
||||
PERMISSION_CLUSTER_SETHOME_OTHER("plots.cluster.sethome.other"),
|
||||
PERMISSION_ADMIN_COMMAND_CONTINUE("plots.admin.command.continue"),
|
||||
PERMISSION_ADMIN_COMMAND_DELETE("plots.admin.command.delete"),
|
||||
PERMISSION_ADMIN_COMMAND_DENY("plots.admin.command.deny"),
|
||||
PERMISSION_DENY_EVERYONE("plots.deny.everyone"),
|
||||
PERMISSION_ADMIN_COMMAND_DONE("plots.admin.command.done"),
|
||||
PERMISSION_ADMIN_COMMAND_DOWNLOAD("plots.admin.command.download"),
|
||||
PERMISSION_DOWNLOAD_WORLD("plots.download.world"),
|
||||
PERMISSION_SET_FLAG_OTHER("plots.set.flag.other"),
|
||||
PERMISSION_SET_FLAG("plots.set.flag"),
|
||||
PERMISSION_SET_FLAG_KEY("plots.set.flag.%s0"),
|
||||
PERMISSION_SET_FLAG_KEY_VALUE("plots.set.flag.%s0.%s1"),
|
||||
PERMISSION_FLAG_REMOVE("plots.flag.remove"),
|
||||
PERMISSION_FLAG_ADD("plots.flag.add"),
|
||||
PERMISSION_FLAG_LIST("plots.flag.list"),
|
||||
PERMISSION_ADMIN_COMMAND_KICK("plots.admin.command.kick"),
|
||||
PERMISSION_GRANT("plots.grant.%s0"),
|
||||
PERMISSION_LIST_FOR_SALE("plots.list.forsale"),
|
||||
PERMISSION_LIST_MINE("plots.list.mine"),
|
||||
PERMISSION_LIST_SHARED("plots.list.shared"),
|
||||
PERMISSION_LIST_WORLD("plots.list.world"),
|
||||
PERMISSION_LIST_WORLD_NAME("plots.list.world.%s0"),
|
||||
PERMISSION_LIST_TOP("plots.list.top"),
|
||||
PERMISSION_LIST_ALL("plots.list.all"),
|
||||
PERMISSION_LIST_UNOWNED("plots.list.unowned"),
|
||||
PERMISSION_LIST_UNKNOWN("plots.list.unknown"),
|
||||
PERMISSION_LIST_PLAYER("plots.list.player"),
|
||||
PERMISSION_LIST_DONE("plots.list.done"),
|
||||
PERMISSION_LIST_EXPIRED("plots.list.expired"),
|
||||
PERMISSION_LIST_FUZZY("plots.list.fuzzy"),
|
||||
PERMISSION_LIST_AREA("plots.list.area"),
|
||||
PERMISSION_ADMIN_COMMAND_LOAD("plots.admin.command.load"),
|
||||
PERMISSION_ADMIN_COMMAND_MERGE("plots.admin.command.merge"),
|
||||
PERMISSION_ADMIN_COMMAND_SET_OWNER("plots.admin.command.setowner"),
|
||||
PERMISSION_COMMENT("plots.comment"),
|
||||
PERMISSION_ADMIN_COMMAND_REMOVE("plots.admin.command.remove"),
|
||||
PERMISSION_ADMIN_COMMAND_SAVE("plots.admin.command.save"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC_PASTE("plots.admin.command.schematic.paste"),
|
||||
PERMISSION_SCHEMATIC_PASTE("plots.schematic.paste"),
|
||||
PERMISSION_SCHEMATIC_LIST("plots.schematic.list"),
|
||||
PERMISSION_SCHEMATIC_SAVE("plots.schematic.save"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC_SAVE("plots.admin.command.schematic.save"),
|
||||
PERMISSION_SET_COMPONENT("plots.set.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND("plots.admin.command.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND_UNLINK("plots.ad2min.command.unlink"),
|
||||
PERMISSION_VISIT_UNOWNED("plots.visit.unowned"),
|
||||
PERMISSION_VISIT_OWNED("plots.visit.owned"),
|
||||
PERMISSION_SHARED("plots.visit.shared"),
|
||||
PERMISSION_VISIT_OTHER("plots.visit.other"),
|
||||
PERMISSION_HOME("plots.home"),
|
||||
PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias"), // Note this is for backwards compatibility
|
||||
PERMISSION_ALIAS_SET("plots.alias.set"),
|
||||
PERMISSION_ADMIN_ALIAS_SET("plots.admin.alias.set"),
|
||||
PERMISSION_ALIAS_REMOVE("plots.alias.remove"),
|
||||
PERMISSION_ADMIN_ALIAS_REMOVE("plots.admin.alias.remove"),
|
||||
PERMISSION_ADMIN_CHAT_BYPASS("plots.admin.chat.bypass"),
|
||||
PERMISSION_BACKUP("plots.backup"),
|
||||
PERMISSION_BACKUP_SAVE("plots.backup.save"),
|
||||
PERMISSION_BACKUP_LIST("plots.backup.list"),
|
||||
PERMISSION_BACKUP_LOAD("plots.backup.load"),
|
||||
PERMISSION_ADMIN_BACKUP_OTHER("plots.admin.backup.other"),
|
||||
PERMISSION_ADMIN_ALLOW_UNSAFE("plots.admin.unsafe"),
|
||||
PERMISSION_ADMIN_DEBUG_OTHER("plots.admin.debug.other"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Confirm">
|
||||
EXPIRED_CONFIRM("$2Confirmation has expired, please run the command again!", "Confirm"),
|
||||
FAILED_CONFIRM("$2You have no pending actions to confirm!", "Confirm"),
|
||||
REQUIRES_CONFIRM("$2Are you sure you wish to execute: $1%s$2?&-$2This cannot be undone! If you are sure: $1/plot confirm", "Confirm", "command"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Move">
|
||||
MOVE_SUCCESS("$4Successfully moved plot.", "Move"),
|
||||
MOVE_MERGED("$2Merged plots may not be moved. Please unmerge the plot before performing the move.", "Move"),
|
||||
COPY_SUCCESS("$4Successfully copied plot.", "Move"),
|
||||
REQUIRES_UNOWNED("$2The location specified is already occupied.", "Move"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Area Create">
|
||||
REQUIRES_UNMERGED("$2The plot cannot be merged", "debug"),
|
||||
SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set", "attribute", "value"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Web">
|
||||
GENERATING_LINK("$1Processing plot...", "Web"),
|
||||
GENERATING_LINK_FAILED("$2Failed to generate download link!", "Web"),
|
||||
SAVE_FAILED("$2Failed to save", "Web"),
|
||||
LOAD_NULL("$2Please use $4/plot load $2to get a list of schematics", "Web"),
|
||||
LOAD_FAILED("$2Failed to load schematic", "Web"),
|
||||
LOAD_LIST("$2To load a schematic, use $1/plot load #", "Web"),
|
||||
SAVE_SUCCESS("$1Successfully saved!", "Web"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Compass">
|
||||
COMPASS_TARGET("$4Successfully targeted plot with compass", "Compass"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Cluster">
|
||||
CLUSTER_AVAILABLE_ARGS(
|
||||
"$1The following sub commands are available: $4list$2, $4create$2, $4delete$2, $4resize$2, $4invite$2, $4kick$2, $4leave$2, "
|
||||
+ "$4members$2, $4info$2, $4tp$2, $4sethome", "Cluster"),
|
||||
CLUSTER_LIST_HEADING("$2There are $1%s$2 clusters in this world", "Cluster", "amount"),
|
||||
CLUSTER_LIST_ELEMENT("$2 - $1%s&-", "Cluster", "cluster"),
|
||||
CLUSTER_INTERSECTION("$2The proposed area overlaps with: %s0", "Cluster", "cluster"),
|
||||
CLUSTER_OUTSIDE("$2The proposed area is outside the plot area: %s0", "Cluster", "area"),
|
||||
CLUSTER_ADDED("$4Successfully created the cluster.", "Cluster"),
|
||||
CLUSTER_DELETED("$4Successfully deleted the cluster.", "Cluster"),
|
||||
CLUSTER_RESIZED("$4Successfully resized the cluster.", "Cluster"),
|
||||
CLUSTER_ADDED_USER("$4Successfully added user to the cluster.", "Cluster"),
|
||||
CANNOT_KICK_PLAYER("$2You cannot kick that player", "Cluster"),
|
||||
CLUSTER_INVITED("$1You have been invited to the following cluster: $2%s", "Cluster", "cluster"),
|
||||
CLUSTER_REMOVED("$1You have been removed from cluster: $2%s", "Cluster", "cluster"),
|
||||
CLUSTER_KICKED_USER("$4Successfully kicked the user", "Cluster"),
|
||||
INVALID_CLUSTER("$1Invalid cluster name: $2%s", "Cluster", "cluster"),
|
||||
CLUSTER_NOT_ADDED("$2That player was not added to the plot cluster", "Cluster"),
|
||||
CLUSTER_CANNOT_LEAVE("$1You must delete or transfer ownership before leaving", "Cluster"),
|
||||
CLUSTER_ADDED_HELPER("$4Successfully added a helper to the cluster", "Cluster"),
|
||||
CLUSTER_REMOVED_HELPER("$4Successfully removed a helper from the cluster", "Cluster"),
|
||||
CLUSTER_REGENERATED("$4Successfully started cluster regeneration", "Cluster"),
|
||||
CLUSTER_TELEPORTING("$4Teleporting...", "Cluster"),
|
||||
CLUSTER_INFO("$1Current cluster: $2%id%&-$1Name: $2%name%&-$1Owner: $2%owner%&-$1Size: $2%size%&-$1Rights: $2%rights%", "Cluster"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Border">
|
||||
BORDER("$2You are outside the current map border", "Border"),
|
||||
WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea", "WorldEdit Masks"),
|
||||
WORLDEDIT_BYPASSED("$2Currently bypassing WorldEdit restriction.", "WorldEdit Masks"),
|
||||
GAMEMODE_WAS_BYPASSED("$1You bypassed the GameMode ($2{gamemode}$1) $1set for $2{plot}", "GameMode"),
|
||||
HEIGHT_LIMIT("$1This plot area has a height limit of $2{limit}", "Height Limit"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Records">
|
||||
NOTIFY_ENTER("$2%player $2entered your plot ($1%plot$2)", "Records"),
|
||||
NOTIFY_LEAVE("$2%player $2left your plot ($1%plot$2)", "Records"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Swap">
|
||||
SWAP_OVERLAP("$2The proposed areas are not allowed to overlap", "Swap"),
|
||||
SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
|
||||
SWAP_MERGED("$2Merged plots may not be swapped. Please unmerge the plot before performing the swap.", "Swap"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Comments">
|
||||
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"),
|
||||
NOT_VALID_INBOX_INDEX("$2No comment at index %s", "Comment", "number"),
|
||||
INBOX_ITEM("$2 - $4%s", "Comment", "value"),
|
||||
COMMENT_SYNTAX("$2Use /plot comment [X;Z] <%s> <comment>", "Comment", "list"),
|
||||
INVALID_INBOX("$2That is not a valid inbox.&-$1Accepted values: %s", "Comment", "list"),
|
||||
NO_PERM_INBOX("$2You do not have permission for that inbox", "Comment"),
|
||||
NO_PERM_INBOX_MODIFY("$2You do not have permission to modify that inbox", "Comment"),
|
||||
NO_PLOT_INBOX("$2You must stand in or supply a plot argument", "Comment"),
|
||||
COMMENT_REMOVED_SUCCESS("$4Successfully deleted comment/s:n$2 - '$3%s$2'", "Comment", "value"),
|
||||
COMMENT_REMOVED_FAILURE("$4Failed to delete comment!", "Comment"),
|
||||
COMMENT_ADDED("$4A comment has been left", "Comment"),
|
||||
INBOX_EMPTY("$2No comments", "Comment"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Console">
|
||||
NOT_CONSOLE("$2For safety reasons, this command can only be executed by console.", "Console"),
|
||||
IS_CONSOLE("$2This command can only be executed by a player.", "Console"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Clipboard">
|
||||
PASTE_FAILED("$2Failed to paste the selection. Reason: $2%s", "Clipboard", "reason"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Toggle">
|
||||
TOGGLE_ENABLED("$2Enabled setting: %s", "Toggle", "setting"),
|
||||
TOGGLE_DISABLED("$2Disabled setting: %s", "Toggle", "setting"),
|
||||
COMMAND_BLOCKED("$2That command is not allowed in this plot", "Blocked Command"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Done">
|
||||
DONE_ALREADY_DONE("$2This plot is already marked as done", "Done"),
|
||||
DONE_NOT_DONE("$2This plot is not marked as done.", "Done"),
|
||||
DONE_INSUFFICIENT_COMPLEXITY("$2This plot is too simple. Please add more detail before using this command.", "Done"),
|
||||
DONE_SUCCESS("$1Successfully marked this plot as done.", "Done"),
|
||||
DONE_REMOVED("$1You may now continue building in this plot.", "Done"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Ratings">
|
||||
RATINGS_PURGED("$2Purged ratings for this plot", "Ratings"),
|
||||
RATING_NOT_VALID("$2You need to specify a number between 1 and 10", "Ratings"),
|
||||
RATING_ALREADY_EXISTS("$2You have already rated plot $2%s", "Ratings", "plot"),
|
||||
RATING_APPLIED("$4You successfully rated plot $2%s", "Ratings", "plot"),
|
||||
RATING_DISLIKED("$4You successfully disliked plot $2%s", "Ratings", "plot"),
|
||||
RATING_LIKED("$4You successfully liked plot $2%s", "Ratings", "plot"),
|
||||
RATING_NOT_YOUR_OWN("$2You cannot rate your own plot", "Ratings"),
|
||||
RATING_NOT_DONE("$2You can only rate finished plots.", "Ratings"),
|
||||
RATING_NOT_OWNED("$2You cannot rate a plot that is not claimed by anyone", "Ratings"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Tutorial">
|
||||
RATE_THIS("$2Rate this plot!", "Tutorial"),
|
||||
COMMENT_THIS("$2Leave some feedback on this plot: %s", "Tutorial", "plot"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Economy">
|
||||
ECON_DISABLED("$2Economy is not enabled", "Economy"),
|
||||
CANNOT_AFFORD_PLOT("$2You cannot afford to buy this plot. It costs $1%s", "Economy", "money"),
|
||||
NOT_FOR_SALE("$2This plot is not for sale", "Economy"),
|
||||
CANNOT_BUY_OWN("$2You cannot buy your own plot", "Economy"),
|
||||
PLOT_SOLD("$4Your plot; $1%s0$4, has been sold to $1%s1$4 for $1$%s2", "Economy", "plot", "player", "money"),
|
||||
CANNOT_AFFORD_MERGE("$2You cannot afford to merge the plots. It costs $1%s","Economy", "money"),
|
||||
ADDED_BALANCE("$1%s $2has been added to your balance", "Economy", "money"),
|
||||
REMOVED_BALANCE("$1%s $2has been taken from your balance", "Economy", "money"),
|
||||
REMOVED_GRANTED_PLOT("$2You used %s0 plot grant(s), you've got $1%s1 $2left", "Economy", "usedGrants", "remainingGrants"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Setup">
|
||||
SETUP_NOT_STARTED("$1No setup started. Use $2/plot setup $1to start a setup process.", "Setup"),
|
||||
SETUP_INIT("$1Usage: $2/plot setup <value>", "Setup"),
|
||||
SETUP_STEP("$3[$1Step %s0$3] $1%s1 $2- $1Expecting: $2%s2 $1Default: $2%s3", "Setup", "step", "description", "type", "value"),
|
||||
SETUP_INVALID_ARG("$2%s0 is not a valid argument for step %s1. To cancel setup use: $1/plot setup cancel", "Setup", "value", "step"),
|
||||
SETUP_VALID_ARG("$2Value $1%s0 $2set to %s1", "Setup", "description", "value"),
|
||||
SETUP_FINISHED(
|
||||
"$4You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or "
|
||||
+ "your chosen world management plugin.", "Setup"),
|
||||
SETUP_WORLD_TAKEN("$2%s is already a world", "Setup", "value"),
|
||||
SETUP_CANCELLED("$7Cancelled setup.", "Setup"),
|
||||
SETUP_WORLD_NAME("$1What do you want your world to be called?", "Setup"),
|
||||
SETUP_WORLD_NAME_ERROR("$7You need to choose a world name!", "Setup"),
|
||||
SETUP_WORLD_NAME_TAKEN("$7That world name is already taken!", "Setup"),
|
||||
SETUP_WORLD_GENERATOR_ERROR("$7You must choose a generator!", "Setup"),
|
||||
SETUP_WORLD_TYPE("$1What world type do you want?&-"
|
||||
+ "$3 - $6normal$3 - $2Standard plot generation&-"
|
||||
+ "$3 - $6augmented$3 - $2Plot generation with terrain&-"
|
||||
+ "$3 - $6partial$3 - $2Vanilla with clusters of plots", "Setup"),
|
||||
SETUP_WORLD_TYPE_ERROR("$7You must choose a world type!", "Setup"),
|
||||
SETUP_WRONG_GENERATOR("$7The specified generator does not identify as BukkitPlotGenerator"
|
||||
+ "$3 - $6You may need to manually configure the other plugin", "Setup"),
|
||||
SETUP_WORLD_NAME_FORMAT("$7Non [a-z0-9_.-] character in the world name:$1 ", "Setup"),
|
||||
SETUP_WORLD_APPLY_PLOTSQUARED("$7The world you specified already exists. After restarting, new terrain will use "
|
||||
+ "$1PlotSquared$7, however you may need to reset the world for it to generate correctly!", "Setup"),
|
||||
SETUP_PARTIAL_AREA("$1What terrain would you like in plots?&-"
|
||||
+ "$3 - $6NONE$3 - $2No terrain at all&-"
|
||||
+ "$3 - $6ORE$3 - $2Just some ore veins and trees&-"
|
||||
+ "$3 - $6ROAD$3 - $2Terrain separated by roads&-"
|
||||
+ "$3 - $6ALL$3 - $2Entirely vanilla generation", "Setup"),
|
||||
SETUP_PARTIAL_AREA_ERROR("$7You must choose the terrain!", "Setup"),
|
||||
SETUP_AREA_NAME("$1What would you like this area called?", "Setup"),
|
||||
SETUP_AREA_NON_ALPHANUMERICAL("$7The area id must be alphanumerical!", "Setup"),
|
||||
SETUP_AREA_INVALID_ID("$7You must choose an area id that is not in use!", "Setup"),
|
||||
SETUP_AREA_MIN_PLOT_ID("$1What should be the minimum Plot Id?", "Setup"),
|
||||
SETUP_AREA_MIN_PLOT_ID_ERROR("$7You must choose a valid minimum Plot Id!", "Setup"),
|
||||
SETUP_AREA_MAX_PLOT_ID("$1What should be the maximum Plot Id?", "Setup"),
|
||||
SETUP_AREA_MAX_PLOT_ID_ERROR("$7You must choose a valid maximum Plot Id!", "Setup"),
|
||||
SETUP_AREA_PLOT_ID_GREATER_THAN_MINIMUM("$7The max PlotId must be greater than the minimum!", "Setup"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc=PlotAreaType>
|
||||
PLOT_AREA_TYPE_NORMAL("Standard plot generation", "PlotAreaType"),
|
||||
PLOT_AREA_TYPE_AUGMENTED("Plot generation with vanilla terrain", "PlotAreaType"),
|
||||
PLOT_AREA_TYPE_PARTIAL("Vanilla with clusters of plots", "PlotAreaType"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Schematic">
|
||||
SCHEMATIC_TOO_LARGE("$2The plot is too large for this action!", "Schematics"),
|
||||
SCHEMATIC_MISSING_ARG("$2You need to specify an argument. Possible values: $1save$2, $1paste $2, $1exportall$2, $1list", "Schematics"),
|
||||
SCHEMATIC_INVALID("$2That is not a valid schematic. Reason: $2%s", "Schematics", "reason"),
|
||||
SCHEMATIC_PASTE_MERGED("$2Schematics cannot be pasted onto merged plots. Please unmerge the plot before performing the paste.", "Schematics"),
|
||||
SCHEMATIC_PASTE_FAILED("$2Failed to paste the schematic", "Schematics"),
|
||||
SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"),
|
||||
SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics", "list"),
|
||||
SCHEMATIC_ROAD_CREATED("$1Saved new road schematic. To test the schematic, fly to a few other plots and run /plot debugroadregen", "Schematics"),
|
||||
MCA_FILE_SIZE("$1Note: The `.mca` files are 512x512", "Schematics"),
|
||||
SCHEMATIC_EXPORTALL_STARTED("$1Starting export...", "Schematics"),
|
||||
SCHEMATIC_EXPORTALL_WORLD_ARGS("$1Need world argument. Use $3/plot sch exportall <area>", "Schematics"),
|
||||
SCHEMATIC_EXPORTALL_WORLD("$1Invalid world. Use &3/plot sch exportall <area>", "Schematic"),
|
||||
SCHEMATIC_EXPORTALL_FINISHED("$1Finished mass export", "Schematics"),
|
||||
SCHEMATIC_EXPORTALL_SINGLE_FINISHED("$1Finished export", "Schematics"),
|
||||
TASK_IN_PROCESS("$1Task is already running.", "Error"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Titles">
|
||||
TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"),
|
||||
TITLE_ENTERED_PLOT_SUB("$4Owned by %s", "Titles", "owner"),
|
||||
PREFIX_GREETING("$1%id%$2> ", "Titles"),
|
||||
PREFIX_FAREWELL("$1%id%$2> ", "Titles"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Core">
|
||||
PREFIX("$3[$1P2$3] $2", "Core"),
|
||||
ENABLED("$1%s0 is now enabled", "Core", "value"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Reload">
|
||||
RELOADED_CONFIGS("$1Translations and world settings have been reloaded", "Reload"),
|
||||
RELOAD_FAILED("$2Failed to reload file configurations", "Reload"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Description">
|
||||
DESC_SET("$2Plot description set", "Desc"),
|
||||
DESC_UNSET("$2Plot description unset", "Desc"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Alias">
|
||||
ALIAS_SET_TO("$2Plot alias set to $1%alias%", "Alias"),
|
||||
ALIAS_REMOVED("$2Plot alias removed", "Alias"),
|
||||
ALIAS_TOO_LONG("$2The alias must be < 50 characters in length", "Alias"),
|
||||
ALIAS_IS_TAKEN("$2That alias is already taken", "Alias"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Position">
|
||||
POSITION_SET("$1Home position set to your current location", "Position"),
|
||||
POSITION_UNSET("$1Home position reset to the default location", "Position"),
|
||||
HOME_ARGUMENT("$2Use /plot set home [none]", "Position"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Permission">
|
||||
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s", "Permission", "value"),
|
||||
NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission", "node"),
|
||||
NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s", "Permission"),
|
||||
NO_PLOT_PERMS("$2You must be the plot owner to perform this action", "Permission"),
|
||||
CANT_CLAIM_MORE_PLOTS("$2You can't claim more plots.", "Permission"),
|
||||
CANT_CLAIM_MORE_CLUSTERS("$2You can't claim more clusters.", "Permission"),
|
||||
CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user", "Permission"),
|
||||
CANT_CLAIM_MORE_PLOTS_NUM("$2You can't claim more than $1%s $2plots at once", "Permission", "amount"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Merge">
|
||||
MERGE_NOT_VALID("$2This merge request is no longer valid.", "Merge"),
|
||||
MERGE_ACCEPTED("$2The merge request has been accepted", "Merge"),
|
||||
SUCCESS_MERGE("$2Plots have been merged!", "Merge"),
|
||||
MERGE_REQUESTED("$2Successfully sent a merge request", "Merge"),
|
||||
MERGE_REQUEST_CONFIRM("Merge request from %s", "Permission", "player"),
|
||||
NO_AVAILABLE_AUTOMERGE("$2You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.", "Merge"),
|
||||
UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"),
|
||||
UNMERGE_CANCELLED("$1Unlink has been cancelled", "Merge"),
|
||||
UNLINK_SUCCESS("$2Successfully unlinked plots.", "Merge"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="CommandConfig">
|
||||
NOT_VALID_SUBCOMMAND("$2That is not a valid subcommand", "CommandConfig"),
|
||||
DID_YOU_MEAN("$2Did you mean: $1%s", "CommandConfig", "value"),
|
||||
SUBCOMMAND_SET_OPTIONS_HEADER("$2Possible Values: ", "CommandConfig"),
|
||||
COMMAND_SYNTAX("$1Usage: $2%s", "CommandConfig", "value"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Errors">
|
||||
COMPONENT_ILLEGAL_BLOCK("$2You are not allowed to generate a component containg the block '%s'", "Invalid", "value"),
|
||||
INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors", "player"),
|
||||
INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors", "player"),
|
||||
INVALID_COMMAND_FLAG("$2Invalid command flag: %s0", "Errors", "value"),
|
||||
ERROR("$2An error occurred: %s", "Errors", "value"),
|
||||
COMMAND_WENT_WRONG("$2Something went wrong when executing that command...", "Errors"),
|
||||
NO_FREE_PLOTS("$2There are no free plots available", "Errors"),
|
||||
NOT_IN_PLOT("$2You're not in a plot", "Errors"),
|
||||
NOT_IN_CLUSTER("$2You must be within a plot cluster to perform that action", "Errors"),
|
||||
NOT_IN_PLOT_WORLD("$2You're not in a plot area", "Errors"),
|
||||
PLOTWORLD_INCOMPATIBLE("$2The two worlds must be compatible", "Errors"),
|
||||
NOT_VALID_WORLD("$2That is not a valid world (case sensitive)", "Errors"),
|
||||
NOT_VALID_PLOT_WORLD("$2That is not a valid plot area (case sensitive)", "Errors"),
|
||||
NO_PLOTS("$2You don't have any plots", "Errors"),
|
||||
PLAYER_NO_PLOTS("$2That player does not own any plots", "Errors"),
|
||||
WAIT_FOR_TIMER("$2A set block timer is bound to either the current plot or you. Please wait for it to finish", "Errors"),
|
||||
TILE_ENTITY_CAP_REACHED("$2The total number of tile entities in this chunk may not exceed $1%s", "Errors", "amount"),
|
||||
//</editor-fold>
|
||||
DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"),
|
||||
PURGE_SUCCESS("$4Successfully purged %s plots", "Purge", "amount"),
|
||||
FETCHING_PLAYER("$1PlotSquared is attempting to find the specified player from your argument(s). This may take a while.", "Players"),
|
||||
FETCHING_PLAYERS_TIMEOUT("$2The specified users did not exist in the cache and will be fetched in the background. Please wait a couple of minutes.", "Players"),
|
||||
//<editor-fold desc="Trim">
|
||||
TRIM_IN_PROGRESS("A world trim task is already in progress!", "Trim"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Block List">
|
||||
BLOCK_LIST_SEPARATOR("$1,$2 ", "Block List"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Biome">
|
||||
NEED_BIOME("$2You need to specify a valid biome.", "Biome"),
|
||||
BIOME_SET_TO("$2Plot biome set to $2", "Biome"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Teleport">
|
||||
TELEPORTED_TO_PLOT("$1You have been teleported", "Teleport"),
|
||||
TELEPORTED_TO_ROAD("$2You got teleported to the road", "Teleport"),
|
||||
TELEPORT_IN_SECONDS("$1Teleporting in %s seconds. Do not move...", "Teleport", "amount"),
|
||||
TELEPORT_FAILED("$2Teleportation cancelled due to movement or damage", "Teleport"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Set Block">
|
||||
SET_BLOCK_ACTION_FINISHED("$1The last setblock action is now finished.", "Set Block"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="AllowUnsafe">
|
||||
DEBUGALLOWUNSAFE_ON("$2Unsafe actions allowed", "unsafe"),
|
||||
DEBUGALLOWUNSAFE_OFF("$2Unsafe actions disabled", "unsafe"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Debug">
|
||||
DEBUG_HEADER("$1Debug Information&-", "Debug"),
|
||||
DEBUG_SECTION("$2>> $1&l%val%", "Debug"),
|
||||
DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Invalid">
|
||||
NOT_VALID_BLOCK("$2That's not a valid block: %s", "Invalid", "value"),
|
||||
NOT_ALLOWED_BLOCK("$2That block is not allowed: %s", "Invalid", "value"),
|
||||
NOT_VALID_NUMBER("$2That's not a valid number within the range: %s", "Invalid", "min", "max"),
|
||||
NOT_VALID_PLOT_ID("$2That's not a valid plot id.", "Invalid"),
|
||||
FOUND_NO_PLOTS("$2Found no plots with your search query", "Invalid"),
|
||||
NUMBER_NOT_IN_RANGE("That's not a valid number within the range: (%s, %s)", "Invalid"),
|
||||
NUMBER_NOT_POSITIVE("That's not a positive number: %s", "Invalid", "value"),
|
||||
NOT_A_NUMBER("%s is not a valid number.", "Invalid", "value"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Need">
|
||||
NEED_BLOCK("$2You've got to specify a block", "Need"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Near">
|
||||
PLOT_NEAR("$1Players: %s0", "Near", "list"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Info">
|
||||
NONE(" None", "Info"),
|
||||
NOW("Now", "Info"),
|
||||
NEVER("Never", "Info"),
|
||||
UNKNOWN("Unknown", "Info"),
|
||||
SERVER("Server", "Info"),
|
||||
EVERYONE("Everyone", "Info"),
|
||||
PLOT_UNOWNED("$2The current plot must have an owner to perform this action", "Info"),
|
||||
PLOT_INFO_UNCLAIMED("$2Plot $1%s$2 is not yet claimed", "Info", "plot"),
|
||||
PLOT_INFO_HEADER("$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
||||
PLOT_INFO_HIDDEN("$2You cannot view the information about this plot", "Info"),
|
||||
PLOT_INFO_FORMAT("$1ID: $2%id%$1&-" + "$1Area: $2%area%$1&-"
|
||||
+"$1Alias:$2%alias%$1&-" + "$1Owner:$2%owner%$1&-"
|
||||
+ "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-"
|
||||
+ "$1Seen: $2%seen%&-" + "$1Trusted:$2%trusted%$1&-" + "$1Members:$2%members%$1&-"
|
||||
+ "$1Denied:$2%denied%$1&-" + "$1Flags:$2%flags%&-$1Description: $2%desc%$1", "Info"),
|
||||
PLOT_INFO_FOOTER("$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
||||
PLOT_INFO_TRUSTED("$1Trusted:$2%trusted%", "Info"),
|
||||
PLOT_INFO_MEMBERS("$1Members:$2%members%", "Info"),
|
||||
PLOT_INFO_DENIED("$1Denied:$2%denied%", "Info"),
|
||||
PLOT_INFO_FLAGS("$1Flags:$2 %flags%", "Info"),
|
||||
PLOT_INFO_BIOME("$1Biome:$2 %biome%", "Info"),
|
||||
PLOT_INFO_RATING("$1Rating:$2 %rating%", "Info"),
|
||||
PLOT_INFO_LIKES("$1Like Ratio:$2 %likes%%", "Info"),
|
||||
PLOT_INFO_OWNER("$1Owner:$2%owner%", "Info"),
|
||||
PLOT_INFO_ID("$1ID:$2 %id%", "Info"),
|
||||
PLOT_INFO_ALIAS("$1Alias:$2 %alias%", "Info"),
|
||||
PLOT_INFO_SIZE("$1Size:$2 %size%", "Info"),
|
||||
PLOT_INFO_SEEN("$1Seen:$2 %seen%", "Info"),
|
||||
PLOT_USER_LIST(" $1%user%$2,", "Info"),
|
||||
PLOT_FLAG_LIST("$2%s0:%s1$3", "Info", "flag", "value"),
|
||||
PLOT_NO_DESCRIPTION("No description set.", "Info"),
|
||||
INFO_SYNTAX_CONSOLE("$2/plot info X;Z", "Info"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Working">
|
||||
GENERATING_COMPONENT("$1Started generating component from your settings", "Working"),
|
||||
CLEARING_DONE("$4Clear completed! Took %sms.", "Working", "amount"),
|
||||
DELETING_DONE("$4Delete completed! Took %sms.", "Working", "amount"),
|
||||
PLOT_NOT_CLAIMED("$2Plot not claimed", "Working"),
|
||||
PLOT_IS_CLAIMED("$2This plot is already claimed", "Working"),
|
||||
CLAIMED("$4You successfully claimed the plot", "Working"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="List">
|
||||
COMMENT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% comments", "List"),
|
||||
CLICKABLE(" (interactive)", "List"),
|
||||
AREA_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% areas", "List"),
|
||||
PLOT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% plots", "List"),
|
||||
PLOT_LIST_HEADER("$1List of %word% plots", "List"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Chat">
|
||||
PLOT_CHAT_SPY_FORMAT("$2[$1Plot Spy$2][$1%plot_id%$2] $1%sender%$2: $1%msg%", "Chat"),
|
||||
PLOT_CHAT_FORMAT("$2[$1Plot Chat$2][$1%plot_id%$2] $1%sender%$2: $1%msg%", "Chat"),
|
||||
PLOT_CHAT_FORCED("$2This world forces everyone to use plot chat.", "Chat"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Deny">
|
||||
DENIED_ADDED("$4You successfully denied the player from this plot", "Deny"),
|
||||
YOU_GOT_DENIED("$4You are denied from the plot you were previously on, and got teleported to spawn", "Deny"),
|
||||
CANT_REMOVE_OWNER("$2You can't remove the plot owner", "Deny"),
|
||||
//</editor-fold>
|
||||
YOU_GOT_KICKED("$4You got kicked!", "Kick"),
|
||||
//<editor-fold desc="Flag">
|
||||
FLAG_KEY("$2Key: %s", "Flag", "key"),
|
||||
FLAG_DESC("$2Desc: %s", "Flag", "value"),
|
||||
NOT_VALID_FLAG("$2That is not a valid flag", "Flag"),
|
||||
NOT_VALID_FLAG_SUGGESTED("$2That is not a valid flag. Did you mean: $1%s", "Flag", "value"),
|
||||
NOT_VALID_VALUE("$2Flag values must be alphanumerical", "Flag"),
|
||||
FLAG_NOT_REMOVED("$2The flag could not be removed", "Flag"),
|
||||
FLAG_NOT_ADDED("$2The flag could not be added", "Flag"),
|
||||
FLAG_REMOVED("$4Successfully removed flag", "Flag"),
|
||||
FLAG_PARTIALLY_REMOVED("$4Successfully removed flag value(s)", "Flag"),
|
||||
FLAG_ADDED("$4Successfully added flag", "Flag"),
|
||||
FLAG_TUTORIAL_USAGE("$1Have an admin set the flag: $2%s", "CommandConfig", "flag"),
|
||||
FLAG_LIST_SEE_INFO("Click to view information about the flag", "Flag"),
|
||||
FLAG_PARSE_ERROR("$2Failed to parse flag '%flag_name%', value '%flag_value%': %error%", "Flag"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Flag">
|
||||
FLAG_INFO_HEADER("$3&m---------&r $1Plot² Flags $3&m---------", false, "Flag"),
|
||||
FLAG_INFO_FOOTER("$3&m---------&r $1Plot² Flags $3&m---------", false, "Flag"),
|
||||
FLAG_INFO_COLOR_KEY("$1", "Flag"),
|
||||
FLAG_INFO_COLOR_VALUE("$2", "Flag"),
|
||||
FLAG_INFO_NAME("Name: ", "Flag"),
|
||||
FLAG_INFO_CATEGORY("Category: ", "Flag"),
|
||||
FLAG_INFO_DESCRIPTION("Description: ", "Flag"),
|
||||
FLAG_INFO_EXAMPLE("Example: ", "Flag"),
|
||||
FLAG_INFO_DEFAULT_VALUE("Default Value: ", "Flag"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Flag category captions">
|
||||
FLAG_CATEGORY_STRING("String Flags", "Flags"),
|
||||
FLAG_CATEGORY_INTEGERS("Integer Flags", "Flags"),
|
||||
FLAG_CATEGORY_DOUBLES("Decimal Flags", "Flags"),
|
||||
FLAG_CATEGORY_TELEPORT_DENY("Teleport Deny Flag", "Flags"),
|
||||
FLAG_CATEGORY_STRING_LIST("String List Flags", "Flags"),
|
||||
FLAG_CATEGORY_WEATHER("Weather Flags", "Flags"),
|
||||
FLAG_CATEGORY_MUSIC("Music Flags", "Flags"),
|
||||
FLAG_CATEGORY_BLOCK_LIST("Material Flags", "Flags"),
|
||||
FLAG_CATEGORY_INTERVALS("Interval Flags", "Flags"),
|
||||
FLAG_CATEGORY_INTEGER_LIST("Integer List Flags", "Flags"),
|
||||
FLAG_CATEGORY_GAMEMODE("Game Mode Flags", "Flags"),
|
||||
FLAG_CATEGORY_ENUM("Generic Enum Flags", "Flags"),
|
||||
FLAG_CATEGORY_DECIMAL("Decimal Flags", "Flags"),
|
||||
FLAG_CATEGORY_BOOLEAN("Boolean Flags", "Flags"),
|
||||
FLAG_CATEGORY_FLY("Flight Flags", "Flags"),
|
||||
FLAG_CATEGORY_MIXED("Mixed Value Flags", "Flags"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Flag descriptions">
|
||||
FLAG_DESCRIPTION_ENTITY_CAP("Set to an integer value to limit the amount of entities on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_EXPLOSION("Set to `true` to enable explosions in the plot, and `false` to disable them.", "Flags"),
|
||||
FLAG_DESCRIPTION_MUSIC("Set to a music disk ID (item name) to play the music disc inside of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_FLIGHT("Set to `true` to enable flight within the plot when in survival or adventure mode,"
|
||||
+ " set to `default` to use the gamemode default, and `false` to disable flight entirely.", "Flags"),
|
||||
FLAG_DESCRIPTION_UNTRUSTED("Set to `false` to disallow untrusted players from visiting the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DENY_EXIT("Set to `true` to disallow players from exiting the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_CHAT("Set to `false` to prevent plot chat on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DESCRIPTION("Plot description. Supports '&' color codes.", "Flags"),
|
||||
FLAG_DESCRIPTION_GREETING("Message sent to players on plot entry. Supports '&' color codes.", "Flags"),
|
||||
FLAG_DESCRIPTION_FAREWELL("Message sent to players when leaving the plot. Supports '&' color codes.", "Flags"),
|
||||
FLAG_DESCRIPTION_WEATHER("Specifies the weather conditions inside of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ANIMAL_ATTACK("Set to `true` to allow animals to be attacked in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ANIMAL_CAP("Set to an integer value to limit the amount of animals on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ANIMAL_INTERACT("Set to `true` to allow animals to be interacted with in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_BLOCK_BURN("Set to `true` to allow blocks to burn within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_BLOCK_IGNITION("Set to `false` to prevent blocks from igniting within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_BREAK("Define a list of materials players should be able to break even when they aren't added to the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DEVICE_INTERACT("Set to `true` to allow devices to be interacted with in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DISABLE_PHYSICS("Set to `true` to disable block physics in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DROP_PROTECTION("Set to `true` to prevent dropped items from being picked up by non-members of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_FEED("Specify an interval in seconds and an optional amount by which the players will be fed (amount is 1 by default).", "Flags"),
|
||||
FLAG_DESCRIPTION_FORCEFIELD("Set to `true` to enable member forcefield in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_GRASS_GROW("Set to `false` to prevent grass from growing within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_HANGING_BREAK("Set to `true` to allow guests to break hanging objects in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_HANGING_PLACE("Set to `true` to allow guests to hang objects in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_HEAL("Specify an interval in seconds and an optional amount by which the players will be healed (amount is 1 by default).", "Flags"),
|
||||
FLAG_DESCRIPTION_HIDE_INFO("Set to `true` to hide plot information.", "Flags"),
|
||||
FLAG_DESCRIPTION_HOSTILE_ATTACK("Set to `true` to enable players to attack hostile mobs in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_HOSTILE_CAP("Set to an integer value to limit the amount of hostile entities on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_HOSTILE_INTERACT("Set to `true` to allow players to interact with hostile mobs in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ICE_FORM("Set to `true` to allow ice to form in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ICE_MELT("Set to `false` to disable ice melting in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_INSTABREAK("Set to `true` to allow blocks to be instantaneously broken in survival mode.", "Flags"),
|
||||
FLAG_DESCRIPTION_INVINCIBLE("Set to `true` to prevent players from taking damage inside of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_ITEM_DROP("Set to `false` to prevent items from being dropped inside of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_KELP_GROW("Set to `false` to prevent kelp from growing in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_LIQUID_FLOW("Set to `false` to disable liquids from flowing within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_MISC_BREAK("Set to `true` to allow guests to break miscellaneous items.", "Flags"),
|
||||
FLAG_DESCRIPTION_MISC_CAP("Set to an integer value to limit the amount of miscellaneous entities on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_MISC_INTERACT("Set to `true` to allow guests to interact with miscellaneous items.", "Flags"),
|
||||
FLAG_DESCRIPTION_MISC_PLACE("Set to `true` to allow guests to place miscellaneous items.", "Flags"),
|
||||
FLAG_DESCRIPTION_MOB_BREAK("Set to `true` to allow mobs to break blocks within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_MOB_CAP("Set to an integer value to limit the amount of mobs on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_MOB_PLACE("Set to `true` to allow mobs to place blocks within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_MYCEL_GROW("Set to `false` to prevent mycelium from growing in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_NOTIFY_ENTER("Set to `true` to notify the plot owners when someone enters the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_NOTIFY_LEAVE("Set to `true` to notify the plot owners when someone leaves the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_NO_WORLDEDIT("Set to `true` to disable WorldEdit usage within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_PLACE("Define a list of materials players should be able to place in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_PLAYER_INTERACT("Set to `true` to allow guests to interact with players in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_PRICE("Set a price for a plot. Must be a positive decimal number.", "Flags"),
|
||||
FLAG_DESCRIPTION_PVE("Set to `true` to enable PVE inside the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_PVP("Set to `true` to enable PVP inside the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_REDSTONE("Set to `false` to disable redstone in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_SERVER_PLOT("Set to `true` to turn the plot into a server plot. This is equivalent to setting the server as the plot owner.", "Flags"),
|
||||
FLAG_DESCRIPTION_SNOW_FORM("Set to `true` to allow snow to form within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_SNOW_MELT("Set to `true` to allow snow to melt within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_SOIL_DRY("Set to `true` to allow soil to dry within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_CORAL_DRY("Set to `true` to allow coral blocks to dry within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_TAMED_ATTACK("Set to `true` to allow guests to attack tamed animals in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_TAMED_INTERACT("Set to `true` to allow guests to interact with tamed animals in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_TIME("Set the time in the plot to a fixed value.", "Flags"),
|
||||
FLAG_DESCRIPTION_TITLES("Set to `false` to disable plot titles. Can be set to: `none` (to inherit world settings), `true`, or `false`", "Flags"),
|
||||
FLAG_DESCRIPTION_USE("Define a list of materials players should be able to interact with in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VEHICLE_BREAK("Set to `true` to allow guests to break vehicles in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VEHICLE_CAP("Set to an integer value to limit the amount of vehicles on the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VEHICLE_PLACE("Set to `true` to allow guests to place vehicles in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VEHICLE_USE("Set to `true` to allow guests to use vehicles in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VILLAGER_INTERACT("Set to `true` to allow guests to interact with villagers in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_VINE_GROW("Set to `false` to prevent vines from growing within the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_DENY_TELEPORT("Deny a certain group from teleporting to the plot. Available groups: members, nonmembers, trusted, nontrusted, nonowners", "Flags"),
|
||||
FLAG_DESCRIPTION_GAMEMODE("Determines the gamemode in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_GUEST_GAMEMODE("Determines the guest gamemode in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_BLOCKED_CMDS("A list of commands that are blocked in the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_KEEP("Prevents the plot from expiring. Can be set to: true, false, the number of milliseconds to keep the plot for or a timestamp (3w 2d 5h).", "Flags"),
|
||||
FLAG_DESCRIPTION_KEEP_INVENTORY("Prevents players from dropping their items when they die inside of the plot.", "Flags"),
|
||||
FLAG_DESCRIPTION_PREVENT_CREATIVE_COPY("Prevents people from copying item NBT data in the plot unless they're added as members.", "Flags"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Flag category errors">
|
||||
FLAG_ERROR_BOOLEAN("Flag value must be a boolean (true|false)", false, "Flags"),
|
||||
FLAG_ERROR_ENUM("Must be one of: %s", false, "Flags", "list"),
|
||||
FLAG_ERROR_GAMEMODE("Flag value must be a gamemode: 'survival', 'creative', 'adventure' or 'spectator.", false, "Flags"),
|
||||
FLAG_ERROR_INTEGER("Flag value must be a whole number", false, "Flags"),
|
||||
FLAG_ERROR_INTEGER_LIST("Flag value must be an integer list", false, "Flags"),
|
||||
FLAG_ERROR_INTERVAL("Value(s) must be numeric. /plot set flag <flag> <interval> [amount]", false, "Flags"),
|
||||
FLAG_ERROR_KEEP("Flag value must be a timestamp or a boolean", false, "Flags"),
|
||||
FLAG_ERROR_LONG("Flag value must be a whole number (large numbers allowed)", false, "Flags"),
|
||||
FLAG_ERROR_PLOTBLOCKLIST("Flag value must be a block list", false, "Flags"),
|
||||
FLAG_ERROR_INVALID_BLOCK("The provided value is not a valid block or block category", false, "Flags"),
|
||||
FLAG_ERROR_DOUBLE("Flag value must be a decimal number.", false, "Flags"),
|
||||
FLAG_ERROR_STRING("Flag value must be alphanumeric. Some special characters are allowed.", false, "Flags"),
|
||||
FLAG_ERROR_STRINGLIST("Flag value must be a string list", false, "Flags"),
|
||||
FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", false, "Flags"),
|
||||
FLAG_ERROR_MUSIC("Flag value must be a valid music disc ID.", false, "Flags"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Trusted">
|
||||
TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"),
|
||||
PLOT_REMOVED_USER("$1Plot %s of which you were added to has been deleted due to owner inactivity", "Trusted", "plot"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Member">
|
||||
REMOVED_PLAYERS("$2Removed %s player(s) from this plot.", "Member", "amount"),
|
||||
PLOT_LEFT("$2%s left the plot.", "Member", "player"),
|
||||
ALREADY_OWNER("$2That user is already the plot owner: %s0", "Member", "player"),
|
||||
ALREADY_ADDED("$2That user is already added to that category: %s0", "Member"),
|
||||
MEMBER_ADDED("$4That user can now build while the plot owner is online", "Member"),
|
||||
PLOT_MAX_MEMBERS("$2You are not allowed to add any more players to this plot", "Member"),
|
||||
NOT_ADDED_TRUSTED("$2You must be added or trusted to the plot to run that command", "Member"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Set Owner">
|
||||
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
||||
SET_OWNER_CANCELLED("$2The set owner action was cancelled", "Owner"),
|
||||
SET_OWNER_MISSING_PLAYER("$1You need to specify a new owner. Correct usage is: $2/plot setowner <owner>", "Owner"),
|
||||
NOW_OWNER("$4You are now owner of plot %s", "Owner", "plot"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Signs">
|
||||
OWNER_SIGN_LINE_1("$1ID: $1%id%", "Signs"),
|
||||
OWNER_SIGN_LINE_2("$1Owner:", "Signs"),
|
||||
OWNER_SIGN_LINE_3("$2%plr%", "Signs"),
|
||||
OWNER_SIGN_LINE_4("$3Claimed", "Signs"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Help">
|
||||
HELP_HEADER("$3&m---------&r $1Plot² Help $3&m---------", "Help"),
|
||||
HELP_PAGE_HEADER("$1Category: $2%category%$2,$1 Page: $2%current%$3/$2%max%$2", "Help"),
|
||||
HELP_FOOTER("$3&m---------&r $1Plot² Help $3&m---------", "Help"),
|
||||
HELP_INFO_ITEM("$1/plot help %category% $3- $2%category_desc%", "Help"),
|
||||
HELP_ITEM("$1%usage% [%alias%]&- $3- $2%desc%&-", "Help"),
|
||||
HELP_DISPLAY_ALL_COMMANDS("Display all commands", "Help"),
|
||||
DIRECTION("$1Current direction: %dir%", "Help"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Command Categories">
|
||||
COMMAND_CATEGORY_CLAIMING("Claiming", "Category"),
|
||||
COMMAND_CATEGORY_TELEPORT("Teleport", "Category"),
|
||||
COMMAND_CATEGORY_SETTINGS("Protection", "Category"),
|
||||
COMMAND_CATEGORY_CHAT("Chat", "Category"),
|
||||
COMMAND_CATEGORY_SCHEMATIC("Web", "Category"),
|
||||
COMMAND_CATEGORY_APPEARANCE("Cosmetic", "Category"),
|
||||
COMMAND_CATEGORY_INFO("Info", "Category"),
|
||||
COMMAND_CATEGORY_DEBUG("Debug", "Category"),
|
||||
COMMAND_CATEGORY_ADMINISTRATION("Admin", "Category"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Grants">
|
||||
GRANTED_PLOTS("$1Result: $2%s $1grants left", "Grants", "amount"),
|
||||
GRANTED_PLOT("$1You granted %s0 plot to $2%s1", "Grants"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Events">
|
||||
EVENT_DENIED("$1%s $2Cancelled by external plugin.", "Events", "value"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Caps">
|
||||
PLOT_CAPS_HEADER("$3&m---------&r $1CAPS $3&m---------", false, "Info"),
|
||||
PLOT_CAPS_FORMAT("$2- Cap Type: $1%cap% $2| Status: $1%current%$2/$1%limit% $2($1%percentage%%$2)",
|
||||
false, "Info"),
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="Backups">
|
||||
BACKUP_USAGE("$1Usage: $2/plot backup save/list/load", "Backups"),
|
||||
BACKUP_IMPOSSIBLE("$2Backups are not enabled for this plot: %s", "Backups", "plot"),
|
||||
BACKUP_SAVE_SUCCESS("$1The backup was created successfully", "Backups"),
|
||||
BACKUP_SAVE_FAILED("$2The backup could not be created: %s", "Backups", "reason"),
|
||||
BACKUP_LOAD_SUCCESS("$1The backup was restored successfully", "Backups"),
|
||||
BACKUP_LOAD_FAILURE("$2The backup could not be restored: %s", "Backups"),
|
||||
BACKUP_LOAD_USAGE("$1Usage: $2/plot backup load [#]", "Backups"),
|
||||
BACKUP_LIST_HEADER("$1Available backups for plot $2%s", "Backups", "plot"),
|
||||
BACKUP_LIST_ENTRY("$3- $1#%s0 $2%s1", "Backups", "number", "value"),
|
||||
BACKUP_LIST_FAILED("$2Backup listing failed: %s", "Backups", "reason"),
|
||||
BACKUP_AUTOMATIC_STARTED("$1Backing up the plot...", "Backups"),
|
||||
BACKUP_AUTOMATIC_FINISHED("$1The automatic backup process finished successfully!", "Backups"),
|
||||
BACKUP_AUTOMATIC_FAILURE("$2The automatic backup process failed. Your pending action has been canceled. Reason: %s", "Backups", "reason"),
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="Preset">
|
||||
PRESET_CANNOT_AFFORD("$2You cannot afford that preset", "Preset"),
|
||||
PRESET_INVALID("$2Could not generate a pattern from that preset", "Preset"),
|
||||
PRESET_LORE_COST("$2Cost: $1%cost%", "Preset"),
|
||||
PRESET_LORE_COMPONENT("$2Component: $1%component%", "Preset"),
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="Generic">
|
||||
GENERIC_OTHER("other", "Generic"),
|
||||
GENERIC_MERGED("merged", "Generic"),
|
||||
GENERIC_UNOWNED("unowned", "Generic"),
|
||||
GENERIC_INVALID_CHOICE("invalid choice", "Generic"),
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold des="Single area">
|
||||
SINGLE_AREA_MISSING_SELECTION("$2Error! You need to select a square region", "Single"),
|
||||
SINGLE_AREA_NOT_SQUARE("$2Error! Your selection needs to be a square", "Single"),
|
||||
SINGLE_AREA_OVERLAPPING("$2Error! Your selection overlaps with an existing plot area", "Single"),
|
||||
SINGLE_AREA_NEEDS_NAME("$2Error! Please specify a plot name: /plot area single <name>", "Single"),
|
||||
SINGLE_AREA_NAME_TAKEN("$2Error! The plot name is already taken", "Single"),
|
||||
SINGLE_AREA_FAILED_TO_SAVE("$2Error! Failed to save the area schematic", "Single"),
|
||||
SINGLE_AREA_COULD_NOT_MAKE_DIRECTORIES("$2Error! Failed to create the schematic directory", "Single"),
|
||||
SINGLE_AREA_CREATED("$1The area was created successfully!", "Single"),
|
||||
//</editor-fold>
|
||||
|
||||
//<editor-fold desc="Debug">
|
||||
PLOT_DEBUG("$2Plot Debug ($1%plot%$2): %message%", "Plot-Debug"),
|
||||
//</editor-fold>
|
||||
|
||||
/**
|
||||
* Legacy Configuration Conversion
|
||||
*/
|
||||
LEGACY_CONFIG_FOUND("A legacy configuration file was detected. Conversion will be attempted.",
|
||||
"LegacyConfig"), LEGACY_CONFIG_BACKUP(
|
||||
"A copy of worlds.yml $1have been saved in the file worlds.yml.old$1.",
|
||||
"LegacyConfig"), LEGACY_CONFIG_REPLACED("> %s has been replaced with %s",
|
||||
"LegacyConfig"), LEGACY_CONFIG_DONE(
|
||||
"The conversion has finished. PlotSquared will now be disabled and the new configuration file will"
|
||||
+ " be used at next startup. Please review the new worlds.yml file. "
|
||||
+ "Please note that schematics will not be converted, as we are now using WorldEdit to handle schematics. "
|
||||
+ "You need to re-generate the schematics.",
|
||||
"LegacyConfig"), LEGACY_CONFIG_CONVERSION_FAILED(
|
||||
"Failed to convert the legacy configuration file. See stack trace for information.",
|
||||
"LegacyConfig"),
|
||||
|
||||
CUSTOM_STRING("-", "-");
|
||||
//@formatter:on
|
||||
|
||||
private final String text;
|
||||
|
||||
Captions(@Nonnull final String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
Captions(@Nonnull final String text, @Nonnull final String... s) {
|
||||
// TODO: REMOVE!!!
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
Captions(@Nonnull final String text, final boolean b, @Nonnull final String s) {
|
||||
// TODO: REMOVE!!!
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
Captions(@Nonnull final String text, final boolean b, @Nonnull final String s, @Nonnull final String s1) {
|
||||
// TODO: REMOVE!!!
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
* | |
|
||||
* |_|
|
||||
* PlotSquared plot management system for Minecraft
|
||||
* Copyright (C) 2020 IntellectualSites
|
||||
* Copyright (C) ${year} IntellectualSites
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -27,6 +27,7 @@ package com.plotsquared.core.configuration.caption;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Map containing mappings between {@link TranslatableCaption captions} and
|
||||
@ -68,6 +69,13 @@ public interface CaptionMap {
|
||||
*/
|
||||
@Nonnull Locale getLocale();
|
||||
|
||||
/**
|
||||
* Gets a copy of the map of captions stored in the CaptionMap
|
||||
*
|
||||
* @return ImmutableMap of TranslatableCaption, String captionMap
|
||||
*/
|
||||
@Nonnull Map<TranslatableCaption, String> getCaptions();
|
||||
|
||||
class NoSuchCaptionException extends IllegalArgumentException {
|
||||
|
||||
public NoSuchCaptionException(@Nonnull final NamespacedCaption caption) {
|
||||
|
@ -26,7 +26,9 @@
|
||||
package com.plotsquared.core.configuration.caption;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link CaptionMap} implementation that throws exception on all getters
|
||||
@ -51,4 +53,8 @@ public class DummyCaptionMap implements CaptionMap {
|
||||
throw new UnsupportedOperationException("Cannot get locale of DummyCaptionMap");
|
||||
}
|
||||
|
||||
@Nonnull @Override public Map<TranslatableCaption, String> getCaptions() {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,8 @@
|
||||
*/
|
||||
package com.plotsquared.core.configuration.caption;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
@ -56,4 +58,8 @@ public class LocalizedCaptionMap implements CaptionMap {
|
||||
return this.locale;
|
||||
}
|
||||
|
||||
@Nonnull @Override public Map<TranslatableCaption, String> getCaptions() {
|
||||
return ImmutableMap.copyOf(captions);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
package com.plotsquared.core.listener;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.Templates;
|
||||
@ -323,7 +323,7 @@ public class PlotListener {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
if (plot.getFlag(DenyExitFlag.class) && !Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_EXIT_DENIED) &&
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_EXIT_DENIED) &&
|
||||
!kickAccess.get().orElse(false)) {
|
||||
if (previous != null) {
|
||||
lastPlot.set(previous);
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.listener;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
|
@ -0,0 +1,179 @@
|
||||
/*
|
||||
* _____ _ _ _____ _
|
||||
* | __ \| | | | / ____| | |
|
||||
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
|
||||
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
|
||||
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
|
||||
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
|
||||
* | |
|
||||
* |_|
|
||||
* PlotSquared plot management system for Minecraft
|
||||
* Copyright (C) ${year} IntellectualSites
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.plotsquared.core.permissions;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Captions class.
|
||||
*/
|
||||
public enum Permission {
|
||||
|
||||
//@formatter:off
|
||||
//<editor-fold desc="Static Permission">
|
||||
PERMISSION_STAR("*"),
|
||||
PERMISSION_ADMIN("plots.admin"),
|
||||
PERMISSION_ADMIN_SUDO_AREA("plots.admin.area.sudo"),
|
||||
PERMISSION_PROJECTILE_UNOWNED("plots.projectile.unowned"),
|
||||
PERMISSION_PROJECTILE_OTHER("plots.projectile.other"),
|
||||
PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS("plots.admin.interact.blockedcommands"),
|
||||
PERMISSION_WORLDEDIT_BYPASS("plots.worldedit.bypass"),
|
||||
PERMISSION_PLOT_TOGGLE_TITLES("plots.toggle.titles"),
|
||||
PERMISSION_PLOT_TOGGLE_CHAT("plots.toggle.chat"),
|
||||
PERMISSION_PLOT_TOGGLE_TIME("plots.toggle.time"),
|
||||
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify"),
|
||||
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied"),
|
||||
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied"),
|
||||
PERMISSION_ADMIN_VISIT_UNTRUSTED("plots.admin.visit.untrusted"),
|
||||
PERMISSION_ADMIN_ENTRY_FORCEFIELD("plots.admin.entry.forcefield"),
|
||||
PERMISSION_COMMANDS_CHAT("plots.admin.command.chat"),
|
||||
PERMISSION_MERGE_OTHER("plots.merge.other"),
|
||||
PERMISSION_MERGE_KEEP_ROAD("plots.merge.keeproad"),
|
||||
PERMISSION_ADMIN_CAPS_OTHER("plots.admin.caps.other"),
|
||||
PERMISSION_ADMIN_DESTROY_UNOWNED("plots.admin.destroy.unowned"),
|
||||
PERMISSION_ADMIN_DESTROY_GROUNDLEVEL("plots.admin.destroy.groundlevel"),
|
||||
PERMISSION_ADMIN_DESTROY_OTHER("plots.admin.destroy.other"),
|
||||
PERMISSION_ADMIN_DESTROY_ROAD("plots.admin.destroy.road"),
|
||||
PERMISSION_ADMIN_BUILD_ROAD("plots.admin.build.road"),
|
||||
PERMISSION_ADMIN_BUILD_UNOWNED("plots.admin.build.unowned"),
|
||||
PERMISSION_ADMIN_BUILD_OTHER("plots.admin.build.other"),
|
||||
PERMISSION_ADMIN_INTERACT_ROAD("plots.admin.interact.road"),
|
||||
PERMISSION_ADMIN_INTERACT_UNOWNED("plots.admin.interact.unowned"),
|
||||
PERMISSION_ADMIN_INTERACT_OTHER("plots.admin.interact.other"),
|
||||
PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT("plots.admin.build.heightlimit"),
|
||||
PERMISSION_ADMIN_UPDATE("plots.admin.command.update"),
|
||||
PERMISSION_ADMIN_COMMAND_RATE("plots.admin.command.rate"),
|
||||
PERMISSION_ADMIN_COMMAND_TRUST("plots.admin.command.trust"),
|
||||
PERMISSION_TRUST_EVERYONE("plots.trust.everyone"),
|
||||
PERMISSION_AREA_CREATE("plots.area.create"),
|
||||
PERMISSION_AREA_INFO("plots.area.info"),
|
||||
PERMISSION_AREA_INFO_FORCE("plots.admin.info.force"),
|
||||
PERMISSION_AREA_LIST("plots.area.list"),
|
||||
PERMISSION_AREA_REGEN("plots.area.regen"),
|
||||
PERMISSION_AREA_TP("plots.area.tp"),
|
||||
PERMISSION_AUTO_MEGA("plots.auto.mega"),
|
||||
PERMISSION_CLAIM_SCHEMATIC("plots.claim.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC("plots.admin.command.schematic"),
|
||||
PERMISSION_ADMIN_COMMAND_CLEAR("plots.admin.command.clear"),
|
||||
PERMISSION_CONTINUE("plots.continue"),
|
||||
PERMISSION_CLUSTER_LIST("plots.cluster.list"),
|
||||
PERMISSION_CLUSTER_CREATE("plots.cluster.create"),
|
||||
PERMISSION_CLUSTER_CREATE_OTHER("plots.cluster.create.other"),
|
||||
PERMISSION_CLUSTER_SIZE("plots.cluster.size"),
|
||||
PERMISSION_CLUSTER_DELETE("plots.cluster.delete"),
|
||||
PERMISSION_CLUSTER_DELETE_OTHER("plots.cluster.delete.other"),
|
||||
PERMISSION_CLUSTER_RESIZE("plots.cluster.resize"),
|
||||
PERMISSION_CLUSTER_RESIZE_OTHER("plots.cluster.resize.other"),
|
||||
PERMISSION_CLUSTER_RESIZE_SHRINK("plots.cluster.resize.shrink"),
|
||||
PERMISSION_CLUSTER_RESIZE_EXPAND("plots.cluster.resize.expand"),
|
||||
PERMISSION_CLUSTER("plots.cluster"),
|
||||
PERMISSION_CLUSTER_INVITE("plots.cluster.invite"),
|
||||
PERMISSION_CLUSTER_INVITE_OTHER("plots.cluster.invite.other"),
|
||||
PERMISSION_CLUSTER_KICK("plots.cluster.kick"),
|
||||
PERMISSION_CLUSTER_KICK_OTHER("plots.cluster.kick.other"),
|
||||
PERMISSION_CLUSTER_LEAVE("plots.cluster.leave"),
|
||||
PERMISSION_CLUSTER_HELPERS("plots.cluster.helpers"),
|
||||
PERMISSION_CLUSTER_TP("plots.cluster.tp"),
|
||||
PERMISSION_CLUSTER_TP_OTHER("plots.cluster.tp.other"),
|
||||
PERMISSION_CLUSTER_INFO("plots.cluster.info"),
|
||||
PERMISSION_CLUSTER_SETHOME("plots.cluster.sethome"),
|
||||
PERMISSION_CLUSTER_SETHOME_OTHER("plots.cluster.sethome.other"),
|
||||
PERMISSION_ADMIN_COMMAND_CONTINUE("plots.admin.command.continue"),
|
||||
PERMISSION_ADMIN_COMMAND_DELETE("plots.admin.command.delete"),
|
||||
PERMISSION_ADMIN_COMMAND_DENY("plots.admin.command.deny"),
|
||||
PERMISSION_DENY_EVERYONE("plots.deny.everyone"),
|
||||
PERMISSION_ADMIN_COMMAND_DONE("plots.admin.command.done"),
|
||||
PERMISSION_ADMIN_COMMAND_DOWNLOAD("plots.admin.command.download"),
|
||||
PERMISSION_DOWNLOAD_WORLD("plots.download.world"),
|
||||
PERMISSION_SET_FLAG_OTHER("plots.set.flag.other"),
|
||||
PERMISSION_SET_FLAG("plots.set.flag"),
|
||||
PERMISSION_SET_FLAG_KEY("plots.set.flag.%s0"),
|
||||
PERMISSION_SET_FLAG_KEY_VALUE("plots.set.flag.%s0.%s1"),
|
||||
PERMISSION_FLAG_REMOVE("plots.flag.remove"),
|
||||
PERMISSION_FLAG_ADD("plots.flag.add"),
|
||||
PERMISSION_FLAG_LIST("plots.flag.list"),
|
||||
PERMISSION_ADMIN_COMMAND_KICK("plots.admin.command.kick"),
|
||||
PERMISSION_GRANT("plots.grant.%s0"),
|
||||
PERMISSION_LIST_FOR_SALE("plots.list.forsale"),
|
||||
PERMISSION_LIST_MINE("plots.list.mine"),
|
||||
PERMISSION_LIST_SHARED("plots.list.shared"),
|
||||
PERMISSION_LIST_WORLD("plots.list.world"),
|
||||
PERMISSION_LIST_WORLD_NAME("plots.list.world.%s0"),
|
||||
PERMISSION_LIST_TOP("plots.list.top"),
|
||||
PERMISSION_LIST_ALL("plots.list.all"),
|
||||
PERMISSION_LIST_UNOWNED("plots.list.unowned"),
|
||||
PERMISSION_LIST_UNKNOWN("plots.list.unknown"),
|
||||
PERMISSION_LIST_PLAYER("plots.list.player"),
|
||||
PERMISSION_LIST_DONE("plots.list.done"),
|
||||
PERMISSION_LIST_EXPIRED("plots.list.expired"),
|
||||
PERMISSION_LIST_FUZZY("plots.list.fuzzy"),
|
||||
PERMISSION_LIST_AREA("plots.list.area"),
|
||||
PERMISSION_ADMIN_COMMAND_LOAD("plots.admin.command.load"),
|
||||
PERMISSION_ADMIN_COMMAND_MERGE("plots.admin.command.merge"),
|
||||
PERMISSION_ADMIN_COMMAND_SET_OWNER("plots.admin.command.setowner"),
|
||||
PERMISSION_COMMENT("plots.comment"),
|
||||
PERMISSION_ADMIN_COMMAND_REMOVE("plots.admin.command.remove"),
|
||||
PERMISSION_ADMIN_COMMAND_SAVE("plots.admin.command.save"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC_PASTE("plots.admin.command.schematic.paste"),
|
||||
PERMISSION_SCHEMATIC_PASTE("plots.schematic.paste"),
|
||||
PERMISSION_SCHEMATIC_LIST("plots.schematic.list"),
|
||||
PERMISSION_SCHEMATIC_SAVE("plots.schematic.save"),
|
||||
PERMISSION_ADMIN_COMMAND_SCHEMATIC_SAVE("plots.admin.command.schematic.save"),
|
||||
PERMISSION_SET_COMPONENT("plots.set.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND("plots.admin.command.%s0"),
|
||||
PERMISSION_ADMIN_COMMAND_UNLINK("plots.ad2min.command.unlink"),
|
||||
PERMISSION_VISIT_UNOWNED("plots.visit.unowned"),
|
||||
PERMISSION_VISIT_OWNED("plots.visit.owned"),
|
||||
PERMISSION_SHARED("plots.visit.shared"),
|
||||
PERMISSION_VISIT_OTHER("plots.visit.other"),
|
||||
PERMISSION_HOME("plots.home"),
|
||||
PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias"), // Note this is for backwards compatibility
|
||||
PERMISSION_ALIAS_SET("plots.alias.set"),
|
||||
PERMISSION_ADMIN_ALIAS_SET("plots.admin.alias.set"),
|
||||
PERMISSION_ALIAS_REMOVE("plots.alias.remove"),
|
||||
PERMISSION_ADMIN_ALIAS_REMOVE("plots.admin.alias.remove"),
|
||||
PERMISSION_ADMIN_CHAT_BYPASS("plots.admin.chat.bypass"),
|
||||
PERMISSION_BACKUP("plots.backup"),
|
||||
PERMISSION_BACKUP_SAVE("plots.backup.save"),
|
||||
PERMISSION_BACKUP_LIST("plots.backup.list"),
|
||||
PERMISSION_BACKUP_LOAD("plots.backup.load"),
|
||||
PERMISSION_ADMIN_BACKUP_OTHER("plots.admin.backup.other"),
|
||||
PERMISSION_ADMIN_ALLOW_UNSAFE("plots.admin.unsafe"),
|
||||
PERMISSION_ADMIN_DEBUG_OTHER("plots.admin.debug.other");
|
||||
//</editor-fold>
|
||||
|
||||
|
||||
private final String text;
|
||||
|
||||
Permission(@Nonnull final String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
}
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.permissions;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
@ -58,15 +57,15 @@ public interface PermissionHolder {
|
||||
*/
|
||||
@Nonnegative default int hasPermissionRange(@Nonnull final String stub,
|
||||
@Nonnegative final int range) {
|
||||
if (hasPermission(Captions.PERMISSION_ADMIN.toString())) {
|
||||
if (hasPermission(Permission.PERMISSION_ADMIN.toString())) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
String[] nodes = stub.split("\\.");
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||
builder.append(nodes[i]).append(".");
|
||||
if (!stub.equals(builder + Captions.PERMISSION_STAR.toString())) {
|
||||
if (hasPermission(builder + Captions.PERMISSION_STAR.toString())) {
|
||||
if (!stub.equals(builder + Permission.PERMISSION_STAR.toString())) {
|
||||
if (hasPermission(builder + Permission.PERMISSION_STAR.toString())) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import com.google.common.collect.Sets;
|
||||
import com.google.inject.Inject;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.command.Like;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.ConfigurationUtil;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
@ -3010,7 +3010,7 @@ public class Plot {
|
||||
Template plotTemplate = Template.of("plot", this.toString());
|
||||
Template messageTemplate = Template.of("message", message);
|
||||
for (final PlotPlayer<?> player : players) {
|
||||
if (isOwner(player.getUUID()) || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_DEBUG_OTHER)) {
|
||||
if (isOwner(player.getUUID()) || Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_DEBUG_OTHER)) {
|
||||
player.sendMessage(caption, plotTemplate, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.plot;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.plot.comment;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.inject.TypeLiteral;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.plot.flag;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.flag.InternalFlag;
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.FlagParseException;
|
||||
import com.plotsquared.core.plot.flag.types.TimedFlag;
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.implementations;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.PlotWeather;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.plot.flag.types;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.FlagParseException;
|
||||
import com.plotsquared.core.util.BlockUtil;
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.plot.flag.types;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.FlagParseException;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.plot.flag.types;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.FlagParseException;
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.plot.flag.types;
|
||||
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.util.StringMan;
|
||||
|
||||
|
@ -27,7 +27,6 @@ package com.plotsquared.core.setup;
|
||||
|
||||
import com.plotsquared.core.command.Command;
|
||||
import com.plotsquared.core.command.RequiredType;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationNode;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
|
@ -27,7 +27,7 @@ package com.plotsquared.core.util;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.plotsquared.core.configuration.caption.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.events.PlayerAutoPlotEvent;
|
||||
@ -281,11 +281,11 @@ public class EventDispatcher {
|
||||
case INTERACT_BLOCK: {
|
||||
if (plot == null) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
}
|
||||
final List<BlockTypeWrapper> use = plot.getFlag(UseFlag.class);
|
||||
for (final BlockTypeWrapper blockTypeWrapper : use) {
|
||||
@ -294,7 +294,7 @@ public class EventDispatcher {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.toString(), false)) {
|
||||
if (Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString(), false)) {
|
||||
return true;
|
||||
}
|
||||
if (notifyPerms) {
|
||||
@ -306,11 +306,11 @@ public class EventDispatcher {
|
||||
case TRIGGER_PHYSICAL: {
|
||||
if (plot == null) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.toString(), false);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString(), false);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), false);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), false);
|
||||
}
|
||||
if (plot.getFlag(DeviceInteractFlag.class)) {
|
||||
return true;
|
||||
@ -323,17 +323,17 @@ public class EventDispatcher {
|
||||
}
|
||||
}
|
||||
return Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
false);
|
||||
}
|
||||
case SPAWN_MOB: {
|
||||
if (plot == null) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
}
|
||||
if (plot.getFlag(MobPlaceFlag.class)) {
|
||||
return true;
|
||||
@ -346,7 +346,7 @@ public class EventDispatcher {
|
||||
}
|
||||
}
|
||||
if (Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
false)) {
|
||||
return true;
|
||||
}
|
||||
@ -360,11 +360,11 @@ public class EventDispatcher {
|
||||
case PLACE_MISC: {
|
||||
if (plot == null) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
}
|
||||
if (plot.getFlag(MiscPlaceFlag.class)) {
|
||||
return true;
|
||||
@ -377,7 +377,7 @@ public class EventDispatcher {
|
||||
}
|
||||
}
|
||||
if (Permissions
|
||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString(),
|
||||
false)) {
|
||||
return true;
|
||||
}
|
||||
@ -391,11 +391,11 @@ public class EventDispatcher {
|
||||
case PLACE_VEHICLE:
|
||||
if (plot == null) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString(), notifyPerms);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return Permissions.hasPermission(player,
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
Permission.PERMISSION_ADMIN_INTERACT_UNOWNED.toString(), notifyPerms);
|
||||
}
|
||||
return plot.getFlag(VehiclePlaceFlag.class);
|
||||
default:
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.permissions.PermissionHolder;
|
||||
@ -41,8 +41,8 @@ import javax.annotation.Nonnull;
|
||||
*/
|
||||
public class Permissions {
|
||||
|
||||
public static boolean hasPermission(PlotPlayer<?> player, Captions caption, boolean notify) {
|
||||
return hasPermission(player, caption.toString(), notify);
|
||||
public static boolean hasPermission(PlotPlayer<?> player, Permission permission, boolean notify) {
|
||||
return hasPermission(player, permission.toString(), notify);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,7 +51,7 @@ public class Permissions {
|
||||
* @param permission Permission
|
||||
* @return {@code true} if the owner has the given permission, else {@code false}
|
||||
*/
|
||||
public static boolean hasPermission(@Nonnull final PermissionHolder caller, @Nonnull final Captions permission) {
|
||||
public static boolean hasPermission(@Nonnull final PermissionHolder caller, @Nonnull final Permission permission) {
|
||||
return caller.hasPermission(permission.toString());
|
||||
}
|
||||
|
||||
@ -86,8 +86,8 @@ public class Permissions {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int hasPermissionRange(PlotPlayer<?> player, Captions perm, int range) {
|
||||
return hasPermissionRange(player, perm.toString(), range);
|
||||
public static int hasPermissionRange(PlotPlayer<?> player, Permission Permission, int range) {
|
||||
return hasPermissionRange(player, Permission.toString(), range);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
|
Loading…
Reference in New Issue
Block a user