This commit is contained in:
Webadmin 2021-07-07 16:27:19 +02:00
parent 991e00f0ae
commit e36847610b
2 changed files with 8 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public class Example extends JavaPlugin {
@Override
public void onEnable() {
this.main = this;
Bukkit.getServer().getPluginManager().registerEvents(new Luisteren() ,this);
//Bukkit.getServer().getPluginManager().registerEvents(new Luisteren() ,this);
this.getCommand("test").setExecutor(new TestCommand());
}

View File

@ -10,10 +10,15 @@ 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;
if (sender instanceof Player) {
if (!cmd.getName().equalsIgnoreCase("test")) return true;
KingdomPlayer kdp = UltimateKingdom.Players().getPlayer((Player) sender);
if (kdp == null) return true;
sender.sendMessage(kdp.getKingdom().getName());
}