test
This commit is contained in:
parent
991e00f0ae
commit
e36847610b
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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 (sender instanceof Player) {
|
||||
if (!cmd.getName().equalsIgnoreCase("test")) return true;
|
||||
if (sender instanceof Player) {
|
||||
|
||||
|
||||
KingdomPlayer kdp = UltimateKingdom.Players().getPlayer((Player) sender);
|
||||
|
||||
if (kdp == null) return true;
|
||||
|
||||
|
||||
sender.sendMessage(kdp.getKingdom().getName());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user