@Override public void onSpawn() { npc.getInventory() .setItemInHand(new ItemStack(weapons[this.random.nextInt(weapons.length)], 1)); this.health = Settings.getInt("EvilHealth"); super.onSpawn(); }
@Override public void doTick() { if (isTame) return; EntityHuman closest = getClosestPlayer(this.range); if (!hasTarget() && closest != null) { if (!PermissionManager.hasPermission( (Player) closest.getBukkitEntity(), "citizens.evils.immune")) { targetClosestPlayer(true, this.range); } } super.doTick(); }