From fa007e5674b19134df46a82b7a79fc41ccb72f44 Mon Sep 17 00:00:00 2001 From: Dariasc Date: Sat, 3 Mar 2018 23:48:02 -0300 Subject: [PATCH] Add Role prefix placeholder (#1067) --- src/main/java/com/massivecraft/factions/struct/Role.java | 1 - .../massivecraft/factions/util/ClipPlaceholderAPIManager.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/struct/Role.java b/src/main/java/com/massivecraft/factions/struct/Role.java index f2875a8c..eb6a29e8 100644 --- a/src/main/java/com/massivecraft/factions/struct/Role.java +++ b/src/main/java/com/massivecraft/factions/struct/Role.java @@ -22,7 +22,6 @@ public enum Role implements Permissable { public final int value; public final String nicename; public final TL translation; - private final ConfigurationSection RELATION_CONFIG = P.p.getConfig().getConfigurationSection("fperm-gui.relation"); Role(final int value, final TL translation) { diff --git a/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java b/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java index 2f48f738..c0fd4780 100644 --- a/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java +++ b/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java @@ -45,6 +45,8 @@ public class ClipPlaceholderAPIManager extends EZPlaceholderHook { return String.valueOf(fPlayer.getKills()); case "player_deaths": return String.valueOf(fPlayer.getDeaths()); + case "player_role": + return fPlayer.hasFaction() ? fPlayer.getRole().getPrefix() : ""; // Then Faction stuff case "faction_name": return faction.getTag();