Guest User

Code

a guest
Sep 14th, 2015
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.YouTubeDanTDM.menuinv;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.block.Action;
  6. import org.bukkit.event.player.PlayerInteractEvent;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class Menu extends JavaPlugin {
  10.  
  11. private Menu menu;
  12.  
  13. public void onEnable() {
  14. menu = new Menu (this);
  15. Bukkit.getServer().getPluginManager().registerEvent(this, this);
  16. }
  17.  
  18. @EventHandler
  19. public void onPlayerInteract(PlayerInteractEvent e) {
  20. if (i(e.getAction() == Action.RIGHT_CLICK_BLOCK)) return;
  21. menu.show(e.getPlayer());
  22. }
  23. }
RAW Paste Data