How to determine the origin of a command?

Discussion in 'Bukkit Help' started by LHammonds, Jul 8, 2014.

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

    LHammonds

    As an owner of a server, is there a way to determine the origin of a command without disabling plugins one-by-one or going through each plugins documentation with a fine-tooth comb?

    Commands can come from Minecraft, Bukkit or Plugins and they also have the raw command and aliases for those commands. Would be awesome if there was some kind of debug option that shows where a command comes from and whether or not its an alias for some other command.

    Thanks,

    LHammonds
     
  2. Offline

    LHammonds

    I'm guessing this is not possible?
     
  3. Offline

    LHammonds

    Shameless bump for visibility
     
  4. Offline

    rektok

    LHammonds There's one way that may work, I'm just playing with the idea in my head.
    Here's an example:
    I want to find out where /setspawn comes from.
    Try typing in /help setspawn
    In the description of the command, it may show where the command comes from.
    Just an idea, it may work with some commands, and with others it may not. Depends.
     
  5. Offline

    Necrodoom

  6. Offline

    LHammonds

  7. Offline

    Necrodoom

    LHammonds Oh, sorry, it has gotten somehow to my mind that you are a plugin developer.
    This seems to be somewhat possible with normally registered commands in plugins, but plugins such as worldedit may not be properly detectable and will actually need looking though documentation.
     
  8. Offline

    Shevchik

    Actually you can detect almost any command that was manually inserted in command map by comparing command class and plugin classloader. (I'm using that trick to unload manually registered commands from command map to unload/reload plugins properly.)
     
  9. Offline

    Necrodoom

    Shevchik what about plugins using preprocess?
     
  10. Offline

    Shevchik

    No idea. Unregister listeners one by one and execute command until the unknown command message is received?(That may have a side effects though).
     
Thread Status:
Not open for further replies.

Share This Page