Guest User

TestCommand.java

a guest
Feb 1st, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. package commands;
  2.  
  3. import guis.TestGui;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandExecutor;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.jetbrains.annotations.NotNull;
  9.  
  10. public class TestCommand implements CommandExecutor {
  11. @Override
  12. public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
  13.  
  14. if (commandSender instanceof Player) {
  15. Player player = (Player) commandSender;
  16. TestGui test = new TestGui();
  17. test.openTestInventory(player);
  18. System.out.println("Gui should have opened.");
  19.  
  20.  
  21. }
  22.  
  23. return false;
  24. }
  25. }
  26.  
Add Comment
Please, Sign In to add comment