From 410879d1540396a513d4caf3e6651f16d5207f51 Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sat, 5 Dec 2020 15:20:19 +0100 Subject: [PATCH] Fixes https://github.com/IntellectualSites/PlotSquaredSuggestions/issues/141 --- .../util/placeholders/PlaceholderRegistry.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 ab4ed8778..76a9371e6 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 @@ -109,6 +109,24 @@ public final class PlaceholderRegistry { } return String.valueOf(plot.getDenied().size()); }); + this.createPlaceholder("currentplot_members_trusted_list", (player, plot) -> { + if (plot.getTrusted() == null) { + return "0"; + } + return String.valueOf(PlayerManager.getPlayerList(plot.getTrusted())); + }); + this.createPlaceholder("currentplot_members_added_list", (player, plot) -> { + if (plot.getMembers() == null) { + return "0"; + } + return String.valueOf(PlayerManager.getPlayerList(plot.getMembers())); + }); + this.createPlaceholder("currentplot_members_denied_list", (player, plot) -> { + if (plot.getDenied() == null) { + return "0"; + } + return String.valueOf(PlayerManager.getPlayerList(plot.getDenied())); + }); this.createPlaceholder("has_build_rights", (player, plot) -> plot.isAdded(player.getUUID()) ? "true" : "false"); this.createPlaceholder("currentplot_x", (player, plot) -> Integer.toString(plot.getId().getX()));