Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player p = (Player)e.getWhoClicked();
- if ((p.hasPermission("ItemGUI.Open")) && (e.getClickedInventory().getTitle().equals(ChatColor.BLUE + "Staff GUI")) && (e.getCurrentItem() != null) && (e.getCurrentItem().getItemMeta().hasDisplayName()))
- {
- if (e.getCurrentItem().getItemMeta().getDisplayName().equals(ChatColor.BOLD + "Clear Chat"))
- {
- for (int i = 0; i < 100; i++) {
- Bukkit.broadcastMessage(" ");
- }
- Bukkit.broadcastMessage(ChatColor.YELLOW + "Chat has been cleared by " + ChatColor.RED + ChatColor.BOLD + p.getName() + " " + ChatColor.YELLOW + ChatColor.BOLD + "!");
- }
- else if ((e.getCurrentItem().getItemMeta().getDisplayName().equals("" + ChatColor.RED + ChatColor.BOLD + "Mute Chat")) || (e.getCurrentItem().getItemMeta().getDisplayName().equals("" + ChatColor.RED + ChatColor.BOLD + "Unmute Chat")))
- {
- if (this.mute)
- {
- this.mute = false;
- p.sendMessage("" + ChatColor.RED + ChatColor.BOLD + "Chat is now" + ChatColor.GREEN + ChatColor.BOLD + " unmuted!");
- }
- else
- {
- this.mute = true;
- p.sendMessage("" + ChatColor.RED + ChatColor.BOLD + "Chat is muted!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment