Guest User

Untitled

a guest
May 24th, 2015
242
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class main extends JavaPlugin implements Listener
  2. {
  3. public static Bukkit plugin;
  4. public void onEnable()
  5. {
  6. Bukkit.getServer().getPluginManager().registerEvents(this, this);
  7.  
  8. Bukkit.getConsoleSender().sendMessage(ChatColor.DARK_RED + "Enabled!");
  9. }
  10.  
  11. public void onDisable()
  12. {
  13. getLogger();
  14. Bukkit.getConsoleSender().sendMessage(ChatColor.DARK_RED + "Disabled!");
  15. }
  16.  
  17. @EventHandler
  18. public void onPlayerMove(PlayerMoveEvent event)
  19. {
  20. Player p = event.getPlayer();
  21. {
  22. if (event.getPlayer().getLocation().getWorld().getName().endsWith("nether"))
  23. {
  24. if (event.getPlayer().getLocation().getY() > 127)
  25. {
  26. World nether = Bukkit.getWorld("world_nether");
  27. p.teleport(nether.getSpawnLocation());
  28. }
  29. }
  30. }
  31. }
  32. }
RAW Paste Data