Search in sources :

Example 6 with EntityHandler

use of com.github.sirblobman.api.nms.EntityHandler 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);
}
Also used : MultiVersionHandler(com.github.sirblobman.api.nms.MultiVersionHandler) LanguageManager(com.github.sirblobman.api.language.LanguageManager) EntityHandler(com.github.sirblobman.api.nms.EntityHandler)

Example 7 with EntityHandler

use of com.github.sirblobman.api.nms.EntityHandler in project CombatLogX by SirBlobman.

the class Reward method getEntityName.

private String getEntityName(LivingEntity entity) {
    ICombatLogX plugin = this.expansion.getPlugin();
    MultiVersionHandler multiVersionHandler = plugin.getMultiVersionHandler();
    EntityHandler entityHandler = multiVersionHandler.getEntityHandler();
    return entityHandler.getName(entity);
}
Also used : MultiVersionHandler(com.github.sirblobman.api.nms.MultiVersionHandler) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) EntityHandler(com.github.sirblobman.api.nms.EntityHandler)

Aggregations

EntityHandler (com.github.sirblobman.api.nms.EntityHandler)7 MultiVersionHandler (com.github.sirblobman.api.nms.MultiVersionHandler)7 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)5 LanguageManager (com.github.sirblobman.api.language.LanguageManager)3 ICombatManager (com.github.sirblobman.combatlogx.api.manager.ICombatManager)2 CommandSender (org.bukkit.command.CommandSender)2 LivingEntity (org.bukkit.entity.LivingEntity)2 CitizensExpansion (combatlogx.expansion.compatibility.citizens.CitizensExpansion)1 CombatNPC (combatlogx.expansion.compatibility.citizens.object.CombatNPC)1 UUID (java.util.UUID)1 NPC (net.citizensnpcs.api.npc.NPC)1 NPCRegistry (net.citizensnpcs.api.npc.NPCRegistry)1 Location (org.bukkit.Location)1 OfflinePlayer (org.bukkit.OfflinePlayer)1 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)1 Entity (org.bukkit.entity.Entity)1 EntityType (org.bukkit.entity.EntityType)1 Monster (org.bukkit.entity.Monster)1 Player (org.bukkit.entity.Player)1 SentinelTrait (org.mcmonkey.sentinel.SentinelTrait)1