Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. public class Permission implements CommandExecutor {
  2.     @SuppressWarnings("unused")
  3.     private final Main plugin;
  4.    
  5.     public Permission(Main plugin){
  6.         this.plugin = plugin;
  7.     }
  8.     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  9.         if(cmd.getName().equalsIgnoreCase("pex")){
  10.             if(!sender.hasPermission("permission.pex") || !sender.isOp()){
  11.                 sender.sendMessage("Ciao");
  12.             }
  13.             else{
  14.                 sender.sendMessage("Non ciao");
  15.             }
  16.         }
  17.         return true;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement