Unknown command.

Discussion in 'Archived: Plugin Requests' started by iPhysX, May 15, 2011.

  1. Offline

    iPhysX

    Can someone make a plugin so it doesnt say this when i accidentally type /beanz
    :p
     
  2. Offline

    lycano

    Are you serious? ^^
     
  3. Offline

    Juze

    This doesn't exist in CraftBukkit, doesn't it? There's a plugin called Unknown Command that gives you an unknown command.
     
    DeathCradle likes this.
  4. Offline

    Jayjay110

    MrBluebear3 and Flobi like this.
  5. Offline

    lycano

    Juze: Well in this case .. you just want to have a plugin that tells you "This command doesn't exists" ? Well .. this can be done through player.performCommand("yourcommand") and its return value is boolean. If the command does not exists or its syntax was wrong it will output your defined message.

    You just have to check against "if (!(sender instanceof Player)) { sender.sendMessage("This feature is not vailable in CONSOLE")); }" to prevent an Exception thrown when called from ConsoleCommandSender ;) This is done in onCommand. Just register a bogus command like /unknowncommand and you are fine =)

    Sry Juze for tagging you. I totally missed the context.
     
  6. Offline

    Jallenator

    Can you make one that does the same for "/pointlesscommand" please, thanks!
     

Share This Page