1. Hi

    How does Oxide behave when dealing with two plugins that each have a hook handler for the same chat command. For example:
    Code:
    class Foo : RustPlugin {
       [ChatCommand("foobar")]
       void foobarCommand() { ... }
    }class Bar : RustPlugin {
       [ChatCommand("foobar")]
       void foobarCommand() { ... }
    }
    
    Will both run? Is there a way to determine the order in which they will run?
    Say if Foo went first, is there a way for Foo to tell Oxide to not let Bar run?

    Thanks
     
  2. Wulf

    Wulf Community Admin

    Whatever plugin loads last will replace the command registered by the other.
     
  3. Okay thanks.
    So is there a way to get a list of all commands currently registered?
     
  4. Wulf

    Wulf Community Admin

    Not that I am aware of from a plugin without using reflection.
     
  5. The most straightforward way would be to just have all other plugins loaded first, then load yours on and if you see a warning in the console saying a command was overwritten then you have your answer. It's not perfect but it works!

    For my own plugins that I know could interfere with others, I tend to add a prefix before the command. It's not the greatest solution because it makes the users type more but at least it avoids these conflict issues.

    Ex. /dogmanhelp instead of /help