Allow the use of placeholders in scoreboards
This commit is contained in:
parent
fb0c77efc0
commit
af9fc526d7
@ -134,6 +134,10 @@ public class P extends MPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPlaceholderAPIHooked() {
|
||||
return this.placeholderAPIManager != null;
|
||||
}
|
||||
|
||||
private boolean setupPermissions() {
|
||||
try {
|
||||
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -19,6 +20,10 @@ public abstract class FSidebarProvider {
|
||||
}
|
||||
|
||||
public String replaceTags(Faction faction, FPlayer fPlayer, String s) {
|
||||
// Run through Placeholder API first
|
||||
if (P.p.isPlaceholderAPIHooked() && fPlayer.isOnline()) {
|
||||
s = PlaceholderAPI.setPlaceholders(fPlayer.getPlayer(), s);
|
||||
}
|
||||
return qualityAssure(TagUtil.parsePlain(faction, fPlayer, s));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user