mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
parent
539ad9f05c
commit
8f685b754a
@ -223,8 +223,8 @@ import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils
|
|||||||
if (!chunk.isLoaded()) {
|
if (!chunk.isLoaded()) {
|
||||||
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
||||||
TaskManager.tasks.remove(currentIndex);
|
TaskManager.tasks.remove(currentIndex);
|
||||||
PlotSquared
|
PlotSquared.debug(Captions.PREFIX.getTranslated()
|
||||||
.debug(Captions.PREFIX.s() + "&aSuccessfully processed and unloaded chunk!");
|
+ "&aSuccessfully processed and unloaded chunk!");
|
||||||
chunk.unload(true);
|
chunk.unload(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -232,8 +232,8 @@ import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils
|
|||||||
if (tiles.length == 0) {
|
if (tiles.length == 0) {
|
||||||
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
||||||
TaskManager.tasks.remove(currentIndex);
|
TaskManager.tasks.remove(currentIndex);
|
||||||
PlotSquared
|
PlotSquared.debug(Captions.PREFIX.getTranslated()
|
||||||
.debug(Captions.PREFIX.s() + "&aSuccessfully processed and unloaded chunk!");
|
+ "&aSuccessfully processed and unloaded chunk!");
|
||||||
chunk.unload(true);
|
chunk.unload(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -243,8 +243,8 @@ import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils
|
|||||||
if (i >= tiles.length) {
|
if (i >= tiles.length) {
|
||||||
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
||||||
TaskManager.tasks.remove(currentIndex);
|
TaskManager.tasks.remove(currentIndex);
|
||||||
PlotSquared.debug(
|
PlotSquared.debug(Captions.PREFIX.getTranslated()
|
||||||
Captions.PREFIX.s() + "&aSuccessfully processed and unloaded chunk!");
|
+ "&aSuccessfully processed and unloaded chunk!");
|
||||||
chunk.unload(true);
|
chunk.unload(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -268,13 +268,15 @@ import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlotSquared.debug(
|
PlotSquared.debug(
|
||||||
Captions.PREFIX.s() + "&a detected unsafe chunk and processed: " + (chunk.getX()
|
Captions.PREFIX.getTranslated() + "&a detected unsafe chunk and processed: " + (
|
||||||
|
chunk.getX()
|
||||||
<< 4) + "," + (chunk.getX() << 4));
|
<< 4) + "," + (chunk.getX() << 4));
|
||||||
}
|
}
|
||||||
if (tiles.length > Settings.Chunk_Processor.MAX_TILES) {
|
if (tiles.length > Settings.Chunk_Processor.MAX_TILES) {
|
||||||
if (unload) {
|
if (unload) {
|
||||||
PlotSquared.debug(
|
PlotSquared.debug(
|
||||||
Captions.PREFIX.s() + "&c detected unsafe chunk: " + (chunk.getX() << 4) + ","
|
Captions.PREFIX.getTranslated() + "&c detected unsafe chunk: " + (chunk.getX()
|
||||||
|
<< 4) + ","
|
||||||
+ (chunk.getX() << 4));
|
+ (chunk.getX() << 4));
|
||||||
cleanChunk(chunk);
|
cleanChunk(chunk);
|
||||||
return true;
|
return true;
|
||||||
|
@ -637,7 +637,7 @@ import java.util.regex.Pattern;
|
|||||||
EventUtil.manager.doJoinTask(pp);
|
EventUtil.manager.doJoinTask(pp);
|
||||||
}, 20);
|
}, 20);
|
||||||
|
|
||||||
if (pp.hasPermission(Captions.PERMISSION_ADMIN_UPDATE_NOTIFICATION.s())
|
if (pp.hasPermission(Captions.PERMISSION_ADMIN_UPDATE_NOTIFICATION.getTranslated())
|
||||||
&& PlotSquared.get().getUpdateUtility() != null) {
|
&& PlotSquared.get().getUpdateUtility() != null) {
|
||||||
final UpdateUtility updateUtility = PlotSquared.get().getUpdateUtility();
|
final UpdateUtility updateUtility = PlotSquared.get().getUpdateUtility();
|
||||||
final BukkitMain bukkitMain = BukkitMain.getPlugin(BukkitMain.class);
|
final BukkitMain bukkitMain = BukkitMain.getPlugin(BukkitMain.class);
|
||||||
@ -941,7 +941,7 @@ import java.util.regex.Pattern;
|
|||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
String message = event.getMessage();
|
String message = event.getMessage();
|
||||||
String format = Captions.PLOT_CHAT_FORMAT.s();
|
String format = Captions.PLOT_CHAT_FORMAT.getTranslated();
|
||||||
String sender = event.getPlayer().getDisplayName();
|
String sender = event.getPlayer().getDisplayName();
|
||||||
PlotId id = plot.getId();
|
PlotId id = plot.getId();
|
||||||
Set<Player> recipients = event.getRecipients();
|
Set<Player> recipients = event.getRecipients();
|
||||||
@ -968,8 +968,8 @@ import java.util.regex.Pattern;
|
|||||||
receiver.sendMessage(full);
|
receiver.sendMessage(full);
|
||||||
}
|
}
|
||||||
if (!spies.isEmpty()) {
|
if (!spies.isEmpty()) {
|
||||||
String spyMessage =
|
String spyMessage = Captions.PLOT_CHAT_SPY_FORMAT.getTranslated()
|
||||||
Captions.PLOT_CHAT_SPY_FORMAT.s().replace("%plot_id%", id.x + ";" + id.y)
|
.replace("%plot_id%", id.x + ";" + id.y)
|
||||||
.replace("%sender%", sender).replace("%msg%", message);
|
.replace("%sender%", sender).replace("%msg%", message);
|
||||||
for (Player player : spies) {
|
for (Player player : spies) {
|
||||||
player.sendMessage(spyMessage);
|
player.sendMessage(spyMessage);
|
||||||
@ -1001,7 +1001,7 @@ import java.util.regex.Pattern;
|
|||||||
&& !Permissions
|
&& !Permissions
|
||||||
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
MainUtil.sendMessage(plotPlayer, Captions.HEIGHT_LIMIT.s()
|
MainUtil.sendMessage(plotPlayer, Captions.HEIGHT_LIMIT.getTranslated()
|
||||||
.replace("{limit}", String.valueOf(area.MAX_BUILD_HEIGHT)));
|
.replace("{limit}", String.valueOf(area.MAX_BUILD_HEIGHT)));
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
@ -2991,7 +2991,7 @@ import java.util.regex.Pattern;
|
|||||||
if ((location.getY() > area.MAX_BUILD_HEIGHT || location.getY() < area.MIN_BUILD_HEIGHT)
|
if ((location.getY() > area.MAX_BUILD_HEIGHT || location.getY() < area.MIN_BUILD_HEIGHT)
|
||||||
&& !Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
&& !Permissions.hasPermission(pp, Captions.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
MainUtil.sendMessage(pp, Captions.HEIGHT_LIMIT.s()
|
MainUtil.sendMessage(pp, Captions.HEIGHT_LIMIT.getTranslated()
|
||||||
.replace("{limit}", String.valueOf(area.MAX_BUILD_HEIGHT)));
|
.replace("{limit}", String.valueOf(area.MAX_BUILD_HEIGHT)));
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
|
@ -112,15 +112,15 @@ public class BukkitPlayer extends PlotPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public int hasPermissionRange(final String stub, final int range) {
|
@Override public int hasPermissionRange(final String stub, final int range) {
|
||||||
if (hasPermission(Captions.PERMISSION_ADMIN.s())) {
|
if (hasPermission(Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
final String[] nodes = stub.split("\\.");
|
final String[] nodes = stub.split("\\.");
|
||||||
final StringBuilder n = new StringBuilder();
|
final StringBuilder n = new StringBuilder();
|
||||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||||
n.append(nodes[i]).append(".");
|
n.append(nodes[i]).append(".");
|
||||||
if (!stub.equals(n + Captions.PERMISSION_STAR.s())) {
|
if (!stub.equals(n + Captions.PERMISSION_STAR.getTranslated())) {
|
||||||
if (hasPermission(n + Captions.PERMISSION_STAR.s())) {
|
if (hasPermission(n + Captions.PERMISSION_STAR.getTranslated())) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,6 +218,13 @@ public class FileUUIDHandler extends UUIDHandlerImplementation {
|
|||||||
StringWrapper wrap = new StringWrapper(name);
|
StringWrapper wrap = new StringWrapper(name);
|
||||||
if (!toAdd.containsKey(wrap)) {
|
if (!toAdd.containsKey(wrap)) {
|
||||||
UUID uuid = FileUUIDHandler.this.uuidWrapper.getUUID(offlinePlotPlayer);
|
UUID uuid = FileUUIDHandler.this.uuidWrapper.getUUID(offlinePlotPlayer);
|
||||||
|
if (toAdd.containsValue(uuid)) {
|
||||||
|
StringWrapper duplicate = toAdd.inverse().get(uuid);
|
||||||
|
PlotSquared.debug(
|
||||||
|
"The UUID: " + uuid.toString() + " is already mapped to "
|
||||||
|
+ duplicate
|
||||||
|
+ "\n It cannot be added to the Map with a key of " + wrap);
|
||||||
|
}
|
||||||
toAdd.putIfAbsent(wrap, uuid);
|
toAdd.putIfAbsent(wrap, uuid);
|
||||||
if (ExpireManager.IMP != null) {
|
if (ExpireManager.IMP != null) {
|
||||||
ExpireManager.IMP.storeDate(uuid, last);
|
ExpireManager.IMP.storeDate(uuid, last);
|
||||||
|
@ -165,7 +165,7 @@ import java.util.UUID;
|
|||||||
* @see Captions
|
* @see Captions
|
||||||
*/
|
*/
|
||||||
public void sendConsoleMessage(Captions caption) {
|
public void sendConsoleMessage(Captions caption) {
|
||||||
sendConsoleMessage(caption.s());
|
sendConsoleMessage(caption.getTranslated());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,19 +38,19 @@ public abstract class Command {
|
|||||||
private RequiredType required;
|
private RequiredType required;
|
||||||
private String usage;
|
private String usage;
|
||||||
private String description;
|
private String description;
|
||||||
private String perm;
|
private String permission;
|
||||||
private boolean confirmation;
|
private boolean confirmation;
|
||||||
private CommandCategory category;
|
private CommandCategory category;
|
||||||
private Argument[] arguments;
|
private Argument[] arguments;
|
||||||
|
|
||||||
public Command(Command parent, boolean isStatic, String id, String perm, RequiredType required,
|
public Command(Command parent, boolean isStatic, String id, String permission,
|
||||||
CommandCategory cat) {
|
RequiredType required, CommandCategory category) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.isStatic = isStatic;
|
this.isStatic = isStatic;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.perm = perm;
|
this.permission = permission;
|
||||||
this.required = required;
|
this.required = required;
|
||||||
this.category = cat;
|
this.category = category;
|
||||||
this.aliases = Arrays.asList(id);
|
this.aliases = Arrays.asList(id);
|
||||||
if (this.parent != null) {
|
if (this.parent != null) {
|
||||||
this.parent.register(this);
|
this.parent.register(this);
|
||||||
@ -154,7 +154,7 @@ public abstract class Command {
|
|||||||
|
|
||||||
public void init(CommandDeclaration declaration) {
|
public void init(CommandDeclaration declaration) {
|
||||||
this.id = declaration.command();
|
this.id = declaration.command();
|
||||||
this.perm = declaration.permission();
|
this.permission = declaration.permission();
|
||||||
this.required = declaration.requiredType();
|
this.required = declaration.requiredType();
|
||||||
this.category = declaration.category();
|
this.category = declaration.category();
|
||||||
List<String> aliasOptions = new ArrayList<>();
|
List<String> aliasOptions = new ArrayList<>();
|
||||||
@ -204,8 +204,8 @@ public abstract class Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getPermission() {
|
public String getPermission() {
|
||||||
if (this.perm != null && !this.perm.isEmpty()) {
|
if (this.permission != null && !this.permission.isEmpty()) {
|
||||||
return this.perm;
|
return this.permission;
|
||||||
}
|
}
|
||||||
if (this.parent == null) {
|
if (this.parent == null) {
|
||||||
return "plots.use";
|
return "plots.use";
|
||||||
@ -244,18 +244,19 @@ public abstract class Command {
|
|||||||
if (page < totalPages && page > 0) { // Back | Next
|
if (page < totalPages && page > 0) { // Back | Next
|
||||||
new PlotMessage().text("<-").color("$1").command(baseCommand + " " + page).text(" | ")
|
new PlotMessage().text("<-").color("$1").command(baseCommand + " " + page).text(" | ")
|
||||||
.color("$3").text("->").color("$1").command(baseCommand + " " + (page + 2))
|
.color("$3").text("->").color("$1").command(baseCommand + " " + (page + 2))
|
||||||
.text(Captions.CLICKABLE.s()).color("$2").send(player);
|
.text(Captions.CLICKABLE.getTranslated()).color("$2").send(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (page == 0 && totalPages != 0) { // Next
|
if (page == 0 && totalPages != 0) { // Next
|
||||||
new PlotMessage().text("<-").color("$3").text(" | ").color("$3").text("->").color("$1")
|
new PlotMessage().text("<-").color("$3").text(" | ").color("$3").text("->").color("$1")
|
||||||
.command(baseCommand + " " + 2).text(Captions.CLICKABLE.s()).color("$2")
|
.command(baseCommand + " " + 2).text(Captions.CLICKABLE.getTranslated()).color("$2")
|
||||||
.send(player);
|
.send(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (totalPages != 0) { // Back
|
if (totalPages != 0) { // Back
|
||||||
new PlotMessage().text("<-").color("$1").command(baseCommand + " " + page).text(" | ")
|
new PlotMessage().text("<-").color("$1").command(baseCommand + " " + page).text(" | ")
|
||||||
.color("$3").text("->").color("$3").text(Captions.CLICKABLE.s()).color("$2")
|
.color("$3").text("->").color("$3").text(Captions.CLICKABLE.getTranslated())
|
||||||
|
.color("$2")
|
||||||
.send(player);
|
.send(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,7 +490,7 @@ public abstract class Command {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<Command> result = new ArrayList<>();
|
List<Command> result = new ArrayList<>();
|
||||||
int index = input.length - (space ? 0 : 1);
|
int index = input.length;
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
arg = arg.replace(getCommandString() + " ", "");
|
arg = arg.replace(getCommandString() + " ", "");
|
||||||
String[] split = arg.split(" ");
|
String[] split = arg.split(" ");
|
||||||
|
@ -54,8 +54,7 @@ import java.util.zip.ZipInputStream;
|
|||||||
* An implementation of the core, with a static getter for easy access.
|
* An implementation of the core, with a static getter for easy access.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unused", "WeakerAccess"}) public class PlotSquared {
|
@SuppressWarnings({"unused", "WeakerAccess"}) public class PlotSquared {
|
||||||
private static final Set<Plot> EMPTY_SET = Collections.
|
private static final Set<Plot> EMPTY_SET = Collections.unmodifiableSet(Collections.emptySet());
|
||||||
unmodifiableSet(Collections.emptySet());
|
|
||||||
private static PlotSquared instance;
|
private static PlotSquared instance;
|
||||||
// Implementation
|
// Implementation
|
||||||
public final IPlotMain IMP;
|
public final IPlotMain IMP;
|
||||||
@ -217,21 +216,6 @@ import java.util.zip.ZipInputStream;
|
|||||||
.runTask(() -> EconHandler.manager = PlotSquared.this.IMP.getEconomyHandler());
|
.runTask(() -> EconHandler.manager = PlotSquared.this.IMP.getEconomyHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* // Check for updates
|
|
||||||
if (Settings.Enabled_Components.UPDATER) {
|
|
||||||
updater = new Updater();
|
|
||||||
TaskManager.IMP.taskAsync(new Runnable() {
|
|
||||||
@Override public void run() {
|
|
||||||
updater.update(getPlatform(), getVersion());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
TaskManager.IMP.taskRepeatAsync(new Runnable() {
|
|
||||||
@Override public void run() {
|
|
||||||
updater.update(getPlatform(), getVersion());
|
|
||||||
}
|
|
||||||
}, 36000);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// World generators:
|
// World generators:
|
||||||
final ConfigurationSection section = this.worlds.getConfigurationSection("worlds");
|
final ConfigurationSection section = this.worlds.getConfigurationSection("worlds");
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
@ -249,13 +233,14 @@ import java.util.zip.ZipInputStream;
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!WorldUtil.IMP.isWorld(world) && !world.equals("*")) {
|
if (!WorldUtil.IMP.isWorld(world) && !world.equals("*")) {
|
||||||
debug(
|
debug("`" + world + "` was not properly loaded - " + IMP.getPluginName()
|
||||||
"&c`" + world + "` was not properly loaded - " + IMP.getPluginName()
|
|
||||||
+ " will now try to load it properly: ");
|
+ " will now try to load it properly: ");
|
||||||
debug(
|
debug(
|
||||||
"&8 - &7Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
" - Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
||||||
debug(
|
debug(
|
||||||
"&8 - &7Your world management plugin may be faulty (or non existent)");
|
" - Your world management plugin may be faulty (or non existent)");
|
||||||
|
debug(
|
||||||
|
" This message may also be a false positive and could be ignored.");
|
||||||
PlotSquared.this.IMP.setGenerator(world);
|
PlotSquared.this.IMP.setGenerator(world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -614,9 +599,7 @@ import java.util.zip.ZipInputStream;
|
|||||||
*/
|
*/
|
||||||
private void sortPlotsByHash(Plot[] input) {
|
private void sortPlotsByHash(Plot[] input) {
|
||||||
List<Plot>[] bucket = new ArrayList[32];
|
List<Plot>[] bucket = new ArrayList[32];
|
||||||
for (int i = 0; i < bucket.length; i++) {
|
Arrays.fill(bucket, new ArrayList<>());
|
||||||
bucket[i] = new ArrayList<>();
|
|
||||||
}
|
|
||||||
boolean maxLength = false;
|
boolean maxLength = false;
|
||||||
int placement = 1;
|
int placement = 1;
|
||||||
while (!maxLength) {
|
while (!maxLength) {
|
||||||
@ -1191,7 +1174,7 @@ import java.util.zip.ZipInputStream;
|
|||||||
"Invalid type for multi-area world. Expected `2`, got `" + 1 + "`");
|
"Invalid type for multi-area world. Expected `2`, got `" + 1 + "`");
|
||||||
}
|
}
|
||||||
for (String areaId : areasSection.getKeys(false)) {
|
for (String areaId : areasSection.getKeys(false)) {
|
||||||
PlotSquared.log(Captions.PREFIX + "&3 - " + areaId);
|
PlotSquared.log(Captions.PREFIX + " - " + areaId);
|
||||||
String[] split = areaId.split("(?<=[^;-])-");
|
String[] split = areaId.split("(?<=[^;-])-");
|
||||||
if (split.length != 3) {
|
if (split.length != 3) {
|
||||||
throw new IllegalArgumentException("Invalid Area identifier: " + areaId
|
throw new IllegalArgumentException("Invalid Area identifier: " + areaId
|
||||||
@ -1678,11 +1661,11 @@ import java.util.zip.ZipInputStream;
|
|||||||
.getString("configuration_version")
|
.getString("configuration_version")
|
||||||
.equalsIgnoreCase(LegacyConverter.CONFIGURATION_VERSION)) {
|
.equalsIgnoreCase(LegacyConverter.CONFIGURATION_VERSION)) {
|
||||||
// Conversion needed
|
// Conversion needed
|
||||||
log(Captions.LEGACY_CONFIG_FOUND.s());
|
log(Captions.LEGACY_CONFIG_FOUND.getTranslated());
|
||||||
try {
|
try {
|
||||||
com.google.common.io.Files
|
com.google.common.io.Files
|
||||||
.copy(this.worldsFile, new File(folder, "worlds.yml.old"));
|
.copy(this.worldsFile, new File(folder, "worlds.yml.old"));
|
||||||
log(Captions.LEGACY_CONFIG_BACKUP.s());
|
log(Captions.LEGACY_CONFIG_BACKUP.getTranslated());
|
||||||
final ConfigurationSection worlds =
|
final ConfigurationSection worlds =
|
||||||
this.worlds.getConfigurationSection("worlds");
|
this.worlds.getConfigurationSection("worlds");
|
||||||
final LegacyConverter converter = new LegacyConverter(worlds);
|
final LegacyConverter converter = new LegacyConverter(worlds);
|
||||||
@ -1691,9 +1674,9 @@ import java.util.zip.ZipInputStream;
|
|||||||
.set("configuration_version", LegacyConverter.CONFIGURATION_VERSION);
|
.set("configuration_version", LegacyConverter.CONFIGURATION_VERSION);
|
||||||
this.worlds.set("worlds", worlds); // Redundant, but hey... ¯\_(ツ)_/¯
|
this.worlds.set("worlds", worlds); // Redundant, but hey... ¯\_(ツ)_/¯
|
||||||
this.worlds.save(this.worldsFile);
|
this.worlds.save(this.worldsFile);
|
||||||
log(Captions.LEGACY_CONFIG_DONE.s());
|
log(Captions.LEGACY_CONFIG_DONE.getTranslated());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log(Captions.LEGACY_CONFIG_CONVERSION_FAILED.s());
|
log(Captions.LEGACY_CONFIG_CONVERSION_FAILED.getTranslated());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// Disable plugin
|
// Disable plugin
|
||||||
|
@ -101,13 +101,14 @@ import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
plot.setAlias(alias);
|
plot.setAlias(alias);
|
||||||
MainUtil.sendMessage(player, Captions.ALIAS_SET_TO.s().replaceAll("%alias%", alias));
|
MainUtil.sendMessage(player,
|
||||||
|
Captions.ALIAS_SET_TO.getTranslated().replaceAll("%alias%", alias));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean removeAlias(PlotPlayer player, Plot plot) {
|
private boolean removeAlias(PlotPlayer player, Plot plot) {
|
||||||
plot.setAlias(null);
|
plot.setAlias(null);
|
||||||
MainUtil.sendMessage(player, Captions.ALIAS_REMOVED.s());
|
MainUtil.sendMessage(player, Captions.ALIAS_REMOVED.getTranslated());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,8 +331,8 @@ import java.util.Set;
|
|||||||
+ "\n$1Claimed: $2" + claimed + "\n$1Clusters: $2" + clusters + "\n$1Region: $2"
|
+ "\n$1Claimed: $2" + claimed + "\n$1Clusters: $2" + clusters + "\n$1Region: $2"
|
||||||
+ region + "\n$1Generator: $2" + generator;
|
+ region + "\n$1Generator: $2" + generator;
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
Captions.PLOT_INFO_HEADER.s() + '\n' + value + '\n' + Captions.PLOT_INFO_FOOTER
|
Captions.PLOT_INFO_HEADER.getTranslated() + '\n' + value + '\n'
|
||||||
.s(), false);
|
+ Captions.PLOT_INFO_FOOTER.getTranslated(), false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "l":
|
case "l":
|
||||||
@ -394,7 +394,7 @@ import java.util.Set;
|
|||||||
.color("$1").text(" - ").color("$2")
|
.color("$1").text(" - ").color("$2")
|
||||||
.text(area.TYPE + ":" + area.TERRAIN).color("$3");
|
.text(area.TYPE + ":" + area.TERRAIN).color("$3");
|
||||||
}
|
}
|
||||||
}, "/plot area list", Captions.AREA_LIST_HEADER_PAGED.s());
|
}, "/plot area list", Captions.AREA_LIST_HEADER_PAGED.getTranslated());
|
||||||
return true;
|
return true;
|
||||||
case "regen":
|
case "regen":
|
||||||
case "clear":
|
case "clear":
|
||||||
|
@ -16,10 +16,11 @@ import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
|||||||
@Override public boolean set(final PlotPlayer player, final Plot plot, final String value) {
|
@Override public boolean set(final PlotPlayer player, final Plot plot, final String value) {
|
||||||
int biome = WorldUtil.IMP.getBiomeFromString(value);
|
int biome = WorldUtil.IMP.getBiomeFromString(value);
|
||||||
if (biome == -1) {
|
if (biome == -1) {
|
||||||
String biomes =
|
String biomes = StringMan
|
||||||
StringMan.join(WorldUtil.IMP.getBiomeList(), Captions.BLOCK_LIST_SEPARATER.s());
|
.join(WorldUtil.IMP.getBiomeList(), Captions.BLOCK_LIST_SEPARATER.getTranslated());
|
||||||
Captions.NEED_BIOME.send(player);
|
Captions.NEED_BIOME.send(player);
|
||||||
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.s() + biomes);
|
MainUtil.sendMessage(player,
|
||||||
|
Captions.SUBCOMMAND_SET_OPTIONS_HEADER.getTranslated() + biomes);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (plot.getRunning() > 0) {
|
if (plot.getRunning() > 0) {
|
||||||
@ -29,7 +30,8 @@ import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
|||||||
plot.addRunning();
|
plot.addRunning();
|
||||||
plot.setBiome(value.toUpperCase(), () -> {
|
plot.setBiome(value.toUpperCase(), () -> {
|
||||||
plot.removeRunning();
|
plot.removeRunning();
|
||||||
MainUtil.sendMessage(player, Captions.BIOME_SET_TO.s() + value.toLowerCase());
|
MainUtil
|
||||||
|
.sendMessage(player, Captions.BIOME_SET_TO.getTranslated() + value.toLowerCase());
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,8 @@ import java.util.UUID;
|
|||||||
Settings.Limit.MAX_PLOTS);
|
Settings.Limit.MAX_PLOTS);
|
||||||
if (current + cluster.getArea() > allowed) {
|
if (current + cluster.getArea() > allowed) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
||||||
Captions.PERMISSION_CLUSTER.s() + "." + (current + cluster.getArea()));
|
Captions.PERMISSION_CLUSTER.getTranslated() + "." + (current + cluster
|
||||||
|
.getArea()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// resize cluster
|
// resize cluster
|
||||||
@ -588,7 +589,7 @@ import java.util.UUID;
|
|||||||
String size = (cluster.getP2().x - cluster.getP1().x + 1) + "x" + (
|
String size = (cluster.getP2().x - cluster.getP1().x + 1) + "x" + (
|
||||||
cluster.getP2().y - cluster.getP1().y + 1);
|
cluster.getP2().y - cluster.getP1().y + 1);
|
||||||
String rights = cluster.isAdded(player.getUUID()) + "";
|
String rights = cluster.isAdded(player.getUUID()) + "";
|
||||||
String message = Captions.CLUSTER_INFO.s();
|
String message = Captions.CLUSTER_INFO.getTranslated();
|
||||||
message = message.replaceAll("%id%", id);
|
message = message.replaceAll("%id%", id);
|
||||||
message = message.replaceAll("%owner%", owner);
|
message = message.replaceAll("%owner%", owner);
|
||||||
message = message.replaceAll("%name%", name);
|
message = message.replaceAll("%name%", name);
|
||||||
|
@ -16,7 +16,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
* Teleportation CommandConfig.
|
* Teleportation CommandConfig.
|
||||||
* Such as: /plot visit
|
* Such as: /plot visit
|
||||||
*/
|
*/
|
||||||
TELEPORT(Captions.COMMAND_CATEGORY_TELEPPORT),
|
TELEPORT(Captions.COMMAND_CATEGORY_TELEPORT),
|
||||||
/**
|
/**
|
||||||
* Protection.
|
* Protection.
|
||||||
*/
|
*/
|
||||||
@ -53,6 +53,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
private final Captions caption;
|
private final Captions caption;
|
||||||
|
|
||||||
@Override public String toString() {
|
@Override public String toString() {
|
||||||
return this.caption.s();
|
return this.caption.getTranslated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
|||||||
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
||||||
}
|
}
|
||||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN.s())) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -15,15 +15,15 @@ public class Debug extends SubCommand {
|
|||||||
if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) {
|
if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) {
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
for (Captions caption : Captions.values()) {
|
for (Captions caption : Captions.values()) {
|
||||||
msg.append(caption.s()).append("\n");
|
msg.append(caption.getTranslated()).append("\n");
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, msg.toString());
|
MainUtil.sendMessage(player, msg.toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
StringBuilder information = new StringBuilder();
|
StringBuilder information = new StringBuilder();
|
||||||
String header = Captions.DEBUG_HEADER.s();
|
String header = Captions.DEBUG_HEADER.getTranslated();
|
||||||
String line = Captions.DEBUG_LINE.s();
|
String line = Captions.DEBUG_LINE.getTranslated();
|
||||||
String section = Captions.DEBUG_SECTION.s();
|
String section = Captions.DEBUG_SECTION.getTranslated();
|
||||||
information.append(header);
|
information.append(header);
|
||||||
information.append(getSection(section, "PlotArea"));
|
information.append(getSection(section, "PlotArea"));
|
||||||
information.append(
|
information.append(
|
||||||
|
@ -124,8 +124,8 @@ import java.util.stream.Collectors;
|
|||||||
final String pasteId = jsonObject.get("paste_id").getAsString();
|
final String pasteId = jsonObject.get("paste_id").getAsString();
|
||||||
final String link =
|
final String link =
|
||||||
String.format("https://athion.net/ISPaster/paste/view/%s", pasteId);
|
String.format("https://athion.net/ISPaster/paste/view/%s", pasteId);
|
||||||
player
|
player.sendMessage(
|
||||||
.sendMessage(Captions.DEBUG_REPORT_CREATED.s().replace("%url%", link));
|
Captions.DEBUG_REPORT_CREATED.getTranslated().replace("%url%", link));
|
||||||
} else {
|
} else {
|
||||||
final String responseMessage = jsonObject.get("response").getAsString();
|
final String responseMessage = jsonObject.get("response").getAsString();
|
||||||
MainUtil.sendMessage(player, String
|
MainUtil.sendMessage(player, String
|
||||||
|
@ -105,7 +105,7 @@ import java.util.UUID;
|
|||||||
WorldUtil.IMP.getSpawn(PlotSquared.get().getPlotAreaManager().getAllWorlds()[0]);
|
WorldUtil.IMP.getSpawn(PlotSquared.get().getPlotAreaManager().getAllWorlds()[0]);
|
||||||
if (plot.equals(newSpawn.getPlot())) {
|
if (plot.equals(newSpawn.getPlot())) {
|
||||||
// Kick from server if you can't be teleported to spawn
|
// Kick from server if you can't be teleported to spawn
|
||||||
player.kick(Captions.YOU_GOT_DENIED.s());
|
player.kick(Captions.YOU_GOT_DENIED.getTranslated());
|
||||||
} else {
|
} else {
|
||||||
player.teleport(newSpawn);
|
player.teleport(newSpawn);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,11 @@ import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
|
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.*;
|
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.StringMan;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
||||||
import com.sk89q.jnbt.CompoundTag;
|
import com.sk89q.jnbt.CompoundTag;
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -37,7 +41,7 @@ import java.net.URL;
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((!plot.isOwner(player.getUUID())) && !Permissions
|
if ((!plot.isOwner(player.getUUID())) && !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN.s())) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ public class GenerateDocs {
|
|||||||
|
|
||||||
Matcher m2 = p2.matcher(line);
|
Matcher m2 = p2.matcher(line);
|
||||||
while (m2.find()) {
|
while (m2.find()) {
|
||||||
perms.add(Captions.valueOf("PERMISSION_" + m2.group(1)).s());
|
perms.add(Captions.valueOf("PERMISSION_" + m2.group(1)).getTranslated());
|
||||||
}
|
}
|
||||||
if (line.contains("Permissions.hasPermission(")) {
|
if (line.contains("Permissions.hasPermission(")) {
|
||||||
String[] split = line.split("Permissions.hasPermission");
|
String[] split = line.split("Permissions.hasPermission");
|
||||||
@ -151,7 +151,7 @@ public class GenerateDocs {
|
|||||||
String perm = method.split("[,|)]")[1].trim();
|
String perm = method.split("[,|)]")[1].trim();
|
||||||
if (!perm.equalsIgnoreCase(perm)) {
|
if (!perm.equalsIgnoreCase(perm)) {
|
||||||
if (perm.startsWith("C.")) {
|
if (perm.startsWith("C.")) {
|
||||||
perm = Captions.valueOf(perm.split("\\.")[1]).s();
|
perm = Captions.valueOf(perm.split("\\.")[1]).getTranslated();
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ public class GenerateDocs {
|
|||||||
String perm = method.split("[,|)]")[1].trim();
|
String perm = method.split("[,|)]")[1].trim();
|
||||||
if (!perm.equalsIgnoreCase(perm)) {
|
if (!perm.equalsIgnoreCase(perm)) {
|
||||||
if (perm.startsWith("C.")) {
|
if (perm.startsWith("C.")) {
|
||||||
perm = Captions.valueOf(perm.split("\\.")[1]).s();
|
perm = Captions.valueOf(perm.split("\\.")[1]).getTranslated();
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -77,16 +77,17 @@ public class Help extends Command {
|
|||||||
}
|
}
|
||||||
if (cat == null && page == 0) {
|
if (cat == null && page == 0) {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append(Captions.HELP_HEADER.s());
|
builder.append(Captions.HELP_HEADER.getTranslated());
|
||||||
for (CommandCategory c : CommandCategory.values()) {
|
for (CommandCategory c : CommandCategory.values()) {
|
||||||
builder.append("\n").append(StringMan
|
builder.append("\n").append(StringMan
|
||||||
.replaceAll(Captions.HELP_INFO_ITEM.s(), "%category%", c.toString().toLowerCase(),
|
.replaceAll(Captions.HELP_INFO_ITEM.getTranslated(), "%category%",
|
||||||
|
c.toString().toLowerCase(),
|
||||||
"%category_desc%", c.toString()));
|
"%category_desc%", c.toString()));
|
||||||
}
|
}
|
||||||
builder.append("\n")
|
builder.append("\n")
|
||||||
.append(Captions.HELP_INFO_ITEM.s().replaceAll("%category%", "all")
|
.append(Captions.HELP_INFO_ITEM.getTranslated().replaceAll("%category%", "all")
|
||||||
.replaceAll("%category_desc%", "Display all commands"));
|
.replaceAll("%category_desc%", "Display all commands"));
|
||||||
builder.append("\n").append(Captions.HELP_FOOTER.s());
|
builder.append("\n").append(Captions.HELP_FOOTER.getTranslated());
|
||||||
MainUtil.sendMessage(player, builder.toString(), false);
|
MainUtil.sendMessage(player, builder.toString(), false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@ import java.util.List;
|
|||||||
}
|
}
|
||||||
StringBuilder string = new StringBuilder();
|
StringBuilder string = new StringBuilder();
|
||||||
string.append(StringMan
|
string.append(StringMan
|
||||||
.replaceAll(Captions.COMMENT_LIST_HEADER_PAGED.s(), "%amount%", comments.length, "%cur",
|
.replaceAll(Captions.COMMENT_LIST_HEADER_PAGED.getTranslated(), "%amount%",
|
||||||
|
comments.length, "%cur",
|
||||||
page + 1, "%max", totalPages + 1, "%word", "all") + '\n');
|
page + 1, "%max", totalPages + 1, "%word", "all") + '\n');
|
||||||
|
|
||||||
// This might work xD
|
// This might work xD
|
||||||
|
@ -5,7 +5,11 @@ import com.github.intellectualsites.plotsquared.plot.config.Captions;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
||||||
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
||||||
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.*;
|
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.PlotInventory;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager;
|
import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager;
|
||||||
|
|
||||||
@ -53,7 +57,7 @@ public class Info extends SubCommand {
|
|||||||
plot = player.getCurrentPlot();
|
plot = player.getCurrentPlot();
|
||||||
}
|
}
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
MainUtil.sendMessage(player, Captions.NOT_IN_PLOT.s());
|
MainUtil.sendMessage(player, Captions.NOT_IN_PLOT.getTranslated());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +74,8 @@ public class Info extends SubCommand {
|
|||||||
boolean allowed = false;
|
boolean allowed = false;
|
||||||
for (final String argument : args) {
|
for (final String argument : args) {
|
||||||
if (argument.equalsIgnoreCase("-f")) {
|
if (argument.equalsIgnoreCase("-f")) {
|
||||||
if (!player.hasPermission(Captions.PERMISSION_AREA_INFO_FORCE.s())) {
|
if (!player
|
||||||
|
.hasPermission(Captions.PERMISSION_AREA_INFO_FORCE.getTranslated())) {
|
||||||
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_AREA_INFO_FORCE);
|
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_AREA_INFO_FORCE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -125,7 +130,7 @@ public class Info extends SubCommand {
|
|||||||
plot.getId().x + ";" + plot.getId().y);
|
plot.getId().x + ";" + plot.getId().y);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String info = Captions.PLOT_INFO.s();
|
String info = Captions.PLOT_INFO.getTranslated();
|
||||||
boolean full;
|
boolean full;
|
||||||
if (arg != null) {
|
if (arg != null) {
|
||||||
info = getCaption(arg);
|
info = getCaption(arg);
|
||||||
@ -148,8 +153,8 @@ public class Info extends SubCommand {
|
|||||||
MainUtil.format(info, plot, player, full, new RunnableVal<String>() {
|
MainUtil.format(info, plot, player, full, new RunnableVal<String>() {
|
||||||
@Override public void run(String value) {
|
@Override public void run(String value) {
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
Captions.PLOT_INFO_HEADER.s() + '\n' + value + '\n' + Captions.PLOT_INFO_FOOTER
|
Captions.PLOT_INFO_HEADER.getTranslated() + '\n' + value + '\n'
|
||||||
.s(), false);
|
+ Captions.PLOT_INFO_FOOTER.getTranslated(), false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@ -158,29 +163,29 @@ public class Info extends SubCommand {
|
|||||||
private String getCaption(String string) {
|
private String getCaption(String string) {
|
||||||
switch (string) {
|
switch (string) {
|
||||||
case "trusted":
|
case "trusted":
|
||||||
return Captions.PLOT_INFO_TRUSTED.s();
|
return Captions.PLOT_INFO_TRUSTED.getTranslated();
|
||||||
case "alias":
|
case "alias":
|
||||||
return Captions.PLOT_INFO_ALIAS.s();
|
return Captions.PLOT_INFO_ALIAS.getTranslated();
|
||||||
case "biome":
|
case "biome":
|
||||||
return Captions.PLOT_INFO_BIOME.s();
|
return Captions.PLOT_INFO_BIOME.getTranslated();
|
||||||
case "denied":
|
case "denied":
|
||||||
return Captions.PLOT_INFO_DENIED.s();
|
return Captions.PLOT_INFO_DENIED.getTranslated();
|
||||||
case "flags":
|
case "flags":
|
||||||
return Captions.PLOT_INFO_FLAGS.s();
|
return Captions.PLOT_INFO_FLAGS.getTranslated();
|
||||||
case "id":
|
case "id":
|
||||||
return Captions.PLOT_INFO_ID.s();
|
return Captions.PLOT_INFO_ID.getTranslated();
|
||||||
case "size":
|
case "size":
|
||||||
return Captions.PLOT_INFO_SIZE.s();
|
return Captions.PLOT_INFO_SIZE.getTranslated();
|
||||||
case "members":
|
case "members":
|
||||||
return Captions.PLOT_INFO_MEMBERS.s();
|
return Captions.PLOT_INFO_MEMBERS.getTranslated();
|
||||||
case "owner":
|
case "owner":
|
||||||
return Captions.PLOT_INFO_OWNER.s();
|
return Captions.PLOT_INFO_OWNER.getTranslated();
|
||||||
case "rating":
|
case "rating":
|
||||||
return Captions.PLOT_INFO_RATING.s();
|
return Captions.PLOT_INFO_RATING.getTranslated();
|
||||||
case "likes":
|
case "likes":
|
||||||
return Captions.PLOT_INFO_LIKES.s();
|
return Captions.PLOT_INFO_LIKES.getTranslated();
|
||||||
case "seen":
|
case "seen":
|
||||||
return Captions.PLOT_INFO_SEEN.s();
|
return Captions.PLOT_INFO_SEEN.getTranslated();
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ import java.util.UUID;
|
|||||||
.getSpawn(PlotSquared.get().getPlotAreaManager().getAllWorlds()[0]);
|
.getSpawn(PlotSquared.get().getPlotAreaManager().getAllWorlds()[0]);
|
||||||
if (plot.equals(newSpawn.getPlot())) {
|
if (plot.equals(newSpawn.getPlot())) {
|
||||||
// Kick from server if you can't be teleported to spawn
|
// Kick from server if you can't be teleported to spawn
|
||||||
player2.kick(Captions.YOU_GOT_KICKED.s());
|
player2.kick(Captions.YOU_GOT_KICKED.getTranslated());
|
||||||
} else {
|
} else {
|
||||||
player2.plotkick(newSpawn);
|
player2.plotkick(newSpawn);
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,8 @@ public class ListCmd extends SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void noArgs(PlotPlayer player) {
|
public void noArgs(PlotPlayer player) {
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.getTranslated() + Arrays
|
||||||
Captions.SUBCOMMAND_SET_OPTIONS_HEADER.s() + Arrays.toString(getArgumentList(player)));
|
.toString(getArgumentList(player)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
||||||
@ -367,19 +367,19 @@ public class ListCmd extends SubCommand {
|
|||||||
color = "$1";
|
color = "$1";
|
||||||
}
|
}
|
||||||
PlotMessage trusted = new PlotMessage().text(Captions.color(
|
PlotMessage trusted = new PlotMessage().text(Captions.color(
|
||||||
Captions.PLOT_INFO_TRUSTED.s()
|
Captions.PLOT_INFO_TRUSTED.getTranslated()
|
||||||
.replaceAll("%trusted%", MainUtil.getPlayerList(plot.getTrusted()))))
|
.replaceAll("%trusted%", MainUtil.getPlayerList(plot.getTrusted()))))
|
||||||
.color("$1");
|
.color("$1");
|
||||||
PlotMessage members = new PlotMessage().text(Captions.color(
|
PlotMessage members = new PlotMessage().text(Captions.color(
|
||||||
Captions.PLOT_INFO_MEMBERS.s()
|
Captions.PLOT_INFO_MEMBERS.getTranslated()
|
||||||
.replaceAll("%members%", MainUtil.getPlayerList(plot.getMembers()))))
|
.replaceAll("%members%", MainUtil.getPlayerList(plot.getMembers()))))
|
||||||
.color("$1");
|
.color("$1");
|
||||||
String strFlags = StringMan.join(plot.getFlags().values(), ",");
|
String strFlags = StringMan.join(plot.getFlags().values(), ",");
|
||||||
if (strFlags.isEmpty()) {
|
if (strFlags.isEmpty()) {
|
||||||
strFlags = Captions.NONE.s();
|
strFlags = Captions.NONE.getTranslated();
|
||||||
}
|
}
|
||||||
PlotMessage flags = new PlotMessage().text(Captions
|
PlotMessage flags = new PlotMessage().text(Captions.color(
|
||||||
.color(Captions.PLOT_INFO_FLAGS.s().replaceAll("%flags%", strFlags)))
|
Captions.PLOT_INFO_FLAGS.getTranslated().replaceAll("%flags%", strFlags)))
|
||||||
.color("$1");
|
.color("$1");
|
||||||
message.text("[").color("$3").text(i + "")
|
message.text("[").color("$3").text(i + "")
|
||||||
.command("/plot visit " + plot.getArea() + ";" + plot.getId())
|
.command("/plot visit " + plot.getArea() + ";" + plot.getId())
|
||||||
@ -407,7 +407,7 @@ public class ListCmd extends SubCommand {
|
|||||||
prefix = ", ";
|
prefix = ", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, "/plot list " + args[0], Captions.PLOT_LIST_HEADER_PAGED.s());
|
}, "/plot list " + args[0], Captions.PLOT_LIST_HEADER_PAGED.getTranslated());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public class Merge extends SubCommand {
|
|||||||
if (!terrain && !Permissions
|
if (!terrain && !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
||||||
Captions.PERMISSION_MERGE_KEEP_ROAD.s());
|
Captions.PERMISSION_MERGE_KEEP_ROAD.getTranslated());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (plot.autoMerge(-1, maxSize, uuid, terrain)) {
|
if (plot.autoMerge(-1, maxSize, uuid, terrain)) {
|
||||||
@ -133,7 +133,7 @@ public class Merge extends SubCommand {
|
|||||||
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX,
|
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX,
|
||||||
"/plot merge <" + StringMan.join(values, "|") + "> [removeroads]");
|
"/plot merge <" + StringMan.join(values, "|") + "> [removeroads]");
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
Captions.DIRECTION.s().replaceAll("%dir%", direction(loc.getYaw())));
|
Captions.DIRECTION.getTranslated().replaceAll("%dir%", direction(loc.getYaw())));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final boolean terrain;
|
final boolean terrain;
|
||||||
@ -144,7 +144,7 @@ public class Merge extends SubCommand {
|
|||||||
}
|
}
|
||||||
if (!terrain && !Permissions.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
if (!terrain && !Permissions.hasPermission(player, Captions.PERMISSION_MERGE_KEEP_ROAD)) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
MainUtil.sendMessage(player, Captions.NO_PERMISSION,
|
||||||
Captions.PERMISSION_MERGE_KEEP_ROAD.s());
|
Captions.PERMISSION_MERGE_KEEP_ROAD.getTranslated());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (plot.autoMerge(direction, maxSize - size, uuid, terrain)) {
|
if (plot.autoMerge(direction, maxSize - size, uuid, terrain)) {
|
||||||
@ -193,8 +193,8 @@ public class Merge extends SubCommand {
|
|||||||
MainUtil.sendMessage(player, Captions.SUCCESS_MERGE);
|
MainUtil.sendMessage(player, Captions.SUCCESS_MERGE);
|
||||||
};
|
};
|
||||||
if (hasConfirmation(player)) {
|
if (hasConfirmation(player)) {
|
||||||
CmdConfirm.addPending(accepter,
|
CmdConfirm.addPending(accepter, Captions.MERGE_REQUEST_CONFIRM.getTranslated()
|
||||||
Captions.MERGE_REQUEST_CONFIRM.s().replaceAll("%s", player.getName()), run);
|
.replaceAll("%s", player.getName()), run);
|
||||||
} else {
|
} else {
|
||||||
run.run();
|
run.run();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
|||||||
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
||||||
}
|
}
|
||||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN.s())) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!plot1.getArea().isCompatible(plot2.getArea()) && (!override || !Permissions
|
if (!plot1.getArea().isCompatible(plot2.getArea()) && (!override || !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN.s()))) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN.getTranslated()))) {
|
||||||
Captions.PLOTWORLD_INCOMPATIBLE.send(player);
|
Captions.PLOTWORLD_INCOMPATIBLE.send(player);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@ import java.util.UUID;
|
|||||||
if (uuid == null || value.equalsIgnoreCase("-")) {
|
if (uuid == null || value.equalsIgnoreCase("-")) {
|
||||||
if (value.equalsIgnoreCase("none") || value.equalsIgnoreCase("null") || value
|
if (value.equalsIgnoreCase("none") || value.equalsIgnoreCase("null") || value
|
||||||
.equalsIgnoreCase("-")) {
|
.equalsIgnoreCase("-")) {
|
||||||
if (!Permissions
|
if (!Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_SET_OWNER.s(), true)) {
|
Captions.PERMISSION_ADMIN_COMMAND_SET_OWNER.getTranslated(), true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Set<Plot> connected = plot.getConnectedPlots();
|
Set<Plot> connected = plot.getConnectedPlots();
|
||||||
|
@ -126,7 +126,8 @@ import java.util.stream.IntStream;
|
|||||||
newValues.addAll(
|
newValues.addAll(
|
||||||
Arrays.asList(plot.getManager().getPlotComponents(plot.getId())));
|
Arrays.asList(plot.getManager().getPlotComponents(plot.getId())));
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringMan
|
MainUtil
|
||||||
|
.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.getTranslated() + StringMan
|
||||||
.join(newValues, Captions.BLOCK_LIST_SEPARATER.formatted()));
|
.join(newValues, Captions.BLOCK_LIST_SEPARATER.formatted()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class Swap extends SubCommand {
|
|||||||
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
return !MainUtil.sendMessage(player, Captions.NOT_IN_PLOT);
|
||||||
}
|
}
|
||||||
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
if (!plot1.isOwner(player.getUUID()) && !Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN.s())) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
MainUtil.sendMessage(player, Captions.NO_PLOT_PERMS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,7 @@ import java.util.Set;
|
|||||||
public enum Captions {
|
public enum Captions {
|
||||||
|
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
/*
|
//<editor-fold desc="Static Flags">
|
||||||
* Static flags
|
|
||||||
*/
|
|
||||||
FLAG_USE("use", "static.flags"),
|
FLAG_USE("use", "static.flags"),
|
||||||
FLAG_BREAK("break", "static.flags"),
|
FLAG_BREAK("break", "static.flags"),
|
||||||
FLAG_PLACE("place", "static.flags"),
|
FLAG_PLACE("place", "static.flags"),
|
||||||
@ -44,9 +42,8 @@ public enum Captions {
|
|||||||
FLAG_TAMED_INTERACT("tamed-interact", "static.flags"),
|
FLAG_TAMED_INTERACT("tamed-interact", "static.flags"),
|
||||||
FLAG_DISABLE_PHYSICS("disable-physics", "static.flags"),
|
FLAG_DISABLE_PHYSICS("disable-physics", "static.flags"),
|
||||||
FLAG_MOB_PLACE("mob-place", "static.flags"),
|
FLAG_MOB_PLACE("mob-place", "static.flags"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Static permission
|
//<editor-fold desc="Static Permission">
|
||||||
*/
|
|
||||||
PERMISSION_STAR("*", "static.permissions"),
|
PERMISSION_STAR("*", "static.permissions"),
|
||||||
PERMISSION_ADMIN("plots.admin", "static.permissions"),
|
PERMISSION_ADMIN("plots.admin", "static.permissions"),
|
||||||
PERMISSION_PROJECTILE_UNOWNED("plots.projectile.unowned", "static.permissions"),
|
PERMISSION_PROJECTILE_UNOWNED("plots.projectile.unowned", "static.permissions"),
|
||||||
@ -162,37 +159,32 @@ public enum Captions {
|
|||||||
PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias", "static.permissions"), // Note this is for backwards compatibility
|
PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias", "static.permissions"), // Note this is for backwards compatibility
|
||||||
PERMISSION_ALIAS_SET("plots.alias.set", "static.permissions"),
|
PERMISSION_ALIAS_SET("plots.alias.set", "static.permissions"),
|
||||||
PERMISSION_ALIAS_REMOVE("plots.alias.remove", "static.permissions"),
|
PERMISSION_ALIAS_REMOVE("plots.alias.remove", "static.permissions"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Static console
|
//<editor-fold desc="Static Console">
|
||||||
*/
|
|
||||||
CONSOLE_JAVA_OUTDATED(
|
CONSOLE_JAVA_OUTDATED(
|
||||||
"&cYour version of java is outdated. It is highly recommended that you update to Java 8 as it increases performance "
|
"&cYour version of java is outdated. It is highly recommended that you update to Java 8 as it increases performance "
|
||||||
+ "and security. %s0 will require Java 8 in a future update.",
|
+ "and security. %s0 will require Java 8 in a future update.",
|
||||||
"static.console"), CONSOLE_PLEASE_ENABLE_METRICS(
|
"static.console"), CONSOLE_PLEASE_ENABLE_METRICS(
|
||||||
"&dPlease enable metrics for %s0. Using metrics improves plugin stability, performance, and features. "
|
"&dPlease enable metrics for %s0. Using metrics improves plugin stability, performance, and features. "
|
||||||
+ "Bug fixes and new features are influenced on metrics.", "static.console"),
|
+ "Bug fixes and new features are influenced on metrics.", "static.console"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Confirm
|
//<editor-fold desc="Confirm">
|
||||||
*/
|
|
||||||
EXPIRED_CONFIRM("$2Confirmation has expired, please run the command again!", "Confirm"),
|
EXPIRED_CONFIRM("$2Confirmation has expired, please run the command again!", "Confirm"),
|
||||||
FAILED_CONFIRM("$2You have no pending actions to confirm!", "Confirm"),
|
FAILED_CONFIRM("$2You have no pending actions to confirm!", "Confirm"),
|
||||||
REQUIRES_CONFIRM(
|
REQUIRES_CONFIRM(
|
||||||
"$2Are you sure you wish to execute: $1%s$2?&-$2This cannot be undone! If you are sure: $1/plot confirm",
|
"$2Are you sure you wish to execute: $1%s$2?&-$2This cannot be undone! If you are sure: $1/plot confirm",
|
||||||
"Confirm"),
|
"Confirm"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Move
|
//<editor-fold desc="Move">
|
||||||
*/
|
|
||||||
MOVE_SUCCESS("$4Successfully moved plot.", "Move"), COPY_SUCCESS("$4Successfully copied plot.",
|
MOVE_SUCCESS("$4Successfully moved plot.", "Move"), COPY_SUCCESS("$4Successfully copied plot.",
|
||||||
"Move"),
|
"Move"),
|
||||||
REQUIRES_UNOWNED("$2The location specified is already occupied.", "Move"),
|
REQUIRES_UNOWNED("$2The location specified is already occupied.", "Move"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Area Create
|
//<editor-fold desc="Area Create">
|
||||||
*/
|
|
||||||
REQUIRES_UNMERGED("$2The plot cannot be merged", "debug"),
|
REQUIRES_UNMERGED("$2The plot cannot be merged", "debug"),
|
||||||
SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set"),
|
SET_ATTRIBUTE("$4Successfully set %s0 set to %s1", "Set"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Web
|
//<editor-fold desc="Web">
|
||||||
*/
|
|
||||||
GENERATING_LINK("$1Processing plot...", "Web"),
|
GENERATING_LINK("$1Processing plot...", "Web"),
|
||||||
GENERATING_LINK_FAILED(
|
GENERATING_LINK_FAILED(
|
||||||
"$2Failed to generate download link!", "Web"),
|
"$2Failed to generate download link!", "Web"),
|
||||||
@ -201,13 +193,11 @@ public enum Captions {
|
|||||||
LOAD_FAILED("$2Failed to load schematic", "Web"),
|
LOAD_FAILED("$2Failed to load schematic", "Web"),
|
||||||
LOAD_LIST("$2To load a schematic, use $1/plot load #", "Web"),
|
LOAD_LIST("$2To load a schematic, use $1/plot load #", "Web"),
|
||||||
SAVE_SUCCESS("$1Successfully saved!", "Web"),
|
SAVE_SUCCESS("$1Successfully saved!", "Web"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Compass
|
//<editor-fold desc="Compass">
|
||||||
*/
|
|
||||||
COMPASS_TARGET("$4Successfully targeted plot with compass", "Compass"),
|
COMPASS_TARGET("$4Successfully targeted plot with compass", "Compass"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Cluster
|
//<editor-fold desc="Cluster">
|
||||||
*/
|
|
||||||
CLUSTER_AVAILABLE_ARGS(
|
CLUSTER_AVAILABLE_ARGS(
|
||||||
"$1The following sub commands are available: $4list$2, $4create$2, $4delete$2, $4resize$2, $4invite$2, $4kick$2, $4leave$2, "
|
"$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(
|
+ "$4members$2, $4info$2, $4tp$2, $4sethome", "Cluster"), CLUSTER_LIST_HEADING(
|
||||||
@ -233,18 +223,15 @@ public enum Captions {
|
|||||||
CLUSTER_INFO(
|
CLUSTER_INFO(
|
||||||
"$1Current cluster: $2%id%&-$1Name: $2%name%&-$1Owner: $2%owner%&-$1Size: $2%size%&-$1Rights: $2%rights%",
|
"$1Current cluster: $2%id%&-$1Name: $2%name%&-$1Owner: $2%owner%&-$1Size: $2%size%&-$1Rights: $2%rights%",
|
||||||
"Cluster"),
|
"Cluster"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Border
|
//<editor-fold desc="Border">
|
||||||
*/
|
|
||||||
BORDER("$2You are outside the current map border", "Border"),
|
BORDER("$2You are outside the current map border", "Border"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Un-claim
|
//<editor-fold desc="Un-Claim">
|
||||||
*/
|
|
||||||
UNCLAIM_SUCCESS("$4You successfully unclaimed the plot.", "Unclaim"), UNCLAIM_FAILED(
|
UNCLAIM_SUCCESS("$4You successfully unclaimed the plot.", "Unclaim"), UNCLAIM_FAILED(
|
||||||
"$2Could not unclaim the plot", "Unclaim"),
|
"$2Could not unclaim the plot", "Unclaim"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* WorldEdit masks
|
//<editor-fold desc="WorldEdit Masks">
|
||||||
*/
|
|
||||||
WORLDEDIT_DELAYED("$2Please wait while we process your WorldEdit action...",
|
WORLDEDIT_DELAYED("$2Please wait while we process your WorldEdit action...",
|
||||||
"WorldEdit Masks"), WORLDEDIT_RUN("$2Apologies for the delay. Now executing: %s",
|
"WorldEdit Masks"), WORLDEDIT_RUN("$2Apologies for the delay. Now executing: %s",
|
||||||
"WorldEdit Masks"),
|
"WorldEdit Masks"),
|
||||||
@ -270,25 +257,20 @@ public enum Captions {
|
|||||||
GAMEMODE_WAS_BYPASSED("$1You bypassed the GameMode ($2{gamemode}$1) $1set for $2{plot}",
|
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}",
|
"GameMode"), HEIGHT_LIMIT("$1This plot area has a height limit of $2{limit}",
|
||||||
"Height Limit"),
|
"Height Limit"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Records
|
//<editor-fold desc="Records">
|
||||||
*/
|
NOTIFY_ENTER("$2%player $2entered your plot ($1%plot$2)", "Records"),
|
||||||
RECORD_PLAY("$2%player $2started playing record $1%name", "Records"), NOTIFY_ENTER(
|
|
||||||
"$2%player $2entered your plot ($1%plot$2)", "Records"),
|
|
||||||
|
|
||||||
NOTIFY_LEAVE("$2%player $2left your plot ($1%plot$2)", "Records"),
|
NOTIFY_LEAVE("$2%player $2left your plot ($1%plot$2)", "Records"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Swap
|
//<editor-fold desc="Swap">
|
||||||
*/
|
|
||||||
SWAP_OVERLAP("$2The proposed areas are not allowed to overlap", "Swap"), SWAP_DIMENSIONS(
|
SWAP_OVERLAP("$2The proposed areas are not allowed to overlap", "Swap"), SWAP_DIMENSIONS(
|
||||||
"$2The proposed areas must have comparable dimensions", "Swap"),
|
"$2The proposed areas must have comparable dimensions", "Swap"),
|
||||||
|
|
||||||
SWAP_SYNTAX("$2/plot swap <id>", "Swap"), SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
|
SWAP_SYNTAX("$2/plot swap <id>", "Swap"), SWAP_SUCCESS("$4Successfully swapped plots", "Swap"),
|
||||||
|
|
||||||
STARTED_SWAP("$2Started plot swap task. You will be notified when it finishes", "Swap"),
|
STARTED_SWAP("$2Started plot swap task. You will be notified when it finishes", "Swap"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Comment
|
//<editor-fold desc="Comments">
|
||||||
*/
|
|
||||||
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"), NOT_VALID_INBOX_INDEX(
|
INBOX_NOTIFICATION("%s unread messages. Use /plot inbox", "Comment"), NOT_VALID_INBOX_INDEX(
|
||||||
"$2No comment at index %s", "Comment"),
|
"$2No comment at index %s", "Comment"),
|
||||||
|
|
||||||
@ -306,21 +288,18 @@ public enum Captions {
|
|||||||
|
|
||||||
COMMENT_HEADER("$2&m---------&r $1Comments $2&m---------&r", "Comment"), INBOX_EMPTY(
|
COMMENT_HEADER("$2&m---------&r $1Comments $2&m---------&r", "Comment"), INBOX_EMPTY(
|
||||||
"$2No comments", "Comment"),
|
"$2No comments", "Comment"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Console
|
//<editor-fold desc="Console">
|
||||||
*/
|
|
||||||
NOT_CONSOLE("$2For safety reasons, this command can only be executed by 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"),
|
"Console"), IS_CONSOLE("$2This command can only be executed by a player.", "Console"),
|
||||||
/*
|
//</editor-fold>
|
||||||
Inventory
|
//<editor-fold desc="Inventory">
|
||||||
*/
|
|
||||||
INVENTORY_USAGE("&cUsage: &6{usage}", "Inventory"), INVENTORY_DESC("&cDescription: &6{desc}",
|
INVENTORY_USAGE("&cUsage: &6{usage}", "Inventory"), INVENTORY_DESC("&cDescription: &6{desc}",
|
||||||
"Inventory"),
|
"Inventory"),
|
||||||
|
|
||||||
INVENTORY_CATEGORY("&cCategory: &6{category}", "Inventory"),
|
INVENTORY_CATEGORY("&cCategory: &6{category}", "Inventory"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Clipboard
|
//<editor-fold desc="Clipboard">
|
||||||
*/
|
|
||||||
CLIPBOARD_SET(
|
CLIPBOARD_SET(
|
||||||
"$2The current plot is now copied to your clipboard, use $1/plot paste$2 to paste it",
|
"$2The current plot is now copied to your clipboard, use $1/plot paste$2 to paste it",
|
||||||
"Clipboard"), PASTED(
|
"Clipboard"), PASTED(
|
||||||
@ -333,16 +312,15 @@ public enum Captions {
|
|||||||
CLIPBOARD_INFO(
|
CLIPBOARD_INFO(
|
||||||
"$2Current Selection - Plot ID: $1%id$2, Width: $1%width$2, Total Blocks: $1%total$2",
|
"$2Current Selection - Plot ID: $1%id$2, Width: $1%width$2, Total Blocks: $1%total$2",
|
||||||
"Clipboard"),
|
"Clipboard"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Toggle
|
//<editor-fold desc="Toggle">
|
||||||
*/
|
|
||||||
TOGGLE_ENABLED("$2Enabled setting: %s", "Toggle"), TOGGLE_DISABLED("$2Disabled setting: %s",
|
TOGGLE_ENABLED("$2Enabled setting: %s", "Toggle"), TOGGLE_DISABLED("$2Disabled setting: %s",
|
||||||
"Toggle"),
|
"Toggle"),
|
||||||
|
|
||||||
COMMAND_BLOCKED("$2That command is not allowed in this plot", "Blocked Command"),
|
COMMAND_BLOCKED("$2That command is not allowed in this plot", "Blocked Command"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Done
|
//<editor-fold desc="Done">
|
||||||
*/
|
|
||||||
DONE_ALREADY_DONE("$2This plot is already marked as done", "Done"), DONE_NOT_DONE(
|
DONE_ALREADY_DONE("$2This plot is already marked as done", "Done"), DONE_NOT_DONE(
|
||||||
"$2This plot is not marked as done.", "Done"),
|
"$2This plot is not marked as done.", "Done"),
|
||||||
|
|
||||||
@ -351,10 +329,8 @@ public enum Captions {
|
|||||||
"Done"), DONE_SUCCESS("$1Successfully marked this plot as done.", "Done"),
|
"Done"), DONE_SUCCESS("$1Successfully marked this plot as done.", "Done"),
|
||||||
|
|
||||||
DONE_REMOVED("$1You may now continue building in this plot.", "Done"),
|
DONE_REMOVED("$1You may now continue building in this plot.", "Done"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Ratings
|
//<editor-fold desc="Ratings">
|
||||||
*/
|
|
||||||
|
|
||||||
RATINGS_PURGED("$2Purged ratings for this plot", "Ratings"), RATING_NOT_VALID(
|
RATINGS_PURGED("$2Purged ratings for this plot", "Ratings"), RATING_NOT_VALID(
|
||||||
"$2You need to specify a number between 1 and 10", "Ratings"),
|
"$2You need to specify a number between 1 and 10", "Ratings"),
|
||||||
|
|
||||||
@ -368,16 +344,12 @@ public enum Captions {
|
|||||||
"$2You can only rate finished plots.", "Ratings"),
|
"$2You can only rate finished plots.", "Ratings"),
|
||||||
|
|
||||||
RATING_NOT_OWNED("$2You cannot rate a plot that is not claimed by anyone", "Ratings"),
|
RATING_NOT_OWNED("$2You cannot rate a plot that is not claimed by anyone", "Ratings"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Tutorial
|
//<editor-fold desc="Tutorial">
|
||||||
*/
|
|
||||||
|
|
||||||
RATE_THIS("$2Rate this plot!", "Tutorial"), COMMENT_THIS(
|
RATE_THIS("$2Rate this plot!", "Tutorial"), COMMENT_THIS(
|
||||||
"$2Leave some feedback on this plot: %s", "Tutorial"),
|
"$2Leave some feedback on this plot: %s", "Tutorial"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Economy Stuff
|
//<editor-fold desc="Economy">
|
||||||
*/
|
|
||||||
|
|
||||||
ECON_DISABLED("$2Economy is not enabled", "Economy"), CANNOT_AFFORD_PLOT(
|
ECON_DISABLED("$2Economy is not enabled", "Economy"), CANNOT_AFFORD_PLOT(
|
||||||
"$2You cannot afford to buy this plot. It costs $1%s", "Economy"),
|
"$2You cannot afford to buy this plot. It costs $1%s", "Economy"),
|
||||||
|
|
||||||
@ -392,10 +364,8 @@ public enum Captions {
|
|||||||
"$1%s $2has been taken from your balance", "Economy"),
|
"$1%s $2has been taken from your balance", "Economy"),
|
||||||
|
|
||||||
REMOVED_GRANTED_PLOT("$2You used %s plot grant(s), you've got $1%s $2left", "Economy"),
|
REMOVED_GRANTED_PLOT("$2You used %s plot grant(s), you've got $1%s $2left", "Economy"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Setup Stuff
|
//<editor-fold desc="Setup">
|
||||||
*/
|
|
||||||
|
|
||||||
SETUP_INIT("$1Usage: $2/plot setup <value>", "Setup"), SETUP_STEP(
|
SETUP_INIT("$1Usage: $2/plot setup <value>", "Setup"), SETUP_STEP(
|
||||||
"$3[$1Step %s0$3] $1%s1 $2- $1Expecting: $2%s2 $1Default: $2%s3", "Setup"),
|
"$3[$1Step %s0$3] $1%s1 $2- $1Expecting: $2%s2 $1Default: $2%s3", "Setup"),
|
||||||
|
|
||||||
@ -415,9 +385,8 @@ public enum Captions {
|
|||||||
+ "$1/plot setup back&-$2 - $1/plot setup cancel", "Setup"),
|
+ "$1/plot setup back&-$2 - $1/plot setup cancel", "Setup"),
|
||||||
|
|
||||||
SETUP_INVALID_GENERATOR("$2Invalid generator. Possible options: %s", "Setup"),
|
SETUP_INVALID_GENERATOR("$2Invalid generator. Possible options: %s", "Setup"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Schematic Stuff
|
//<editor-fold desc="Schematic">
|
||||||
*/
|
|
||||||
|
|
||||||
SCHEMATIC_TOO_LARGE("$2The plot is too large for this action!",
|
SCHEMATIC_TOO_LARGE("$2The plot is too large for this action!",
|
||||||
"Schematics"), SCHEMATIC_MISSING_ARG(
|
"Schematics"), SCHEMATIC_MISSING_ARG(
|
||||||
@ -431,38 +400,29 @@ public enum Captions {
|
|||||||
"Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"),
|
"Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"),
|
||||||
|
|
||||||
SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"),
|
SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"),
|
||||||
|
//</editor-fold>
|
||||||
/*
|
//<editor-fold desc="Titles">
|
||||||
* Title Stuff
|
TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"),
|
||||||
*/
|
TITLE_ENTERED_PLOT_SUB("$4Owned by %s", "Titles"),
|
||||||
TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"), TITLE_ENTERED_PLOT_SUB("$4Owned by %s",
|
PREFIX_GREETING("$1%id%$2> ", "Titles"),
|
||||||
"Titles"),
|
PREFIX_FAREWELL("$1%id%$2> ", "Titles"),
|
||||||
|
//</editor-fold>
|
||||||
PREFIX_GREETING("$1%id%$2> ", "Titles"), PREFIX_FAREWELL("$1%id%$2> ", "Titles"),
|
//<editor-fold desc="Core">
|
||||||
/*
|
TASK_START("Starting task...", "Core"),
|
||||||
* Core Stuff
|
PREFIX("$3[$1P2$3] $2", "Core"),
|
||||||
*/
|
|
||||||
|
|
||||||
TASK_START("Starting task...", "Core"), PREFIX("$3[$1P2$3] $2", "Core"),
|
|
||||||
|
|
||||||
ENABLED("$1%s0 is now enabled", "Core"),
|
ENABLED("$1%s0 is now enabled", "Core"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Reload
|
//<editor-fold desc="Reload">
|
||||||
*/
|
RELOADED_CONFIGS("$1Translations and world settings have been reloaded", "Reload"),
|
||||||
|
RELOAD_FAILED("$2Failed to reload file configurations", "Reload"),
|
||||||
RELOADED_CONFIGS("$1Translations and world settings have been reloaded",
|
//</editor-fold>
|
||||||
"Reload"), RELOAD_FAILED("$2Failed to reload file configurations", "Reload"),
|
//<editor-fold desc="Description">
|
||||||
/*
|
DESC_SET("$2Plot description set", "Desc"),
|
||||||
* BarAPI
|
DESC_UNSET("$2Plot description unset", "Desc"),
|
||||||
*/
|
|
||||||
|
|
||||||
DESC_SET("$2Plot description set", "Desc"), DESC_UNSET("$2Plot description unset", "Desc"),
|
|
||||||
|
|
||||||
MISSING_DESC("$2You need to specify a description", "Desc"),
|
MISSING_DESC("$2You need to specify a description", "Desc"),
|
||||||
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="Alias">
|
||||||
|
|
||||||
/*
|
|
||||||
* Alias
|
|
||||||
*/
|
|
||||||
ALIAS_SET_TO("$2Plot alias set to $1%alias%", "Alias"), ALIAS_REMOVED("$2Plot alias removed",
|
ALIAS_SET_TO("$2Plot alias set to $1%alias%", "Alias"), ALIAS_REMOVED("$2Plot alias removed",
|
||||||
"Alias"),
|
"Alias"),
|
||||||
|
|
||||||
@ -470,9 +430,8 @@ public enum Captions {
|
|||||||
"$2The alias must be < 50 characters in length", "Alias"),
|
"$2The alias must be < 50 characters in length", "Alias"),
|
||||||
|
|
||||||
ALIAS_IS_TAKEN("$2That alias is already taken", "Alias"),
|
ALIAS_IS_TAKEN("$2That alias is already taken", "Alias"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Position
|
//<editor-fold desc="Position">
|
||||||
*/
|
|
||||||
|
|
||||||
MISSING_POSITION("$2You need to specify a position. Possible values: $1none",
|
MISSING_POSITION("$2You need to specify a position. Possible values: $1none",
|
||||||
"Position"), POSITION_SET("$1Home position set to your current location", "Position"),
|
"Position"), POSITION_SET("$1Home position set to your current location", "Position"),
|
||||||
@ -481,38 +440,25 @@ public enum Captions {
|
|||||||
"$2Use /plot set home [none]", "Position"),
|
"$2Use /plot set home [none]", "Position"),
|
||||||
|
|
||||||
INVALID_POSITION("$2That is not a valid position value", "Position"),
|
INVALID_POSITION("$2That is not a valid position value", "Position"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Cap
|
//<editor-fold desc="Cap">
|
||||||
*/
|
|
||||||
|
|
||||||
ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"),
|
ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Time
|
//<editor-fold desc="Permission">
|
||||||
*/
|
|
||||||
|
|
||||||
TIME_FORMAT("$1%hours%, %min%, %sec%", "Time"),
|
|
||||||
/*
|
|
||||||
* Permission
|
|
||||||
*/
|
|
||||||
|
|
||||||
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s",
|
NO_SCHEMATIC_PERMISSION("$2You don't have the permission required to use schematic $1%s",
|
||||||
"Permission"), NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"),
|
"Permission"),
|
||||||
|
NO_PERMISSION("$2You are lacking the permission node: $1%s", "Permission"),
|
||||||
NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s", "Permission"), NO_PLOT_PERMS(
|
NO_PERMISSION_EVENT("$2You are lacking the permission node: $1%s", "Permission"),
|
||||||
"$2You must be the plot owner to perform this action", "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_PLOTS("$2You can't claim more plots.", "Permission"), CANT_CLAIM_MORE_CLUSTERS(
|
CANT_CLAIM_MORE_CLUSTERS("$2You can't claim more clusters.", "Permission"),
|
||||||
"$2You can't claim more clusters.", "Permission"),
|
|
||||||
|
|
||||||
CANT_TRANSFER_MORE_PLOTS("$2You can't send more plots to that user",
|
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"), CANT_CLAIM_MORE_PLOTS_NUM("$2You can't claim more than $1%s $2plots at once",
|
||||||
"Permission"),
|
"Permission"),
|
||||||
|
|
||||||
YOU_BE_DENIED("$2You are not allowed to enter this plot", "Permission"),
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="Merge">
|
||||||
/*
|
|
||||||
* Merge
|
|
||||||
*/
|
|
||||||
MERGE_NOT_VALID("$2This merge request is no longer valid.", "Merge"), MERGE_ACCEPTED(
|
MERGE_NOT_VALID("$2This merge request is no longer valid.", "Merge"), MERGE_ACCEPTED(
|
||||||
"$2The merge request has been accepted", "Merge"),
|
"$2The merge request has been accepted", "Merge"),
|
||||||
|
|
||||||
@ -528,10 +474,8 @@ public enum Captions {
|
|||||||
|
|
||||||
UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS(
|
UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS(
|
||||||
"$2Successfully unlinked plots.", "Merge"),
|
"$2Successfully unlinked plots.", "Merge"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* CommandConfig
|
//<editor-fold desc="CommandConfig">
|
||||||
*/
|
|
||||||
|
|
||||||
NOT_VALID_SUBCOMMAND("$2That is not a valid subcommand", "CommandConfig"), DID_YOU_MEAN(
|
NOT_VALID_SUBCOMMAND("$2That is not a valid subcommand", "CommandConfig"), DID_YOU_MEAN(
|
||||||
"$2Did you mean: $1%s", "CommandConfig"),
|
"$2Did you mean: $1%s", "CommandConfig"),
|
||||||
|
|
||||||
@ -540,100 +484,69 @@ public enum Captions {
|
|||||||
|
|
||||||
SUBCOMMAND_SET_OPTIONS_HEADER("$2Possible Values: ", "CommandConfig"), COMMAND_SYNTAX(
|
SUBCOMMAND_SET_OPTIONS_HEADER("$2Possible Values: ", "CommandConfig"), COMMAND_SYNTAX(
|
||||||
"$1Usage: $2%s", "CommandConfig"),
|
"$1Usage: $2%s", "CommandConfig"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Player not found
|
//<editor-fold desc="Errors">
|
||||||
*/
|
INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.", "Errors"),
|
||||||
|
INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors"),
|
||||||
INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.",
|
|
||||||
"Errors"), INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors"),
|
|
||||||
|
|
||||||
INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors"),
|
INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors"),
|
||||||
/*
|
INVALID_COMMAND_FLAG("$2Invalid command flag: %s0", "Errors"),
|
||||||
* Command flag
|
ERROR("$2An error occurred: %s", "Errors"),
|
||||||
*/
|
COMMAND_WENT_WRONG("$2Something went wrong when executing that command...", "Errors"),
|
||||||
|
NO_FREE_PLOTS("$2There are no free plots available", "Errors"),
|
||||||
INVALID_COMMAND_FLAG("$2Invalid command flag: %s0", "Errors"), /*
|
NOT_IN_PLOT("$2You're not in a plot", "Errors"),
|
||||||
* Unknown Error
|
NOT_LOADED("$2The plot could not be loaded", "Errors"),
|
||||||
*/
|
NOT_IN_CLUSTER(
|
||||||
|
"$2You must be within a plot cluster to perform that action", "Errors"),
|
||||||
ERROR("$2An error occurred: %s",
|
NOT_IN_PLOT_WORLD("$2You're not in a plot area", "Errors"),
|
||||||
"Errors"), // SETTINGS_PASTE_UPLOADED("$2settings.yml was uploaded to: $1%url%", "Paste"),
|
PLOTWORLD_INCOMPATIBLE("$2The two worlds must be compatible", "Errors"),
|
||||||
|
NOT_VALID_WORLD("$2That is not a valid world (case sensitive)", "Errors"),
|
||||||
// LATEST_LOG_UPLOADED("$2latest.log was uploaded to: $1%url%", "Paste"),
|
NOT_VALID_PLOT_WORLD("$2That is not a valid plot area (case sensitive)", "Errors"),
|
||||||
|
NO_PLOTS("$2You don't have 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"),
|
||||||
|
//</editor-fold>
|
||||||
DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"),
|
DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"),
|
||||||
|
|
||||||
COMMAND_WENT_WRONG("$2Something went wrong when executing that command...", "Errors"),
|
|
||||||
/*
|
|
||||||
* purge
|
|
||||||
*/
|
|
||||||
|
|
||||||
PURGE_SUCCESS("$4Successfully purged %s plots", "Purge"),
|
PURGE_SUCCESS("$4Successfully purged %s plots", "Purge"),
|
||||||
/*
|
|
||||||
* trim
|
|
||||||
*/
|
|
||||||
|
|
||||||
TRIM_IN_PROGRESS("A world trim task is already in progress!",
|
//<editor-fold desc="Trim">
|
||||||
"Trim"), NOT_VALID_HYBRID_PLOT_WORLD(
|
TRIM_IN_PROGRESS("A world trim task is already in progress!", "Trim"),
|
||||||
"The hybrid plot manager is required to perform this action", "Trim"),
|
NOT_VALID_HYBRID_PLOT_WORLD("The hybrid plot manager is required to perform this action", "Trim"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* No <plot>
|
//<editor-fold desc="Block List">
|
||||||
*/
|
|
||||||
|
|
||||||
NO_FREE_PLOTS("$2There are no free plots available", "Errors"), NOT_IN_PLOT(
|
|
||||||
"$2You're not in a plot", "Errors"),
|
|
||||||
|
|
||||||
NOT_LOADED("$2The plot could not be loaded", "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"),
|
|
||||||
/*
|
|
||||||
* Block List
|
|
||||||
*/
|
|
||||||
|
|
||||||
BLOCK_LIST_SEPARATER("$1,$2 ", "Block List"),
|
BLOCK_LIST_SEPARATER("$1,$2 ", "Block List"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Biome
|
//<editor-fold desc="Biome">
|
||||||
*/
|
|
||||||
|
|
||||||
NEED_BIOME("$2You need to specify a valid biome.", "Biome"), BIOME_SET_TO(
|
NEED_BIOME("$2You need to specify a valid biome.", "Biome"), BIOME_SET_TO(
|
||||||
"$2Plot biome set to $2", "Biome"),
|
"$2Plot biome set to $2", "Biome"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Teleport / Entry
|
//<editor-fold desc="Teleport">
|
||||||
*/
|
|
||||||
|
|
||||||
TELEPORTED_TO_PLOT("$1You have been teleported", "Teleport"), TELEPORTED_TO_ROAD(
|
TELEPORTED_TO_PLOT("$1You have been teleported", "Teleport"), TELEPORTED_TO_ROAD(
|
||||||
"$2You got teleported to the road", "Teleport"),
|
"$2You got teleported to the road", "Teleport"),
|
||||||
|
|
||||||
TELEPORT_IN_SECONDS("$1Teleporting in %s seconds. Do not move...", "Teleport"), TELEPORT_FAILED(
|
TELEPORT_IN_SECONDS("$1Teleporting in %s seconds. Do not move...", "Teleport"), TELEPORT_FAILED(
|
||||||
"$2Teleportation cancelled due to movement or damage", "Teleport"),
|
"$2Teleportation cancelled due to movement or damage", "Teleport"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Set Block
|
//<editor-fold desc="Set Block">
|
||||||
*/
|
|
||||||
|
|
||||||
SET_BLOCK_ACTION_FINISHED("$1The last setblock action is now finished.", "Set Block"),
|
SET_BLOCK_ACTION_FINISHED("$1The last setblock action is now finished.", "Set Block"),
|
||||||
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="AllowUnsafe">
|
||||||
|
|
||||||
/*
|
|
||||||
AllowUnsafe
|
|
||||||
*/
|
|
||||||
DEBUGALLOWUNSAFE_ON("$2Unsafe actions allowed", "unsafe"), DEBUGALLOWUNSAFE_OFF(
|
DEBUGALLOWUNSAFE_ON("$2Unsafe actions allowed", "unsafe"), DEBUGALLOWUNSAFE_OFF(
|
||||||
"$2Unsafe actions disabled", "unsafe"),
|
"$2Unsafe actions disabled", "unsafe"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Debug
|
//<editor-fold desc="Debug">
|
||||||
*/
|
|
||||||
|
|
||||||
DEBUG_HEADER("$1Debug Information&-", "Debug"), DEBUG_SECTION("$2>> $1&l%val%", "Debug"),
|
DEBUG_HEADER("$1Debug Information&-", "Debug"), DEBUG_SECTION("$2>> $1&l%val%", "Debug"),
|
||||||
|
|
||||||
DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"),
|
DEBUG_LINE("$2>> $1%var%$2:$1 %val%&-", "Debug"),
|
||||||
|
//</editor-fold>
|
||||||
/*
|
//<editor-fold desc="Invalid">
|
||||||
* Invalid
|
|
||||||
*/
|
|
||||||
|
|
||||||
NOT_VALID_DATA("$2That's not a valid data id.", "Invalid"), NOT_VALID_BLOCK(
|
NOT_VALID_DATA("$2That's not a valid data id.", "Invalid"), NOT_VALID_BLOCK(
|
||||||
"$2That's not a valid block: %s", "Invalid"),
|
"$2That's not a valid block: %s", "Invalid"),
|
||||||
@ -651,30 +564,26 @@ public enum Captions {
|
|||||||
"$2Found no plots with your search query", "Invalid"),
|
"$2Found no plots with your search query", "Invalid"),
|
||||||
|
|
||||||
FOUND_NO_PLOTS_FOR_PLAYER("$2No plots found for player: %s", "Invalid"),
|
FOUND_NO_PLOTS_FOR_PLAYER("$2No plots found for player: %s", "Invalid"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Need
|
//<editor-fold desc="Need">
|
||||||
*/
|
NEED_PLOT_NUMBER("$2You've got to specify a plot number or alias", "Need"),
|
||||||
NEED_PLOT_NUMBER("$2You've got to specify a plot number or alias", "Need"), NEED_BLOCK(
|
NEED_BLOCK("$2You've got to specify a block", "Need"),
|
||||||
"$2You've got to specify a block", "Need"),
|
NEED_PLOT_ID("$2You've got to specify a plot id.", "Need"),
|
||||||
|
NEED_PLOT_WORLD("$2You've got to specify a plot area.", "Need"),
|
||||||
NEED_PLOT_ID("$2You've got to specify a plot id.", "Need"), NEED_PLOT_WORLD(
|
|
||||||
"$2You've got to specify a plot area.", "Need"),
|
|
||||||
|
|
||||||
NEED_USER("$2You need to specify a username", "Need"),
|
NEED_USER("$2You need to specify a username", "Need"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Near
|
//<editor-fold desc="Near">
|
||||||
*/
|
|
||||||
PLOT_NEAR("$1Players: %s0", "Near"),
|
PLOT_NEAR("$1Players: %s0", "Near"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Info
|
//<editor-fold desc="Info">
|
||||||
*/
|
|
||||||
NONE("None", "Info"), NOW("Now", "Info"),
|
NONE("None", "Info"), NOW("Now", "Info"),
|
||||||
|
|
||||||
NEVER("Never", "Info"), UNKNOWN("Unknown", "Info"),
|
NEVER("Never", "Info"), UNKNOWN("Unknown", "Info"),
|
||||||
|
|
||||||
SERVER("Server", "Info"),
|
SERVER("Server", "Info"),
|
||||||
|
|
||||||
EVERYONE("Everyone", "Info"), PLOT_UNOWNED(
|
EVERYONE("Everyone", "Info"),
|
||||||
|
PLOT_UNOWNED(
|
||||||
"$2The current plot must have an owner to perform this action", "Info"),
|
"$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_INFO_HEADER(
|
PLOT_INFO_UNCLAIMED("$2Plot $1%s$2 is not yet claimed", "Info"), PLOT_INFO_HEADER(
|
||||||
@ -685,11 +594,12 @@ public enum Captions {
|
|||||||
PLOT_INFO("$1ID: $2%id%$1&-" + "$1Alias: $2%alias%$1&-" + "$1Owner: $2%owner%$1&-"
|
PLOT_INFO("$1ID: $2%id%$1&-" + "$1Alias: $2%alias%$1&-" + "$1Owner: $2%owner%$1&-"
|
||||||
+ "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-"
|
+ "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-"
|
||||||
+ "$1Seen: $2%seen%&-" + "$1Trusted: $2%trusted%$1&-" + "$1Members: $2%members%$1&-"
|
+ "$1Seen: $2%seen%&-" + "$1Trusted: $2%trusted%$1&-" + "$1Members: $2%members%$1&-"
|
||||||
+ "$1Denied: $2%denied%$1&-" + "$1Flags: $2%flags%", "Info"), PLOT_INFO_FOOTER(
|
+ "$1Denied: $2%denied%$1&-" + "$1Flags: $2%flags%", "Info"),
|
||||||
|
PLOT_INFO_FOOTER(
|
||||||
"$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
"$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
||||||
|
|
||||||
PLOT_INFO_TRUSTED("$1Trusted:$2 %trusted%", "Info"), PLOT_INFO_MEMBERS("$1Members:$2 %members%",
|
PLOT_INFO_TRUSTED("$1Trusted:$2 %trusted%", "Info"),
|
||||||
"Info"),
|
PLOT_INFO_MEMBERS("$1Members:$2 %members%", "Info"),
|
||||||
|
|
||||||
PLOT_INFO_DENIED("$1Denied:$2 %denied%", "Info"), PLOT_INFO_FLAGS("$1Flags:$2 %flags%", "Info"),
|
PLOT_INFO_DENIED("$1Denied:$2 %denied%", "Info"), PLOT_INFO_FLAGS("$1Flags:$2 %flags%", "Info"),
|
||||||
|
|
||||||
@ -704,195 +614,116 @@ public enum Captions {
|
|||||||
PLOT_INFO_SEEN("$1Seen:$2 %seen%", "Info"), PLOT_USER_LIST(" $1%user%$2,", "Info"),
|
PLOT_INFO_SEEN("$1Seen:$2 %seen%", "Info"), PLOT_USER_LIST(" $1%user%$2,", "Info"),
|
||||||
|
|
||||||
PLOT_FLAG_LIST("$1%s0:%s1$2", "Info"), INFO_SYNTAX_CONSOLE("$2/plot info X;Y", "Info"),
|
PLOT_FLAG_LIST("$1%s0:%s1$2", "Info"), INFO_SYNTAX_CONSOLE("$2/plot info X;Y", "Info"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Generating
|
//<editor-fold desc="Working">
|
||||||
*/
|
|
||||||
|
|
||||||
GENERATING_COMPONENT("$1Started generating component from your settings", "Working"),
|
GENERATING_COMPONENT("$1Started generating component from your settings", "Working"),
|
||||||
/*
|
CLEARING_PLOT("$2Clearing plot async.", "Working"),
|
||||||
* Clearing
|
CLEARING_DONE("$4Clear completed! Took %sms.", "Working"),
|
||||||
*/
|
|
||||||
|
|
||||||
CLEARING_PLOT("$2Clearing plot async.", "Working"), CLEARING_DONE(
|
|
||||||
"$4Clear completed! Took %sms.", "Working"),
|
|
||||||
|
|
||||||
DELETING_DONE("$4Delete completed! Took %sms.", "Working"),
|
DELETING_DONE("$4Delete completed! Took %sms.", "Working"),
|
||||||
/*
|
PLOT_NOT_CLAIMED("$2Plot not claimed", "Working"),
|
||||||
* Claiming
|
PLOT_IS_CLAIMED("$2This plot is already claimed", "Working"),
|
||||||
*/
|
|
||||||
|
|
||||||
PLOT_NOT_CLAIMED("$2Plot not claimed", "Working"), PLOT_IS_CLAIMED(
|
|
||||||
"$2This plot is already claimed", "Working"),
|
|
||||||
|
|
||||||
CLAIMED("$4You successfully claimed the plot", "Working"),
|
CLAIMED("$4You successfully claimed the plot", "Working"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* List
|
//<editor-fold desc="List">
|
||||||
*/
|
COMMENT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% comments", "List"),
|
||||||
|
CLICKABLE(" (interactive)", "List"),
|
||||||
COMMENT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% comments",
|
AREA_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% areas", "List"),
|
||||||
"List"), CLICKABLE(" (interactive)", "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"),
|
||||||
AREA_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% areas",
|
PLOT_LIST_ITEM("$2>> $1%id$2:$1%world $2- $1%owner", "List"),
|
||||||
"List"), PLOT_LIST_HEADER_PAGED("$2(Page $1%cur$2/$1%max$2) $1List of %amount% plots",
|
PLOT_LIST_ITEM_ORDERED("$2[$1%in$2] >> $1%id$2:$1%world $2- $1%owner", "List"),
|
||||||
"List"),
|
PLOT_LIST_FOOTER("$2>> $1%word% a total of $2%num% $1claimed %plot%.", "List"),
|
||||||
|
//</editor-fold>
|
||||||
PLOT_LIST_HEADER("$1List of %word% plots", "List"), PLOT_LIST_ITEM(
|
//<editor-fold desc="Chat">
|
||||||
"$2>> $1%id$2:$1%world $2- $1%owner", "List"),
|
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_LIST_ITEM_ORDERED("$2[$1%in$2] >> $1%id$2:$1%world $2- $1%owner",
|
PLOT_CHAT_FORCED("$2This world forces everyone to use plot chat.", "Chat"),
|
||||||
"List"), PLOT_LIST_FOOTER("$2>> $1%word% a total of $2%num% $1claimed %plot%.", "List"),
|
PLOT_CHAT_ON("$4Plot chat enabled.", "Chat"),
|
||||||
/*
|
|
||||||
* Left
|
|
||||||
*/
|
|
||||||
|
|
||||||
LEFT_PLOT("$2You left a plot", "Left"),
|
|
||||||
/*
|
|
||||||
* Wait
|
|
||||||
*/
|
|
||||||
|
|
||||||
WAIT_FOR_TIMER(
|
|
||||||
"$2A setblock timer is bound to either the current plot or you. Please wait for it to finish",
|
|
||||||
"Errors"),
|
|
||||||
/*
|
|
||||||
* 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"), PLOT_CHAT_ON(
|
|
||||||
"$4Plot chat enabled.", "Chat"),
|
|
||||||
|
|
||||||
PLOT_CHAT_OFF("$4Plot chat disabled.", "Chat"),
|
PLOT_CHAT_OFF("$4Plot chat disabled.", "Chat"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Denied
|
//<editor-fold desc="Deny">
|
||||||
*/
|
DENIED_REMOVED("$4You successfully undenied the player from this plot", "Deny"),
|
||||||
|
DENIED_ADDED("$4You successfully denied the player from this plot", "Deny"),
|
||||||
DENIED_REMOVED("$4You successfully undenied the player from this plot", "Deny"), DENIED_ADDED(
|
DENIED_NEED_ARGUMENT("$2Arguments are missing. $1/plot denied add <name> $2or $1/plot denied remove <name>", "Deny"),
|
||||||
"$4You successfully denied the player from this plot", "Deny"),
|
WAS_NOT_DENIED("$2That player was not denied on this plot", "Deny"),
|
||||||
|
YOU_GOT_DENIED("$4You are denied from the plot you were previously on, and got teleported to spawn", "Deny"),
|
||||||
DENIED_NEED_ARGUMENT(
|
//</editor-fold>
|
||||||
"$2Arguments are missing. $1/plot denied add <name> $2or $1/plot denied remove <name>",
|
|
||||||
"Deny"), WAS_NOT_DENIED("$2That player was not denied on this plot", "Deny"),
|
|
||||||
|
|
||||||
YOU_GOT_DENIED(
|
|
||||||
"$4You are denied from the plot you were previously on, and got teleported to spawn",
|
|
||||||
"Deny"),
|
|
||||||
/*
|
|
||||||
* Kick
|
|
||||||
*/
|
|
||||||
|
|
||||||
YOU_GOT_KICKED("$4You got kicked!", "Kick"),
|
YOU_GOT_KICKED("$4You got kicked!", "Kick"),
|
||||||
/*
|
//<editor-fold desc="Flag">
|
||||||
* Rain
|
FLAG_KEY("$2Key: %s", "Flag"),
|
||||||
*/
|
FLAG_TYPE("$2Type: %s", "Flag"),
|
||||||
|
FLAG_DESC("$2Desc: %s", "Flag"),
|
||||||
|
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"),
|
||||||
|
NOT_VALID_VALUE("$2Flag values must be alphanumerical", "Flag"),
|
||||||
|
FLAG_NOT_IN_PLOT("$2The plot does not have that flag", "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_ADDED("$4Successfully added flag", "Flag"),
|
||||||
|
FLAG_TUTORIAL_USAGE("$1Have an admin set the flag: $2%s", "CommandConfig"),
|
||||||
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="Trusted">
|
||||||
|
TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"),
|
||||||
|
TRUSTED_REMOVED("$4You successfully removed a trusted user from the plot", "Trusted"),
|
||||||
|
WAS_NOT_ADDED("$2That player was not trusted on this plot", "Trusted"),
|
||||||
|
PLOT_REMOVED_USER("$1Plot %s of which you were added to has been deleted due to owner inactivity", "Trusted"),
|
||||||
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="Member">
|
||||||
|
REMOVED_PLAYERS("$2Removed %s players from this plot.", "Member"),
|
||||||
|
ALREADY_OWNER("$2That user is already the plot owner: %s0", "Member"),
|
||||||
|
|
||||||
NEED_ON_OFF("$2You need to specify a value. Possible values: $1on$2, $1off",
|
ALREADY_ADDED("$2That user is already added to that category: %s0", "Member"),
|
||||||
"Rain"), SETTING_UPDATED("$4You successfully updated the setting", "Rain"),
|
MEMBER_ADDED("$4That user can now build while the plot owner is online", "Member"),
|
||||||
/*
|
|
||||||
* Flag
|
|
||||||
*/
|
|
||||||
|
|
||||||
FLAG_KEY("$2Key: %s", "Flag"), FLAG_TYPE("$2Type: %s", "Flag"),
|
|
||||||
|
|
||||||
FLAG_DESC("$2Desc: %s", "Flag"), 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"), NOT_VALID_VALUE("$2Flag values must be alphanumerical", "Flag"),
|
|
||||||
|
|
||||||
FLAG_NOT_IN_PLOT("$2The plot does not have that flag", "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_ADDED("$4Successfully added flag", "Flag"), FLAG_TUTORIAL_USAGE(
|
|
||||||
"$1Have an admin set the flag: $2%s", "CommandConfig"),
|
|
||||||
/*
|
|
||||||
* Trusted
|
|
||||||
*/
|
|
||||||
|
|
||||||
TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), TRUSTED_REMOVED(
|
|
||||||
"$4You successfully removed a trusted user from the plot", "Trusted"),
|
|
||||||
|
|
||||||
WAS_NOT_ADDED("$2That player was not trusted on this plot", "Trusted"), PLOT_REMOVED_USER(
|
|
||||||
"$1Plot %s of which you were added to has been deleted due to owner inactivity",
|
|
||||||
"Trusted"),
|
|
||||||
/*
|
|
||||||
* Member
|
|
||||||
*/
|
|
||||||
|
|
||||||
REMOVED_PLAYERS("$2Removed %s players from this plot.", "Member"), ALREADY_OWNER(
|
|
||||||
"$2That user is already the plot owner: %s0", "Member"),
|
|
||||||
|
|
||||||
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"),
|
|
||||||
|
|
||||||
MEMBER_REMOVED("$1You successfully removed a user from the plot",
|
|
||||||
"Member"), MEMBER_WAS_NOT_ADDED("$2That player was not added as a user on this plot",
|
|
||||||
"Member"),
|
|
||||||
|
|
||||||
|
MEMBER_REMOVED("$1You successfully removed a user from the plot", "Member"),
|
||||||
|
MEMBER_WAS_NOT_ADDED("$2That player was not added as a user on this plot", "Member"),
|
||||||
PLOT_MAX_MEMBERS("$2You are not allowed to add any more players to this plot", "Member"),
|
PLOT_MAX_MEMBERS("$2You are not allowed to add any more players to this plot", "Member"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Set Owner
|
//<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("$4You successfully set the plot owner", "Owner"), SET_OWNER_CANCELLED(
|
|
||||||
"$2The setowner action was cancelled", "Owner"),
|
|
||||||
|
|
||||||
NOW_OWNER("$4You are now owner of plot %s", "Owner"),
|
NOW_OWNER("$4You are now owner of plot %s", "Owner"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Signs
|
//<editor-fold desc="Signs">
|
||||||
*/
|
OWNER_SIGN_LINE_1("$1ID: $1%id%", "Signs"),
|
||||||
|
OWNER_SIGN_LINE_2("$1Owner:", "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"),
|
||||||
OWNER_SIGN_LINE_3("$2%plr%", "Signs"), OWNER_SIGN_LINE_4("$3Claimed", "Signs"),
|
//</editor-fold>
|
||||||
/*
|
//<editor-fold desc="Help">
|
||||||
* 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_HEADER("$3&m---------&r $1Plot\u00B2 Help $3&m---------", "Help"), HELP_PAGE_HEADER(
|
HELP_INFO_ITEM("$1/plot help %category% $3- $2%category_desc%", "Help"),
|
||||||
"$1Category: $2%category%$2,$1 Page: $2%current%$3/$2%max%$2", "Help"),
|
HELP_ITEM("$1%usage% [%alias%]&- $3- $2%desc%&-", "Help"),
|
||||||
|
|
||||||
HELP_FOOTER("$3&m---------&r $1Plot\u00B2 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"),
|
HELP_DISPLAY_ALL_COMMANDS("Display all commands", "Help"),
|
||||||
|
DIRECTION("$1Current direction: %dir%", "Help"),
|
||||||
|
//</editor-fold>
|
||||||
|
|
||||||
BUCKET_ENTRIES_IGNORED(
|
BUCKET_ENTRIES_IGNORED(
|
||||||
"$2Total bucket values add up to 1 or more. Blocks without a spcified chance will be ignored",
|
"$2Total bucket values add up to 1 or more. Blocks without a spcified chance will be ignored",
|
||||||
"Generator_Bucket"),
|
"Generator_Bucket"),
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command Categories
|
* Command Categories
|
||||||
*/
|
*/
|
||||||
COMMAND_CATEGORY_CLAIMING("Claiming", "Category"), COMMAND_CATEGORY_TELEPPORT("Teleport",
|
COMMAND_CATEGORY_CLAIMING("Claiming", "Category"),
|
||||||
"Category"), COMMAND_CATEGORY_SETTINGS("Protection", "Category"), COMMAND_CATEGORY_CHAT(
|
COMMAND_CATEGORY_TELEPORT("Teleport", "Category"),
|
||||||
"Chat", "Category"), COMMAND_CATEGORY_SCHEMATIC("Web",
|
COMMAND_CATEGORY_SETTINGS("Protection", "Category"),
|
||||||
"Category"), COMMAND_CATEGORY_APPEARANCE("Cosmetic", "Category"), COMMAND_CATEGORY_INFO(
|
COMMAND_CATEGORY_CHAT("Chat", "Category"),
|
||||||
"Info", "Category"), COMMAND_CATEGORY_DEBUG("Debug",
|
COMMAND_CATEGORY_SCHEMATIC("Web", "Category"),
|
||||||
"Category"), COMMAND_CATEGORY_ADMINISTRATION("Admin", "Category"),
|
COMMAND_CATEGORY_APPEARANCE("Cosmetic", "Category"),
|
||||||
|
COMMAND_CATEGORY_INFO("Info", "Category"),
|
||||||
|
COMMAND_CATEGORY_DEBUG("Debug", "Category"),
|
||||||
|
COMMAND_CATEGORY_ADMINISTRATION("Admin", "Category"),
|
||||||
|
|
||||||
/*
|
|
||||||
* Direction
|
|
||||||
*/
|
|
||||||
|
|
||||||
DIRECTION("$1Current direction: %dir%", "Help"),
|
|
||||||
/*
|
|
||||||
* Grant
|
|
||||||
*/
|
|
||||||
|
|
||||||
GRANTED_PLOTS("$1Result: $2%s $1grants left", "Grants"), GRANTED_PLOT(
|
|
||||||
"$1You granted %s0 plot to $2%s1", "Grants"),
|
|
||||||
|
|
||||||
|
//<editor-fold desc="Grants">
|
||||||
|
GRANTED_PLOTS("$1Result: $2%s $1grants left", "Grants"),
|
||||||
|
GRANTED_PLOT("$1You granted %s0 plot to $2%s1", "Grants"),
|
||||||
GRANTED_PLOT_FAILED("$1Grant failed: $2%s", "Grants"),
|
GRANTED_PLOT_FAILED("$1Grant failed: $2%s", "Grants"),
|
||||||
/*
|
//</editor-fold>
|
||||||
* Custom
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legacy Configuration Conversion
|
* Legacy Configuration Conversion
|
||||||
@ -915,48 +746,25 @@ public enum Captions {
|
|||||||
|
|
||||||
public static final HashMap<String, String> replacements = new HashMap<>();
|
public static final HashMap<String, String> replacements = new HashMap<>();
|
||||||
|
|
||||||
/**
|
private final String defaultString;
|
||||||
* Default.
|
|
||||||
*/
|
|
||||||
private final String def;
|
|
||||||
/**
|
|
||||||
* What locale category should this translation fall under.
|
|
||||||
*/
|
|
||||||
private final String category;
|
private final String category;
|
||||||
/**
|
|
||||||
* Should the string be prefixed.
|
|
||||||
*/
|
|
||||||
private final boolean prefix;
|
private final boolean prefix;
|
||||||
/**
|
private String translatedString;
|
||||||
* Translated.
|
|
||||||
*/
|
|
||||||
private String s;
|
|
||||||
|
|
||||||
/**
|
Captions(String defaultString, boolean prefix, String category) {
|
||||||
* Constructor.
|
this.defaultString = defaultString;
|
||||||
*
|
this.translatedString = defaultString;
|
||||||
* @param def default
|
|
||||||
* @param prefix use prefix
|
|
||||||
*/
|
|
||||||
Captions(String def, boolean prefix, String category) {
|
|
||||||
this.def = def;
|
|
||||||
this.s = def;
|
|
||||||
this.prefix = prefix;
|
this.prefix = prefix;
|
||||||
this.category = category.toLowerCase();
|
this.category = category.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
Captions(String defaultString, String category) {
|
||||||
* Constructor.
|
this(defaultString, true, category.toLowerCase());
|
||||||
*
|
|
||||||
* @param def default
|
|
||||||
*/
|
|
||||||
Captions(String def, String category) {
|
|
||||||
this(def, true, category.toLowerCase());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String format(String m, Object... args) {
|
public static String format(String message, Object... args) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
return m;
|
return message;
|
||||||
}
|
}
|
||||||
Map<String, String> map = new LinkedHashMap<>();
|
Map<String, String> map = new LinkedHashMap<>();
|
||||||
for (int i = args.length - 1; i >= 0; i--) {
|
for (int i = args.length - 1; i >= 0; i--) {
|
||||||
@ -971,15 +779,15 @@ public enum Captions {
|
|||||||
map.put("%s", arg);
|
map.put("%s", arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m = StringMan.replaceFromMap(m, map);
|
message = StringMan.replaceFromMap(message, map);
|
||||||
return m;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String format(Captions caption, Object... args) {
|
public static String format(Captions caption, Object... args) {
|
||||||
if (caption.usePrefix() && caption.s.length() > 0) {
|
if (caption.usePrefix() && caption.translatedString.length() > 0) {
|
||||||
return Captions.PREFIX.s() + format(caption.s, args);
|
return Captions.PREFIX.getTranslated() + format(caption.translatedString, args);
|
||||||
} else {
|
} else {
|
||||||
return format(caption.s, args);
|
return format(caption.translatedString, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1031,7 +839,7 @@ public enum Captions {
|
|||||||
yml.set(caption.category + '.' + caption.name().toLowerCase(), value);
|
yml.set(caption.category + '.' + caption.name().toLowerCase(), value);
|
||||||
}
|
}
|
||||||
captions.add(caption);
|
captions.add(caption);
|
||||||
caption.s = value;
|
caption.translatedString = value;
|
||||||
} else {
|
} else {
|
||||||
toRemove.add(key);
|
toRemove.add(key);
|
||||||
}
|
}
|
||||||
@ -1059,9 +867,11 @@ public enum Captions {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
changed = true;
|
changed = true;
|
||||||
yml.set(caption.category + '.' + caption.name().toLowerCase(), caption.def);
|
yml.set(caption.category + '.' + caption.name().toLowerCase(),
|
||||||
|
caption.defaultString);
|
||||||
}
|
}
|
||||||
caption.s = StringMan.replaceFromMap(caption.s, replacements);
|
caption.translatedString =
|
||||||
|
StringMan.replaceFromMap(caption.translatedString, replacements);
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
yml.save(file);
|
yml.save(file);
|
||||||
@ -1072,15 +882,15 @@ public enum Captions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String f(final Object... args) {
|
public String f(final Object... args) {
|
||||||
return format(s(), args);
|
return format(getTranslated(), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String toString() {
|
@Override public String toString() {
|
||||||
return this.s;
|
return this.translatedString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String s() {
|
public String getTranslated() {
|
||||||
return this.s;
|
return this.translatedString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean usePrefix() {
|
public boolean usePrefix() {
|
||||||
@ -1088,7 +898,7 @@ public enum Captions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String formatted() {
|
public String formatted() {
|
||||||
return StringMan.replaceFromMap(s(), replacements);
|
return StringMan.replaceFromMap(getTranslated(), replacements);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCategory() {
|
public String getCategory() {
|
||||||
|
@ -7,7 +7,11 @@ import com.github.intellectualsites.plotsquared.plot.flag.FlagManager;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
||||||
import com.github.intellectualsites.plotsquared.plot.listener.WEExtent;
|
import com.github.intellectualsites.plotsquared.plot.listener.WEExtent;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.*;
|
import com.github.intellectualsites.plotsquared.plot.object.*;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.*;
|
import com.github.intellectualsites.plotsquared.plot.util.ChunkManager;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue;
|
import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue;
|
import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis;
|
import com.github.intellectualsites.plotsquared.plot.util.expiry.PlotAnalysis;
|
||||||
@ -167,7 +171,7 @@ public abstract class HybridUtils {
|
|||||||
regeneratePlotWalls(area);
|
regeneratePlotWalls(area);
|
||||||
|
|
||||||
HybridUtils.UPDATE = false;
|
HybridUtils.UPDATE = false;
|
||||||
PlotSquared.debug(Captions.PREFIX.s() + "Finished road conversion");
|
PlotSquared.debug(Captions.PREFIX.getTranslated() + "Finished road conversion");
|
||||||
// CANCEL TASK
|
// CANCEL TASK
|
||||||
} else {
|
} else {
|
||||||
final Runnable task = this;
|
final Runnable task = this;
|
||||||
|
@ -57,7 +57,9 @@ public class PlotListener {
|
|||||||
Optional<String> greetingFlag = plot.getFlag(Flags.GREETING);
|
Optional<String> greetingFlag = plot.getFlag(Flags.GREETING);
|
||||||
if (greetingFlag.isPresent()) {
|
if (greetingFlag.isPresent()) {
|
||||||
greeting = greetingFlag.get();
|
greeting = greetingFlag.get();
|
||||||
MainUtil.format(Captions.PREFIX_GREETING.s() + greeting, plot, player, false,
|
MainUtil
|
||||||
|
.format(Captions.PREFIX_GREETING.getTranslated() + greeting, plot, player,
|
||||||
|
false,
|
||||||
new RunnableVal<String>() {
|
new RunnableVal<String>() {
|
||||||
@Override public void run(String value) {
|
@Override public void run(String value) {
|
||||||
MainUtil.sendMessage(player, value);
|
MainUtil.sendMessage(player, value);
|
||||||
@ -72,8 +74,8 @@ public class PlotListener {
|
|||||||
for (UUID uuid : plot.getOwners()) {
|
for (UUID uuid : plot.getOwners()) {
|
||||||
PlotPlayer owner = UUIDHandler.getPlayer(uuid);
|
PlotPlayer owner = UUIDHandler.getPlayer(uuid);
|
||||||
if (owner != null && !owner.getUUID().equals(player.getUUID())) {
|
if (owner != null && !owner.getUUID().equals(player.getUUID())) {
|
||||||
MainUtil.sendMessage(owner,
|
MainUtil.sendMessage(owner, Captions.NOTIFY_ENTER.getTranslated()
|
||||||
Captions.NOTIFY_ENTER.s().replace("%player", player.getName())
|
.replace("%player", player.getName())
|
||||||
.replace("%plot", plot.getId().toString()));
|
.replace("%plot", plot.getId().toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,7 +101,8 @@ public class PlotListener {
|
|||||||
player.setGameMode(gamemodeFlag.get());
|
player.setGameMode(gamemodeFlag.get());
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, StringMan
|
MainUtil.sendMessage(player, StringMan
|
||||||
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.s(), "{plot}",
|
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.getTranslated(),
|
||||||
|
"{plot}",
|
||||||
plot.getId(), "{gamemode}", gamemodeFlag.get()));
|
plot.getId(), "{gamemode}", gamemodeFlag.get()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,7 +115,8 @@ public class PlotListener {
|
|||||||
player.setGameMode(guestGamemodeFlag.get());
|
player.setGameMode(guestGamemodeFlag.get());
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, StringMan
|
MainUtil.sendMessage(player, StringMan
|
||||||
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.s(), "{plot}",
|
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.getTranslated(),
|
||||||
|
"{plot}",
|
||||||
plot.getId(), "{gamemode}", guestGamemodeFlag.get()));
|
plot.getId(), "{gamemode}", guestGamemodeFlag.get()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,8 +164,8 @@ public class PlotListener {
|
|||||||
CommentManager.sendTitle(player, plot);
|
CommentManager.sendTitle(player, plot);
|
||||||
}
|
}
|
||||||
if (titles) {
|
if (titles) {
|
||||||
if (!Captions.TITLE_ENTERED_PLOT.s().isEmpty() || !Captions.TITLE_ENTERED_PLOT_SUB
|
if (!Captions.TITLE_ENTERED_PLOT.getTranslated().isEmpty()
|
||||||
.s().isEmpty()) {
|
|| !Captions.TITLE_ENTERED_PLOT_SUB.getTranslated().isEmpty()) {
|
||||||
TaskManager.runTaskLaterAsync(() -> {
|
TaskManager.runTaskLaterAsync(() -> {
|
||||||
Plot lastPlot = player.getMeta(PlotPlayer.META_LAST_PLOT);
|
Plot lastPlot = player.getMeta(PlotPlayer.META_LAST_PLOT);
|
||||||
if ((lastPlot != null) && plot.getId().equals(lastPlot.getId())) {
|
if ((lastPlot != null) && plot.getId().equals(lastPlot.getId())) {
|
||||||
@ -173,9 +177,11 @@ public class PlotListener {
|
|||||||
replacements.put("%alias", plot.toString());
|
replacements.put("%alias", plot.toString());
|
||||||
replacements.put("%s", MainUtil.getName(plot.getOwner()));
|
replacements.put("%s", MainUtil.getName(plot.getOwner()));
|
||||||
String main = StringMan
|
String main = StringMan
|
||||||
.replaceFromMap(Captions.TITLE_ENTERED_PLOT.s(), replacements);
|
.replaceFromMap(Captions.TITLE_ENTERED_PLOT.getTranslated(),
|
||||||
|
replacements);
|
||||||
String sub = StringMan
|
String sub = StringMan
|
||||||
.replaceFromMap(Captions.TITLE_ENTERED_PLOT_SUB.s(), replacements);
|
.replaceFromMap(Captions.TITLE_ENTERED_PLOT_SUB.getTranslated(),
|
||||||
|
replacements);
|
||||||
player.sendTitle(main, sub);
|
player.sendTitle(main, sub);
|
||||||
}
|
}
|
||||||
}, 20);
|
}, 20);
|
||||||
@ -207,14 +213,14 @@ public class PlotListener {
|
|||||||
player.setGameMode(pw.GAMEMODE);
|
player.setGameMode(pw.GAMEMODE);
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, StringMan
|
MainUtil.sendMessage(player, StringMan
|
||||||
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.s(), "{plot}",
|
.replaceAll(Captions.GAMEMODE_WAS_BYPASSED.getTranslated(), "{plot}",
|
||||||
plot.toString(), "{gamemode}", pw.GAMEMODE.name().toLowerCase()));
|
plot.toString(), "{gamemode}", pw.GAMEMODE.name().toLowerCase()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Optional<String> farewell = plot.getFlag(Flags.FAREWELL);
|
Optional<String> farewell = plot.getFlag(Flags.FAREWELL);
|
||||||
farewell.ifPresent(s -> MainUtil
|
farewell.ifPresent(s -> MainUtil
|
||||||
.format(Captions.PREFIX_FAREWELL.s() + s, plot, player, false,
|
.format(Captions.PREFIX_FAREWELL.getTranslated() + s, plot, player, false,
|
||||||
new RunnableVal<String>() {
|
new RunnableVal<String>() {
|
||||||
@Override public void run(String value) {
|
@Override public void run(String value) {
|
||||||
MainUtil.sendMessage(player, value);
|
MainUtil.sendMessage(player, value);
|
||||||
@ -226,8 +232,8 @@ public class PlotListener {
|
|||||||
for (UUID uuid : plot.getOwners()) {
|
for (UUID uuid : plot.getOwners()) {
|
||||||
PlotPlayer owner = UUIDHandler.getPlayer(uuid);
|
PlotPlayer owner = UUIDHandler.getPlayer(uuid);
|
||||||
if ((owner != null) && !owner.getUUID().equals(player.getUUID())) {
|
if ((owner != null) && !owner.getUUID().equals(player.getUUID())) {
|
||||||
MainUtil.sendMessage(owner,
|
MainUtil.sendMessage(owner, Captions.NOTIFY_LEAVE.getTranslated()
|
||||||
Captions.NOTIFY_LEAVE.s().replace("%player", player.getName())
|
.replace("%player", player.getName())
|
||||||
.replace("%plot", plot.getId().toString()));
|
.replace("%plot", plot.getId().toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2136,7 +2136,7 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
loop:
|
loop:
|
||||||
for (int i = 4; i > 0; i--) {
|
for (int i = 4; i > 0; i--) {
|
||||||
String caption = Captions.valueOf("OWNER_SIGN_LINE_" + i).s();
|
String caption = Captions.valueOf("OWNER_SIGN_LINE_" + i).getTranslated();
|
||||||
int index = caption.indexOf("%plr%");
|
int index = caption.indexOf("%plr%");
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -171,15 +171,15 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int hasPermissionRange(String stub, int range) {
|
public int hasPermissionRange(String stub, int range) {
|
||||||
if (hasPermission(Captions.PERMISSION_ADMIN.s())) {
|
if (hasPermission(Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
String[] nodes = stub.split("\\.");
|
String[] nodes = stub.split("\\.");
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||||
builder.append(nodes[i]).append(".");
|
builder.append(nodes[i]).append(".");
|
||||||
if (!stub.equals(builder + Captions.PERMISSION_STAR.s())) {
|
if (!stub.equals(builder + Captions.PERMISSION_STAR.getTranslated())) {
|
||||||
if (hasPermission(builder + Captions.PERMISSION_STAR.s())) {
|
if (hasPermission(builder + Captions.PERMISSION_STAR.getTranslated())) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,8 @@ public class CommentManager {
|
|||||||
total = count.get();
|
total = count.get();
|
||||||
}
|
}
|
||||||
if ((size.decrementAndGet() == 0) && (total > 0)) {
|
if ((size.decrementAndGet() == 0) && (total > 0)) {
|
||||||
player.sendTitle("",
|
player.sendTitle("", Captions.INBOX_NOTIFICATION.getTranslated()
|
||||||
Captions.INBOX_NOTIFICATION.s().replaceAll("%s", "" + total));
|
.replaceAll("%s", "" + total));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -111,13 +111,13 @@ public abstract class EventUtil {
|
|||||||
return true;
|
return true;
|
||||||
case BREAK_BLOCK:
|
case BREAK_BLOCK:
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
Optional<HashSet<PlotBlock>> use = plot.getFlag(Flags.USE);
|
Optional<HashSet<PlotBlock>> use = plot.getFlag(Flags.USE);
|
||||||
@ -137,126 +137,128 @@ public abstract class EventUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Permissions
|
if (Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(), false)) {
|
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
return !(!notifyPerms || MainUtil.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_USE.s() + '/' + Captions.FLAG_BREAK.s()));
|
Captions.FLAG_USE.getTranslated() + '/' + Captions.FLAG_BREAK.getTranslated()));
|
||||||
case BREAK_HANGING:
|
case BREAK_HANGING:
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.HANGING_BREAK).orElse(false)) {
|
if (plot.getFlag(Flags.HANGING_BREAK).orElse(false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (plot.hasOwner()) {
|
if (plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(), false)
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(), false)
|
||||||
|| !(!notifyPerms || MainUtil
|
|| !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_HANGING_BREAK.s()));
|
Captions.FLAG_HANGING_BREAK.getTranslated()));
|
||||||
}
|
}
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
case BREAK_MISC:
|
case BREAK_MISC:
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.MISC_BREAK).orElse(false)) {
|
if (plot.getFlag(Flags.MISC_BREAK).orElse(false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (plot.hasOwner()) {
|
if (plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(), false)
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(), false)
|
||||||
|| !(!notifyPerms || MainUtil
|
|| !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_MISC_BREAK.s()));
|
Captions.FLAG_MISC_BREAK.getTranslated()));
|
||||||
}
|
}
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
case BREAK_VEHICLE:
|
case BREAK_VEHICLE:
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.VEHICLE_BREAK).orElse(false)) {
|
if (plot.getFlag(Flags.VEHICLE_BREAK).orElse(false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (plot.hasOwner()) {
|
if (plot.hasOwner()) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_VEHICLE_BREAK.s()));
|
Captions.FLAG_VEHICLE_BREAK.getTranslated()));
|
||||||
}
|
}
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
case INTERACT_BLOCK: {
|
case INTERACT_BLOCK: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
Optional<HashSet<PlotBlock>> flagValue = plot.getFlag(Flags.USE);
|
Optional<HashSet<PlotBlock>> flagValue = plot.getFlag(Flags.USE);
|
||||||
HashSet<PlotBlock> value = flagValue.orElse(null);
|
HashSet<PlotBlock> value = flagValue.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(), false)
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(), false)
|
||||||
|| !(!notifyPerms || MainUtil
|
|| !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE, Captions.FLAG_USE.s()));
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
|
Captions.FLAG_USE.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case PLACE_BLOCK: {
|
case PLACE_BLOCK: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_BUILD_ROAD.s(),
|
.hasPermission(player, Captions.PERMISSION_ADMIN_BUILD_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_BUILD_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_BUILD_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
Optional<HashSet<PlotBlock>> flagValue = plot.getFlag(Flags.PLACE);
|
Optional<HashSet<PlotBlock>> flagValue = plot.getFlag(Flags.PLACE);
|
||||||
HashSet<PlotBlock> value = flagValue.orElse(null);
|
HashSet<PlotBlock> value = flagValue.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_BUILD_OTHER.s(), false)) {
|
Captions.PERMISSION_ADMIN_BUILD_OTHER.getTranslated(), false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_PLACE.s()));
|
Captions.FLAG_PLACE.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case TRIGGER_PHYSICAL: {
|
case TRIGGER_PHYSICAL: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(), false);
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(), false);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.DEVICE_INTERACT).orElse(false)) {
|
if (plot.getFlag(Flags.DEVICE_INTERACT).orElse(false)) {
|
||||||
@ -266,8 +268,8 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flagValue.orElse(null);
|
HashSet<PlotBlock> value = flagValue.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -277,13 +279,13 @@ public abstract class EventUtil {
|
|||||||
}
|
}
|
||||||
case INTERACT_HANGING: {
|
case INTERACT_HANGING: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.HOSTILE_INTERACT).orElse(false)) {
|
if (plot.getFlag(Flags.HOSTILE_INTERACT).orElse(false)) {
|
||||||
@ -293,26 +295,27 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flagValue.orElse(null);
|
HashSet<PlotBlock> value = flagValue.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_USE.s() + '/' + Captions.FLAG_HANGING_INTERACT.s()));
|
Captions.FLAG_USE.getTranslated() + '/' + Captions.FLAG_HANGING_INTERACT
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case INTERACT_MISC: {
|
case INTERACT_MISC: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.MISC_INTERACT).orElse(false)) {
|
if (plot.getFlag(Flags.MISC_INTERACT).orElse(false)) {
|
||||||
@ -322,26 +325,27 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flag.orElse(null);
|
HashSet<PlotBlock> value = flag.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_USE.s() + '/' + Captions.FLAG_MISC_INTERACT.s()));
|
Captions.FLAG_USE.getTranslated() + '/' + Captions.FLAG_MISC_INTERACT
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case INTERACT_VEHICLE: {
|
case INTERACT_VEHICLE: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.VEHICLE_USE).orElse(false)) {
|
if (plot.getFlag(Flags.VEHICLE_USE).orElse(false)) {
|
||||||
@ -351,26 +355,27 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flag.orElse(null);
|
HashSet<PlotBlock> value = flag.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_USE.s() + '/' + Captions.FLAG_VEHICLE_USE.s()));
|
Captions.FLAG_USE.getTranslated() + '/' + Captions.FLAG_VEHICLE_USE
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case SPAWN_MOB: {
|
case SPAWN_MOB: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.MOB_PLACE).orElse(false)) {
|
if (plot.getFlag(Flags.MOB_PLACE).orElse(false)) {
|
||||||
@ -380,26 +385,27 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flagValue.orElse(null);
|
HashSet<PlotBlock> value = flagValue.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_MOB_PLACE.s() + '/' + Captions.FLAG_PLACE.s()));
|
Captions.FLAG_MOB_PLACE.getTranslated() + '/' + Captions.FLAG_PLACE
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case PLACE_MISC: {
|
case PLACE_MISC: {
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.MISC_PLACE).orElse(false)) {
|
if (plot.getFlag(Flags.MISC_PLACE).orElse(false)) {
|
||||||
@ -409,27 +415,28 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flag.orElse(null);
|
HashSet<PlotBlock> value = flag.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_MISC_PLACE.s() + '/' + Captions.FLAG_PLACE.s()));
|
Captions.FLAG_MISC_PLACE.getTranslated() + '/' + Captions.FLAG_PLACE
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case PLACE_VEHICLE:
|
case PLACE_VEHICLE:
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_ROAD.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_ROAD.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (!plot.hasOwner()) {
|
if (!plot.hasOwner()) {
|
||||||
return Permissions
|
return Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED.getTranslated(),
|
||||||
notifyPerms);
|
notifyPerms);
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.VEHICLE_PLACE).orElse(false)) {
|
if (plot.getFlag(Flags.VEHICLE_PLACE).orElse(false)) {
|
||||||
@ -439,14 +446,15 @@ public abstract class EventUtil {
|
|||||||
HashSet<PlotBlock> value = flag.orElse(null);
|
HashSet<PlotBlock> value = flag.orElse(null);
|
||||||
if (value == null || !PlotBlock.containsEverything(value) && !value
|
if (value == null || !PlotBlock.containsEverything(value) && !value
|
||||||
.contains(block.getPlotBlock())) {
|
.contains(block.getPlotBlock())) {
|
||||||
if (Permissions
|
if (Permissions.hasPermission(player,
|
||||||
.hasPermission(player, Captions.PERMISSION_ADMIN_INTERACT_OTHER.s(),
|
Captions.PERMISSION_ADMIN_INTERACT_OTHER.getTranslated(),
|
||||||
false)) {
|
false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(!notifyPerms || MainUtil
|
return !(!notifyPerms || MainUtil
|
||||||
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
.sendMessage(player, Captions.FLAG_TUTORIAL_USAGE,
|
||||||
Captions.FLAG_VEHICLE_PLACE.s() + '/' + Captions.FLAG_PLACE.s()));
|
Captions.FLAG_VEHICLE_PLACE.getTranslated() + '/' + Captions.FLAG_PLACE
|
||||||
|
.getTranslated()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -88,7 +88,7 @@ public class MainUtil {
|
|||||||
|
|
||||||
public static void sendAdmin(final String s) {
|
public static void sendAdmin(final String s) {
|
||||||
for (final PlotPlayer player : UUIDHandler.getPlayers().values()) {
|
for (final PlotPlayer player : UUIDHandler.getPlayers().values()) {
|
||||||
if (player.hasPermission(Captions.PERMISSION_ADMIN.s())) {
|
if (player.hasPermission(Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
player.sendMessage(Captions.color(s));
|
player.sendMessage(Captions.color(s));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,17 +331,17 @@ public class MainUtil {
|
|||||||
*/
|
*/
|
||||||
@Nonnull public static String getName(UUID owner) {
|
@Nonnull public static String getName(UUID owner) {
|
||||||
if (owner == null) {
|
if (owner == null) {
|
||||||
return Captions.NONE.s();
|
return Captions.NONE.getTranslated();
|
||||||
}
|
}
|
||||||
if (owner.equals(DBFunc.EVERYONE)) {
|
if (owner.equals(DBFunc.EVERYONE)) {
|
||||||
return Captions.EVERYONE.s();
|
return Captions.EVERYONE.getTranslated();
|
||||||
}
|
}
|
||||||
if (owner.equals(DBFunc.SERVER)) {
|
if (owner.equals(DBFunc.SERVER)) {
|
||||||
return Captions.SERVER.s();
|
return Captions.SERVER.getTranslated();
|
||||||
}
|
}
|
||||||
String name = UUIDHandler.getName(owner);
|
String name = UUIDHandler.getName(owner);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
return Captions.UNKNOWN.s();
|
return Captions.UNKNOWN.getTranslated();
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -588,10 +588,11 @@ public class MainUtil {
|
|||||||
public static boolean sendMessage(CommandCaller player, String msg, boolean prefix) {
|
public static boolean sendMessage(CommandCaller player, String msg, boolean prefix) {
|
||||||
if (!msg.isEmpty()) {
|
if (!msg.isEmpty()) {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
String message = (prefix ? Captions.PREFIX.s() : "") + msg;
|
String message = (prefix ? Captions.PREFIX.getTranslated() : "") + msg;
|
||||||
PlotSquared.log(message);
|
PlotSquared.log(message);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage((prefix ? Captions.PREFIX.s() : "") + Captions.color(msg));
|
player.sendMessage(
|
||||||
|
(prefix ? Captions.PREFIX.getTranslated() : "") + Captions.color(msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -617,7 +618,7 @@ public class MainUtil {
|
|||||||
*/
|
*/
|
||||||
public static boolean sendMessage(final CommandCaller player, final Captions caption,
|
public static boolean sendMessage(final CommandCaller player, final Captions caption,
|
||||||
final Object... args) {
|
final Object... args) {
|
||||||
if (caption.s().isEmpty()) {
|
if (caption.getTranslated().isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
TaskManager.runTaskAsync(() -> {
|
TaskManager.runTaskAsync(() -> {
|
||||||
@ -713,7 +714,7 @@ public class MainUtil {
|
|||||||
public static void format(String info, final Plot plot, PlotPlayer player, final boolean full,
|
public static void format(String info, final Plot plot, PlotPlayer player, final boolean full,
|
||||||
final RunnableVal<String> whenDone) {
|
final RunnableVal<String> whenDone) {
|
||||||
int num = plot.getConnectedPlots().size();
|
int num = plot.getConnectedPlots().size();
|
||||||
String alias = !plot.getAlias().isEmpty() ? plot.getAlias() : Captions.NONE.s();
|
String alias = !plot.getAlias().isEmpty() ? plot.getAlias() : Captions.NONE.getTranslated();
|
||||||
Location bot = plot.getCorners()[0];
|
Location bot = plot.getCorners()[0];
|
||||||
String biome = WorldUtil.IMP.getBiome(plot.getWorldName(), bot.getX(), bot.getZ());
|
String biome = WorldUtil.IMP.getBiome(plot.getWorldName(), bot.getX(), bot.getZ());
|
||||||
String trusted = getPlayerList(plot.getTrusted());
|
String trusted = getPlayerList(plot.getTrusted());
|
||||||
@ -722,28 +723,27 @@ public class MainUtil {
|
|||||||
String seen;
|
String seen;
|
||||||
if (Settings.Enabled_Components.PLOT_EXPIRY && ExpireManager.IMP != null) {
|
if (Settings.Enabled_Components.PLOT_EXPIRY && ExpireManager.IMP != null) {
|
||||||
if (plot.isOnline()) {
|
if (plot.isOnline()) {
|
||||||
seen = Captions.NOW.s();
|
seen = Captions.NOW.getTranslated();
|
||||||
} else {
|
} else {
|
||||||
int time = (int) (ExpireManager.IMP.getAge(plot) / 1000);
|
int time = (int) (ExpireManager.IMP.getAge(plot) / 1000);
|
||||||
if (time != 0) {
|
if (time != 0) {
|
||||||
seen = MainUtil.secToTime(time);
|
seen = MainUtil.secToTime(time);
|
||||||
} else {
|
} else {
|
||||||
seen = Captions.UNKNOWN.s();
|
seen = Captions.UNKNOWN.getTranslated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
seen = Captions.NEVER.s();
|
seen = Captions.NEVER.getTranslated();
|
||||||
}
|
}
|
||||||
Optional<String> descriptionFlag = plot.getFlag(Flags.DESCRIPTION);
|
Optional<String> descriptionFlag = plot.getFlag(Flags.DESCRIPTION);
|
||||||
String description = !descriptionFlag.isPresent() ?
|
String description = !descriptionFlag.isPresent() ? Captions.NONE.getTranslated() :
|
||||||
Captions.NONE.s() :
|
|
||||||
Flags.DESCRIPTION.valueToString(descriptionFlag.get());
|
Flags.DESCRIPTION.valueToString(descriptionFlag.get());
|
||||||
|
|
||||||
StringBuilder flags = new StringBuilder();
|
StringBuilder flags = new StringBuilder();
|
||||||
HashMap<Flag<?>, Object> flagMap =
|
HashMap<Flag<?>, Object> flagMap =
|
||||||
FlagManager.getPlotFlags(plot.getArea(), plot.getSettings(), true);
|
FlagManager.getPlotFlags(plot.getArea(), plot.getSettings(), true);
|
||||||
if (flagMap.isEmpty()) {
|
if (flagMap.isEmpty()) {
|
||||||
flags.append(Captions.NONE.s());
|
flags.append(Captions.NONE.getTranslated());
|
||||||
} else {
|
} else {
|
||||||
String prefix = "";
|
String prefix = "";
|
||||||
for (Entry<Flag<?>, Object> entry : flagMap.entrySet()) {
|
for (Entry<Flag<?>, Object> entry : flagMap.entrySet()) {
|
||||||
@ -837,11 +837,11 @@ public class MainUtil {
|
|||||||
public static String getPlayerList(Collection<UUID> uuids) {
|
public static String getPlayerList(Collection<UUID> uuids) {
|
||||||
ArrayList<UUID> l = new ArrayList<>(uuids);
|
ArrayList<UUID> l = new ArrayList<>(uuids);
|
||||||
if (l.size() < 1) {
|
if (l.size() < 1) {
|
||||||
return Captions.NONE.s();
|
return Captions.NONE.getTranslated();
|
||||||
}
|
}
|
||||||
List<String> users =
|
List<String> users =
|
||||||
l.stream().map(MainUtil::getName).sorted().collect(Collectors.toList());
|
l.stream().map(MainUtil::getName).sorted().collect(Collectors.toList());
|
||||||
String c = Captions.PLOT_USER_LIST.s();
|
String c = Captions.PLOT_USER_LIST.getTranslated();
|
||||||
StringBuilder list = new StringBuilder();
|
StringBuilder list = new StringBuilder();
|
||||||
for (int x = 0; x < users.size(); x++) {
|
for (int x = 0; x < users.size(); x++) {
|
||||||
if (x + 1 == l.size()) {
|
if (x + 1 == l.size()) {
|
||||||
|
@ -15,7 +15,7 @@ import java.util.HashMap;
|
|||||||
public class Permissions {
|
public class Permissions {
|
||||||
|
|
||||||
public static boolean hasPermission(PlotPlayer player, Captions caption, boolean notify) {
|
public static boolean hasPermission(PlotPlayer player, Captions caption, boolean notify) {
|
||||||
return hasPermission(player, caption.s(), notify);
|
return hasPermission(player, caption.getTranslated(), notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +26,7 @@ public class Permissions {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean hasPermission(PlotPlayer player, Captions caption) {
|
public static boolean hasPermission(PlotPlayer player, Captions caption) {
|
||||||
return hasPermission(player, caption.s());
|
return hasPermission(player, caption.getTranslated());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,7 +68,7 @@ public class Permissions {
|
|||||||
} else if (caller.isPermissionSet(permission)) {
|
} else if (caller.isPermissionSet(permission)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (caller.hasPermission(Captions.PERMISSION_ADMIN.s())) {
|
if (caller.hasPermission(Captions.PERMISSION_ADMIN.getTranslated())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
permission = permission.toLowerCase().replaceAll("^[^a-z|0-9|\\.|_|-]", "");
|
permission = permission.toLowerCase().replaceAll("^[^a-z|0-9|\\.|_|-]", "");
|
||||||
@ -76,7 +76,7 @@ public class Permissions {
|
|||||||
StringBuilder n = new StringBuilder();
|
StringBuilder n = new StringBuilder();
|
||||||
for (int i = 0; i <= (nodes.length - 1); i++) {
|
for (int i = 0; i <= (nodes.length - 1); i++) {
|
||||||
n.append(nodes[i] + ".");
|
n.append(nodes[i] + ".");
|
||||||
String combined = n + Captions.PERMISSION_STAR.s();
|
String combined = n + Captions.PERMISSION_STAR.getTranslated();
|
||||||
if (!permission.equals(combined)) {
|
if (!permission.equals(combined)) {
|
||||||
if (caller.hasPermission(combined)) {
|
if (caller.hasPermission(combined)) {
|
||||||
return true;
|
return true;
|
||||||
@ -107,7 +107,7 @@ public class Permissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int hasPermissionRange(PlotPlayer player, Captions perm, int range) {
|
public static int hasPermissionRange(PlotPlayer player, Captions perm, int range) {
|
||||||
return hasPermissionRange(player, perm.s(), range);
|
return hasPermissionRange(player, perm.getTranslated(), range);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,7 +102,7 @@ public class UUIDHandler {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (uuid != null && uuid.equals(DBFunc.SERVER)) {
|
if (uuid != null && uuid.equals(DBFunc.SERVER)) {
|
||||||
return Captions.SERVER.s();
|
return Captions.SERVER.getTranslated();
|
||||||
}
|
}
|
||||||
return implementation.getName(uuid);
|
return implementation.getName(uuid);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ public class HelpObject {
|
|||||||
private final String _rendered;
|
private final String _rendered;
|
||||||
|
|
||||||
public HelpObject(final Command command, final String label) {
|
public HelpObject(final Command command, final String label) {
|
||||||
_rendered = StringMan.replaceAll(Captions.HELP_ITEM.s(), "%usage%",
|
_rendered = StringMan.replaceAll(Captions.HELP_ITEM.getTranslated(), "%usage%",
|
||||||
command.getUsage().replaceAll("\\{label\\}", label), "[%alias%]",
|
command.getUsage().replaceAll("\\{label\\}", label), "[%alias%]",
|
||||||
!command.getAliases().isEmpty() ?
|
!command.getAliases().isEmpty() ?
|
||||||
"(" + StringMan.join(command.getAliases(), "|") + ")" :
|
"(" + StringMan.join(command.getAliases(), "|") + ")" :
|
||||||
|
@ -16,7 +16,7 @@ public class HelpPage {
|
|||||||
|
|
||||||
public HelpPage(CommandCategory category, int currentPage, int maxPages) {
|
public HelpPage(CommandCategory category, int currentPage, int maxPages) {
|
||||||
this.helpObjects = new ArrayList<>();
|
this.helpObjects = new ArrayList<>();
|
||||||
this.header = Captions.HELP_PAGE_HEADER.s()
|
this.header = Captions.HELP_PAGE_HEADER.getTranslated()
|
||||||
.replace("%category%", category == null ? "ALL" : category.toString())
|
.replace("%category%", category == null ? "ALL" : category.toString())
|
||||||
.replace("%current%", (currentPage + 1) + "").replace("%max%", (maxPages + 1) + "");
|
.replace("%current%", (currentPage + 1) + "").replace("%max%", (maxPages + 1) + "");
|
||||||
}
|
}
|
||||||
@ -25,8 +25,9 @@ public class HelpPage {
|
|||||||
if (this.helpObjects.size() < 1) {
|
if (this.helpObjects.size() < 1) {
|
||||||
MainUtil.sendMessage(player, Captions.NOT_VALID_NUMBER, "(0)");
|
MainUtil.sendMessage(player, Captions.NOT_VALID_NUMBER, "(0)");
|
||||||
} else {
|
} else {
|
||||||
String message = Captions.HELP_HEADER.s() + "\n" + this.header + "\n" + StringMan
|
String message =
|
||||||
.join(this.helpObjects, "\n") + "\n" + Captions.HELP_FOOTER.s();
|
Captions.HELP_HEADER.getTranslated() + "\n" + this.header + "\n" + StringMan
|
||||||
|
.join(this.helpObjects, "\n") + "\n" + Captions.HELP_FOOTER.getTranslated();
|
||||||
MainUtil.sendMessage(player, message, false);
|
MainUtil.sendMessage(player, message, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user