Resource (ACF - BETA) Annotation Command Framework

Discussion in 'Spigot Plugin Development' started by Aikar, Apr 19, 2017.

  1. Thing is that he banned me... idk why...
    Whatever, I've fixed it by adding String[] args to my execution method so acf thinks its not only 1 argument.
     
    • Funny Funny x 1
  2. MiniDigger

    Supporter

    Great news guys, @ItsMeGlare (and others) pushed me hard enough to go finish the brigadier integration!
    With a little bit help from the guys over at paper (well, aikar did the changes), we now have an easy way to register stuff into brigadier, making my life a whole lot easier.

    Basically, you know get fancy client side validation suggestions:
    https://streamable.com/d4ws4l

    This also implements perm checking for sub commands, so clients dont see subcommands in tab completion they dont have access too
    https://i.imgur.com/Jbi58QL.mp4

    all you need to do is adding these two lines of code to your command registration code (onEnable)
    Code (Java):
     // 10: (optionally enable brigadier integration, paper only)
    commandManager.enableUnstableAPI("brigadier");
    new PaperBrigadierManager(this, commandManager);
    (if you want to support spigot with your plugin, you can only call this if the server uses paper)

    once the following PRs are merged (hopefully later today), you can all try it out. any feedback is appreciated, especially if you can run this on a plugin with a heap ton of nested subcommands with permissions and tons of arguments

    PR: https://github.com/aikar/commands/pull/153
    Paper PR: https://github.com/PaperMC/Paper/pull/3193
     
    • Like Like x 2
  3. we will make the api safely enable with just the unstable line, wont need the new Paper yourself, and it only engage on paper if its supported
     
    • Like Like x 1
  4. About a year ago I switched to ACF. One of the best decisions I've ever made. I've rewritten my commands under ACF probably 4 times now but here are the results of the initial change.

    [​IMG]
     
    • Like Like x 1
    • Agree Agree x 1
  5. I love this stuff. Makes my life so easy :love: