Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class TestCommand implements CommandExecutor {
  2. private Main plugin;
  3.  
  4. public TestCommand(Main plugin) {
  5. this.plugin = plugin;
  6.  
  7. plugin.getCommand("command").setExecutor(this);
  8. }
  9. @Override
  10. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  11. if (!(sender instanceof Player)) {
  12. //send console a message with sender.sendMessange(message);
  13. return true;
  14.  
  15. }
  16. Player p = (Player) sender;
  17.  
  18. if(p.hasPermission("permission.here")) {
  19. p.openInventory(TestUI.GUI(p));
  20. }
  21. return false;
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement