Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void AGUI(PlayerInteractEvent e) {
- Player p = e.getPlayer();
- agui = Bukkit.createInventory(null, 54, ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "" + ChatColor.ITALIC + "Admin" +
- ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "" + ChatColor.ITALIC + "GUI");
- agui.setItem(45, ReloadButton);
- if(p.hasPermission("hhf.agui.open")) {
- if(p.getInventory().getItemInMainHand().getType() == Material.END_CRYSTAL) {
- if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
- p.openInventory(agui);
- }
- }
- }
- }
- @EventHandler
- public void AGUI2(InventoryClickEvent e) {
- Player p = (Player) e.getWhoClicked();
- if(e.getInventory().getName().equals(agui.getName())) {
- e.setCancelled(true);
- }
- if(e.getCurrentItem() == null) {
- return;
- }
- if(e.getSlot() == 45) {
- p.performCommand("plugins");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement