From 7f01f2d7168c8afb658ecdbc60e006b70f0f92ba Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 27 Dec 2020 19:37:09 +0100 Subject: [PATCH] Rename placeholders matching more appropriately --- .../core/util/placeholders/PlaceholderRegistry.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java index 5a5b12c3a..e187560c4 100644 --- a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java +++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java @@ -76,7 +76,7 @@ public final class PlaceholderRegistry { this.registerPlaceholder(new PlotFlagPlaceholder(flag, true)); this.registerPlaceholder(new PlotFlagPlaceholder(flag, false)); }); - this.createPlaceholder("currentplot_world", player -> player.getLocation().getWorldName()); + this.createPlaceholder("world_name", player -> player.getLocation().getWorldName()); this.createPlaceholder("has_plot", player -> player.getPlotCount() > 0 ? "true" : "false"); this.createPlaceholder("allowed_plot_count", (player) -> { if (player.getAllowedPlots() >= Integer.MAX_VALUE) { // Beautifies cases with '*' permission @@ -101,7 +101,6 @@ public final class PlaceholderRegistry { return PlayerManager.getName(plotOwner, false); } catch (final Exception ignored) { } - return String.valueOf(TranslatableCaption.of("info.unknown")); }); this.createPlaceholder("currentplot_members", (player, plot) -> { @@ -155,7 +154,7 @@ public final class PlaceholderRegistry { sdf.setTimeZone(TimeZone.getTimeZone(Settings.Timeformat.TIME_ZONE)); return sdf.format(creationDate); }); - this.createPlaceholder("has_build_rights", (player, plot) -> + this.createPlaceholder("currentplot_can_build", (player, plot) -> plot.isAdded(player.getUUID()) ? "true" : "false"); this.createPlaceholder("currentplot_x", (player, plot) -> Integer.toString(plot.getId().getX())); this.createPlaceholder("currentplot_y", (player, plot) -> Integer.toString(plot.getId().getY()));