Advertisement
nrubin29

MenuInv.java

Jul 9th, 2013
16,284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. package me.pogostick29.menuinv;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.block.Action;
  7. import org.bukkit.event.player.PlayerInteractEvent;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class MenuInv extends JavaPlugin implements Listener {
  11.  
  12.     private Menu menu;
  13.    
  14.     public void onEnable() {
  15.         menu = new Menu(this);
  16.         Bukkit.getServer().getPluginManager().registerEvents(this, this);
  17.     }
  18.    
  19.     @EventHandler
  20.     public void onPlayerInteract(PlayerInteractEvent e) {
  21.         if (!(e.getAction() == Action.RIGHT_CLICK_BLOCK)) return;
  22.         menu.show(e.getPlayer());
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement