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

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

  1. Offline

    LRFLEW

    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.

    Features:
    • Returns custom "Unknown Command" from a txt file whenever a command doesn't exist.
    Download (to all my projects and source):
    http://lrflew.ismywebsite.com/bukkit.html
    Mirror:
    http://dl.dropbox.com/u/22202470/UC.jar
    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.

    Changelog:
    • 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

    MarchewMaster

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

    MatCat

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

    Gimmic

    Excellent Idea.

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

    blacky5

    Hey LRFLEW, you are awesom :D
     
  6. Offline

    LRFLEW

    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

    LRFLEW

    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

    Veterok_DV

    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

    LRFLEW

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

    capsar

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

    LRFLEW

    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

    Veterok_DV

    Plugins
    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

    Bloq

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

    EvilSeph Retired Staff

  16. Offline

    LRFLEW

  17. Offline

    EvilSeph Retired Staff

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

    LRFLEW

    Fixed?
     
  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

    LRFLEW

    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

    LRFLEW

    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

    Juze

    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

    LRFLEW

    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

    LRFLEW

    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

    ScottSpittle

    I get the following error

     
  27. Offline

    LRFLEW

    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

    ScottSpittle

    nah im using 150.. nevermind.
     
  29. Offline

    Johannes

    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

    Tuna

    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