use of com.github.sirblobman.api.nms.MultiVersionHandler in project CombatLogX by SirBlobman.
the class StoredInventory method saveItemStack.
private static void saveItemStack(CitizensExpansion expansion, ConfigurationSection section, String path, ItemStack item) {
if (item == null) {
section.set(path, null);
return;
}
ICombatLogX plugin = expansion.getPlugin();
MultiVersionHandler multiVersionHandler = plugin.getMultiVersionHandler();
ItemHandler itemHandler = multiVersionHandler.getItemHandler();
String base64 = itemHandler.toBase64String(item);
section.set(path, base64);
}
use of com.github.sirblobman.api.nms.MultiVersionHandler in project CombatLogX by SirBlobman.
the class PlaceholderHelper method getEnemyName.
public static String getEnemyName(ICombatLogX plugin, Player player) {
ICombatManager combatManager = plugin.getCombatManager();
LivingEntity enemy = combatManager.getEnemy(player);
if (enemy == null)
return getUnknownEnemy(plugin, player);
MultiVersionHandler multiVersionHandler = plugin.getMultiVersionHandler();
EntityHandler entityHandler = multiVersionHandler.getEntityHandler();
return entityHandler.getName(enemy);
}
use of com.github.sirblobman.api.nms.MultiVersionHandler in project CombatLogX by SirBlobman.
the class ActionBarUpdater method getPlayerHandler.
private PlayerHandler getPlayerHandler() {
ICombatLogX combatLogX = getCombatLogX();
MultiVersionHandler multiVersionHandler = combatLogX.getMultiVersionHandler();
return multiVersionHandler.getPlayerHandler();
}
use of com.github.sirblobman.api.nms.MultiVersionHandler in project CombatLogX by SirBlobman.
the class ListenerDamage method getName.
private String getName(Entity entity) {
ICombatLogX plugin = getCombatLogX();
if (entity == null) {
CommandSender console = Bukkit.getConsoleSender();
LanguageManager languageManager = plugin.getLanguageManager();
return languageManager.getMessage(console, "placeholder.unknown-enemy", null, true);
}
MultiVersionHandler multiVersionHandler = plugin.getMultiVersionHandler();
EntityHandler entityHandler = multiVersionHandler.getEntityHandler();
return entityHandler.getName(entity);
}
use of com.github.sirblobman.api.nms.MultiVersionHandler in project CombatLogX by SirBlobman.
the class CombatManager method getEntityName.
private String getEntityName(Player player, LivingEntity entity) {
if (entity == null) {
LanguageManager languageManager = this.plugin.getLanguageManager();
return languageManager.getMessage(player, "placeholder.unknown-enemy", null, true);
}
MultiVersionHandler multiVersionHandler = this.plugin.getMultiVersionHandler();
EntityHandler entityHandler = multiVersionHandler.getEntityHandler();
return entityHandler.getName(entity);
}
Aggregations