Resource (ACF - BETA) Annotation Command Framework

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

  1. Sadly that method is package private. The tabComplete methods are public, meaning I can add suggestions by overriding them, but the method that adds all subcommands cannot be simply overriden.

    I'll open an issue. It might be as easy as changing the getCommandsForCompletion method to protected.
     
  2. MiniDigger

    Supporter

    nah, I feel like this could be a proper feature, to hide a command from tab and help pages. @Invisible or smth maybe.
     
    #242 MiniDigger, Apr 19, 2018
    Last edited: Apr 19, 2018
    • Like Like x 1
    • Agree Agree x 1
  3. MiniDigger

    Supporter

    @Nikl FYI, PR was pulled, next ACF build will include the new @private annotation.
     
    • Like Like x 1
  4. It was deployed earlier today.
     
  5. Hi :)

    Is it possible you can create a lightweight version for shading? Such as acf-bukkit-lw or something, as I'm finding it to consume lots of storage when shading together.

    Thank you!
     
  6. ACF is pretty light. Most people have internet speeds that can download 200k~ (roughly the size of ACF) in 1-5 seconds.

    This is not considered 'lots of storage'.

    The community needs to stop being so worried about file sizes.

    You may also reduce the size slightly if you put in shading filters to exclude other language files. This may reduce it by 25k or so.

    I am exploring version 0.6.0 to change languages to not be all shaded in by default, and make you opt into them
     
    • Agree Agree x 1
  7. Only 200kb.. Why would i want my plugin to be 200kb + my code? Thats huge for a plugin seeing how not many even get to 2mb
     
    • Funny Funny x 1
  8. 200kb is peanuts. Why does it matter?

    Did you know that FastUtil, bundled in Minecraft, is 20MB
    Guava, also bundled, is 2.5MB
    MySQL is 1MB

    Code is not free in size. Good full featured code takes up size.

    Stop worrying about an absolutely useless metric.
     
    • Agree Agree x 1
  9. MiniDigger

    Supporter

    I shade 25,1mb of dependencies for one of my projects ^^
     
  10. This ^^

    I've gone over 50 for a plugin before.

    The size of your file does not matter. Comparing code quality based on size is like trying to compare two different developers' productivity based on the number of lines they write in an hour.
     
  11. And as far as Spigots resource limits, which I currently believe is 4MB, that puts ACF at only 5% of that.

    So, you would have to be right there at the limit to be at risk for the file size limit, and you're likely to only get near that # if you have lots of dependencies shaded.

    If you end up in that boat, you can then solve it by putting your external deps into a dependency plugin.

    There are solutions to any problem that arises around "file size", but 99% of people will never encounter problems.

    So don't waste time reinventing the wheel, or sacrifice major user experience features that ACF can provide you, over trivial matters.

    If you have a trivial single or 2 command plugin that doesnt have advanced input requirements... yeah ACF is over kill.

    But if you are going to have lots of commands, and those commands get complex, and have extensive parameter lists, and many of the commands have the same data input requirements...

    ACF can save you tons of boilerplate code, and greatly help you organize and maintain your command structure, with the benefit of improving the experience for your end user.

    Note, ACF will also be the easiest way to use the 1.13 command system. Bukkit will not be providing the new command system, so unless you manually hack into it yourself, ending up reimplementing what ACF already does for you.... You will be wasting a lot of time.

    ACF will eventually auto register your commands into the 1.13 Brigadier system (once 1.13 is released and I get the support added that is), leaving you to (hopefully) not have to do anything at all, and your commands will automatically give the 1.13 client all the special metadata for the improved command system.

    That's a lot of benefits to give up over a silly concern about 200k file size.
     
    • Agree Agree x 2
    • Like Like x 1
    • Informative Informative x 1
  12. + Winner, Agree, Like, etc whatever
     

Share This Page