Guest User

The command class

a guest
Nov 6th, 2022
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package com.razorblade.ultimatumgems;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandExecutor;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import com.razorblade.ultimatumgems.Recipes;
  8. import org.bukkit.inventory.PlayerInventory;
  9.  
  10. public class givegems implements CommandExecutor {
  11. @Override
  12. public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
  13. if (sender instanceof Player) {
  14. Player player = (Player) sender;
  15. PlayerInventory playerInv = player.getInventory();
  16.  
  17. playerInv.addItem(Recipes);
  18.  
  19. }
  20.  
  21.  
  22. return false;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment