Advertisement
Rukes

Untitled

Dec 30th, 2018
156
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None
  1.     @EventHandler(ignoreCancelled = true)
  2.     public void spawnTest(CreatureSpawnEvent e){
  3.         CreatureSpawnEvent.SpawnReason spawnReason = e.getSpawnReason();
  4.         if(spawnReason.equals(CreatureSpawnEvent.SpawnReason.NATURAL)){
  5.             e.getEntity().getWorld().spawnEntity(e.getEntity().getLocation(), e.getEntity().getType());
  6.         }
  7.     }
Advertisement
RAW Paste Data Copied
Advertisement