UntouchedOdin0

Magic code

Aug 23rd, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. Player p = (Player)e.getWhoClicked();
  2. if ((p.hasPermission("ItemGUI.Open")) && (e.getClickedInventory().getTitle().equals(ChatColor.BLUE + "Staff GUI")) && (e.getCurrentItem() != null) && (e.getCurrentItem().getItemMeta().hasDisplayName()))
  3. {
  4. if (e.getCurrentItem().getItemMeta().getDisplayName().equals(ChatColor.BOLD + "Clear Chat"))
  5. {
  6. for (int i = 0; i < 100; i++) {
  7. Bukkit.broadcastMessage(" ");
  8. }
  9. Bukkit.broadcastMessage(ChatColor.YELLOW + "Chat has been cleared by " + ChatColor.RED + ChatColor.BOLD + p.getName() + " " + ChatColor.YELLOW + ChatColor.BOLD + "!");
  10. }
  11. else if ((e.getCurrentItem().getItemMeta().getDisplayName().equals("" + ChatColor.RED + ChatColor.BOLD + "Mute Chat")) || (e.getCurrentItem().getItemMeta().getDisplayName().equals("" + ChatColor.RED + ChatColor.BOLD + "Unmute Chat")))
  12. {
  13. if (this.mute)
  14. {
  15. this.mute = false;
  16. p.sendMessage("" + ChatColor.RED + ChatColor.BOLD + "Chat is now" + ChatColor.GREEN + ChatColor.BOLD + " unmuted!");
  17. }
  18. else
  19. {
  20. this.mute = true;
  21. p.sendMessage("" + ChatColor.RED + ChatColor.BOLD + "Chat is muted!");
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment