Placeholderapi placeholder parsing for Titles when moving between land

This commit is contained in:
ProSavage 2018-07-25 15:10:37 -05:00
parent cb6f0a8104
commit f3d6669310

View File

@ -20,6 +20,7 @@ import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction; import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.persist.MemoryFPlayer; import com.massivecraft.factions.zcore.persist.MemoryFPlayer;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import com.massivecraft.factions.zcore.util.TagUtil;
import com.massivecraft.factions.zcore.util.TextUtil; import com.massivecraft.factions.zcore.util.TextUtil;
import net.coreprotect.CoreProtect; import net.coreprotect.CoreProtect;
import net.coreprotect.CoreProtectAPI; import net.coreprotect.CoreProtectAPI;
@ -521,6 +522,7 @@ public class FactionsPlayerListener implements Listener {
} }
public String parseAllPlaceholders(String string, Faction faction, Player player) { public String parseAllPlaceholders(String string, Faction faction, Player player) {
string = TagUtil.parsePlaceholders(player, string);
string = string.replace("{Faction}", faction.getTag()) string = string.replace("{Faction}", faction.getTag())
.replace("{online}", faction.getOnlinePlayers().size() + "") .replace("{online}", faction.getOnlinePlayers().size() + "")
.replace("{offline}", faction.getFPlayers().size() - faction.getOnlinePlayers().size() + "") .replace("{offline}", faction.getFPlayers().size() - faction.getOnlinePlayers().size() + "")