[MECH] Unknown Command v1.7 - Returns "Unknown Command" messages [818]

Discussion in 'Inactive/Unsupported Plugins' started by LRFLEW, Jan 23, 2011.

  1. Offline


    Unknown Command - Returns "Unknown Command" messages

    As of a recent build, CraftBukkit had an "Unknown Command" message (although there are two of them). As of UC 1.2, this plugin now instead allows for custom UC messages to be sent to the player. All you have to do is run the plugin once, and edit the file at /plugins/UC/Messages.txt. You can have more than one message (separated by lines) and it will randomly choose which one to say to the player. Here is an example of that.

    • Returns custom "Unknown Command" from a txt file whenever a command doesn't exist.
    Download (to all my projects and source):
    Source: http://dl.dropbox.com/u/22202470/UC.zip

    *Licence Notice*
    There has been some confusion about what kinds of permissions I'm giving for this, particularly with @544nick101 trying to make a branch. From here on out, Unknown Command is licensed under the Creative Commons - Attribution license with attribution being linking back to this forum thread and mentioning my username LRFLEW.

    • 1.7: Removed redundant source code hidden in the jar file
    • 1.6: "\g" now returns the command used and fixed bug with commands with '/' in them (special thanks to Cutch)
    • 1.5: Set universally to getDataFolder() to fix any errors
    • 1.4: added ebean dependency
    • 1.3: Now Messages.txt allows colors with "\[0-F]" ("\\" makes a backslash). This should help unicode errors. Also includes small coding changes.
    • 1.2: Now has another file at "plugins/UC/Messages.txt" to put custom messages. To prevent the default message from appearing, I have to cancel missing commands, so any unruly commands not in "plugins/UC/Commands.txt" may not run at all and the console will no longer say "LRFLEW issued server command: apple". If requested, I'll make it return it again.
    • 1.1: As per request, the file with default commands has been moved from "UC.txt" to "plugins/UC/Commands.txt". You happy now?
    • 1.0: Added a txt file that will install itself to the server's folder containing the default commands of CraftBukkit. You can add any commands not properly working with this in that file and reload the file even while running the server with "/uc reload" (no "/" if ran from the console; OPs are the only players that can run this command)
    • 0.6: Added missing CraftBukkit commands and created a static TreeSet for faster command checking.
    • 0.5: Added an Enum to check if the command is a command built into CraftBukkit itself.
    • 0.4: uses onPlayerCommandPreproccess() and server.getPluginCommand() to find unknown commands.
    • 0.3: now uses short call (0.2 works on latest build with warning, but 0.3 won't work with old builds)
    • 0.2.1: ACTUALLY changed the package, both the actual one and the one in plugin.yml :p
    • 0.2: changed package name to comply with EvilSeth's request
    • 0.1: First Itteration (note: some plugins don't cancel their events, making this plugin say "Unknown Command" to actuall commands. It's not my fault)
  2. Offline


    Weee! Simple but necessary [gold] [gold] [gold] [diamond]
    --- merged: Jan 24, 2011 11:09 PM ---
    lol says on every command "unknow command"...
  3. Offline


    Noticed with the SpawnMob plugin, that it says unknown command for /spawnmob even though /spawnmob works just fine. Build 137.
  4. Offline


    Excellent Idea.

    I really think this should be a configurable option in bukkit core. Maybe a boolean in server.properties.
  5. Offline


    Hey LRFLEW, you are awesom :D
  6. Offline


    It looks to see if a command was canceled with event.setCanceled(true); but since a command isn't something that needs to be canceled, a ton of developers forget to cancel it. That makes this plugin annoying.
  7. Offline

    Jacob Litewski

    I thought you needed to event.setCanceled(true) a slash command for it to work? Or is that just a good coding practice to do?
  8. Offline


    You should, but a lot of people don't :p. They have implemented a new command system, though, so a v2.0 will be soon to come that will hopefully have a better accuracy rating.
  9. Offline


    I have a server, any command restores point HP, it is very strange, and the players use it. How do I fix this?
  10. Offline


    "point HP"? I don't know what you mean. What plugins are you using?
  11. Offline


    wtf do i heed to do with the .zip file?
    i want to use it.
  12. Offline


    unzip it, and it will contain the jar file you put into the plugins folder (and yes, I realize I zipped a file that was already zipped :p)
  13. Offline


    Let me explain: Suppose I have a game of 10 "hearts"there is only 5. I enter the chat command: /a (or any other), "Hearts" immediately restored to 9 pieces.
  14. Offline


    Wonderful. It confuses me whether I get lag or I made a typo :D
  15. Offline


  16. Offline


  17. Offline


    The information in the guidelines should be displayed within the post to make keeping track of plugin information easier for server admins.
  18. Offline


  19. definitly gonna watch this to see if it will ever work with other plugins. Right now, 95% of commands i use dont register with this plugin as a command ;). For now, this is a no-go, but will keep an eye on it :)
  20. Offline


    This plugin is getting prevalence as we speak, as any command registered to work with onCommand() won't call onPlayerCommand() which is where this plugin lies. Any plugin that uses onCommand() and any plugin that cancels their onPlayerCommand() will all work.
  21. this is good to know :D Will definitely help users who are new to all the different command types :)
  22. Offline


    It makes me warm inside to know that enough people downloaded this plugin in the past couple of weeks to not notice that it didn't run at all during that time.

    (and in case it didn't come across, that was sarcasm :p)
  23. Offline


    Err, could you please cleanup your original post?

    [FIX] Unknown Command v0.2

    Version: v0.2
    Changelog: v0.1
    0.3: now uses short call (0.2 works on latest build with warning, but 0.3 won't work with old builds)

    That can be very confusing.
  24. Offline


    lol :p. I tried to keep it to guidelines, but I keep forgetting to update info during updates as I have enough trouble getting the links on the site right :p.
  25. Offline


    Yay! I wasn't happy about the removal of onPlayerCommand() originally, but it has given this plugin %100 accuracy. It works well now :).
  26. Offline


    I get the following error

  27. Offline


    Make sure you're using the latest build. If you are, tell me, but it looks like it isn't finding the command added in build #458 (according to the change log).
  28. Offline


    nah im using 150.. nevermind.
  29. Offline


    I'm using TPack, and when I use some of its commands like /cuboid or /cfill it triggers 'unknowncommand' even-though they work, and I can use them in game. Is the developer somehow not registering those commands correctly?
  30. Offline


    Hey Johannes,

    The problem is simply that TPack isn't integrated with UnknownCommand in anyway, and I was unaware of its existence until you posted this :p . Tpack registers commands in its own unique way, so it will not with UnknownCommands currently.

Share This Page