package me.map.example; import me.map.ultimatekingdom.api.UltimateKingdom; import me.map.ultimatekingdom.api.objects.KingdomPlayer; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class TestCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args) { if (!cmd.getName().equalsIgnoreCase("test")) return true; KingdomPlayer kdp = UltimateKingdom.Players().getPlayer((Player) sender); sender.sendMessage(kdp.getKingdom().getName()); // if (sender instanceof Player) { // Player player = (Player) sender; // Here we need to give items to our player // } return true; } }