Added Placeholders to papi

This commit is contained in:
Driftay 2020-01-17 21:45:18 -05:00
parent 9de773ddae
commit a54a7aa4fb

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.util;
import com.massivecraft.factions.*; import com.massivecraft.factions.*;
import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.struct.Relation; import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.tag.FactionTag;
import com.massivecraft.factions.tag.Tag; import com.massivecraft.factions.tag.Tag;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import me.clip.placeholderapi.expansion.PlaceholderExpansion; import me.clip.placeholderapi.expansion.PlaceholderExpansion;
@ -133,6 +134,8 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R
return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : ""; return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : "";
case "faction_tntbank_balance": case "faction_tntbank_balance":
return String.valueOf(faction.getTnt()); return String.valueOf(faction.getTnt());
case "faction_tnt_max_balance":
return FactionTag.TNT_MAX.replace(FactionTag.TNT_MAX.getTag(), faction);
case "faction_points": case "faction_points":
return fPlayer.hasFaction() ? String.valueOf(faction.getPoints()) : "0"; return fPlayer.hasFaction() ? String.valueOf(faction.getPoints()) : "0";
case "faction_powerboost": case "faction_powerboost":
@ -172,6 +175,8 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R
return String.valueOf(faction.getFPlayers().size() - faction.getOnlinePlayers().size()); return String.valueOf(faction.getFPlayers().size() - faction.getOnlinePlayers().size());
case "faction_size": case "faction_size":
return String.valueOf(faction.getFPlayers().size()); return String.valueOf(faction.getFPlayers().size());
case "faction_announcement":
return String.valueOf(faction.getAnnouncements());
case "faction_kills": case "faction_kills":
return String.valueOf(faction.getKills()); return String.valueOf(faction.getKills());
case "faction_deaths": case "faction_deaths":