Guest User

Untitled

a guest
Dec 19th, 2012
135
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.woobie.angrypigmen;
  2.  
  3. import org.bukkit.entity.PigZombie;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.entity.CreatureSpawnEvent;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class Main extends JavaPlugin implements Listener {
  10.  
  11. public void onEnable()
  12. {
  13. getServer().getPluginManager().registerEvents(this, this);
  14. }
  15.  
  16. @EventHandler
  17. public void onCreatureSpawn(CreatureSpawnEvent e)
  18. {
  19. if (e.getEntity() instanceof PigZombie)
  20. {
  21. PigZombie pigzombie = (PigZombie) e.getEntity();
  22. pigzombie.setAngry(true);
  23. }
  24. }
  25. }
RAW Paste Data