Universal Command - React to every command with a specific argument

    • Type: New Feature
    • Resolution: Invalid
    • Priority: Minor
    • None
    • Affects Version/s: None
    • This server is running CraftBukkit version git-Spigot-800b93f-8160e29 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
    • Yes

      Hi!

      Wouldn't it be cool to have, or is there something like an universal command:

      You'd register it like ... this for example "this.setUniversalCommand(new UniversalCommandClass());"

      Could be used if you want an argument on any of your plugins commands to trigger lets say the message "Hello".

      Example

      > /command specificArg

      Hello

      > /othercommand specificArg

      Hello

      This can be done manually.. I know.. but its just nice to have things dynamically isn't it?

       

      Have a good day!

          [SPIGOT-5785] Universal Command - React to every command with a specific argument

          Magnus Brandt added a comment - - edited

          No I don't mean the onCommand method. For onCommand you have to assign a command to it for it to work. But I'm asking for a method, that, if ANY command is called, executes. With such a thing, if you would want to have partially the same functions on all commands, you wouldn't need to put this function in every command class. A little change but I personally would like it. Thanks

          Magnus Brandt added a comment - - edited No I don't mean the onCommand method. For onCommand you have to assign a command to it for it to work. But I'm asking for a method, that, if ANY command is called, executes. With such a thing, if you would want to have partially the same functions on all commands, you wouldn't need to put this function in every command class. A little change but I personally would like it. Thanks

          md_5 added a comment -

          The onCommand method in Plugin does this by default?

          md_5 added a comment - The onCommand method in Plugin does this by default?

            Assignee:
            Unassigned
            Reporter:
            Magnus Brandt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: