How do you stop another command from running?

Discussion in 'Plugin Development' started by MrHatz2, Feb 1, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MrHatz2

    lets say i put /kill how do i stop it?
     
  2. Offline

    clienthax

    @EventHandler
    public void onCommandPreprocess(PlayerChatEvent event) {

    Player sender = event.getPlayer();

    if (event.getMessage().equalsIgnoreCase(""/heal")) {

    event.setCancelled(true);
    sender.sendMessage(ChatColor.BLUE + "You have been healed!");

    }
    }
     
  3. Offline

    MrHatz2

Thread Status:
Not open for further replies.

Share This Page