Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings({ "unlikely-arg-type" })
- @EventHandler
- public void AGUI(PlayerInteractEvent e) {
- Player p = e.getPlayer();
- agui = Bukkit.createInventory(p, 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")) {
- final ItemStack AguiI = p.getInventory().getItemInMainHand();
- if(AguiI != null && AguiI.equals(Material.END_CRYSTAL)) {
- if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
- p.openInventory(agui);
- }else {
- if(!p.hasPermission("hhf.agui.open")) {
- p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "HHF" + ChatColor.RED + " - I'm sorry, but it seems you do not have permission to use this Item. Please contact the server admin to check if this is an error!");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement