Advertisement
8rrico

Untitled

Oct 19th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. // Change cow names to "Sacrificial Cow"
  2. @EventHandler
  3. public void onMobSpawn(EntitySpawnEvent event)
  4. {
  5.  
  6. if (event.getLocation().getWorld().equals("world_games"))
  7. {
  8.  
  9. LivingEntity entity = (LivingEntity) event.getEntity();
  10.  
  11. if (entity instanceof Cow)
  12. {
  13.  
  14. entity.setCustomName("Sacrificial Cow");
  15. entity.setCustomNameVisible(true);
  16.  
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement