Removed %player%, use player expansion instead

This commit is contained in:
Indyuce 2022-08-18 14:04:10 +02:00
parent 174898ba72
commit a299325b39

View File

@ -1,17 +1,16 @@
package net.Indyuce.mmocore.comp.placeholder;
import io.lumine.mythic.lib.MythicLib;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.OfflinePlayer;
import me.clip.placeholderapi.PlaceholderAPI;
import io.lumine.mythic.lib.MythicLib;
public class PlaceholderAPIParser implements PlaceholderParser {
public PlaceholderAPIParser() {
new RPGPlaceholders().register();
}
public PlaceholderAPIParser() {
new RPGPlaceholders().register();
}
@Override
public String parse(OfflinePlayer player, String string) {
return MythicLib.plugin.parseColors(PlaceholderAPI.setPlaceholders(player, string.replace("%player%", player.getName())));
}
@Override
public String parse(OfflinePlayer player, String string) {
return MythicLib.plugin.parseColors(PlaceholderAPI.setPlaceholders(player, string));
}
}