Tests the given CommandSender to see if they can perform this command. If they do not have permission, they will be informed that they cannot do this. @param target User to test @return true if they can use it, otherwise false
(CommandSender target)
| 82 | * @return true if they can use it, otherwise false |
| 83 | */ |
| 84 | public boolean testPermission(CommandSender target) { |
| 85 | if ((permission == null) || (permission.length() == 0) || (target.hasPermission(permission))) { |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | target.sendMessage(ChatColor.RED + "Bukkit sad. Bukkit want you to access command, but Bukkit cannot let you. Bukkit will leak tears :'("); |
| 90 | return false; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Returns the current lable for this command |