Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void spawnEntity(Location loc,EntityType type,String customName, double hp, int
- Entity entity = loc.getWorld().spawnEntity(loc, type);
- entity.setCustomName(customName);
- if (!(entity instanceof LivingEntity)) return;
- LivingEntity livingEntity = (LivingEntity) entity;
- livingEntity.setHealth(hp);
- }
Advertisement
Add Comment
Please, Sign In to add comment