Resource (ACF - BETA) Annotation Command Framework

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

  1. is it really hurting that badly lol?
     
    • Agree Agree x 1
  2. MiniDigger

    Supporter

    I mean, it would hurt me too to be reminded that I run a 1.8 server in 2019 :ROFLMAO:
     
    • Like Like x 3
    • Funny Funny x 1
    • Winner Winner x 1
  3. Idm it being there it just fucks with the format of my startup message. I just wanted to be able to change the color
     
  4. lots of ACF updates tonight.

    - @Default methods now can consume other parameters, a long standing issue thats finally been resolved!
    - @private can now be put on the class or even super class to mark all commands private (doesnt show in tab complete)
    - Per Joo, CatchUnknown can now be in a different class than Default handlers
    - All of the "OnlinePlayer" contexts have been semi-moved to a platform specific package, such as co.aikar.commands.bukkit.context.OnlinePlayer. This was so that you can use multiple ACF modules in the same jar without each ACF domains OnlinePlayer clashing with each other. A deprecated alias is left in the old position to maintain backwards compat, but you should update your import to the new preferred home, especially if you have multiple ACF types in same project. OnlineProxiedPlayer was renamed to OnlinePlayer for consistency for Bungee.


    @Splodgebox I removed that version log line
     
    • Friendly Friendly x 1
  5. Hey i want my plugin to load the messages for acf from an database...
    Is there any way to insert locates per with you using an FileConfiguration?
     
  6. Is there a way to change the automatically generated syntax format (and colors) that displays in game when someone types in a command incorrectly? https://i.imgur.com/9YshXaH.png
     
  7. electronicboy

    IRC Staff

  8. gzx

    gzx

    Is there a way to have command arguments be positioned between subcommands?

    For example, a command like this:
    Code (Text):
    /foo <parameter> bar
    where bar is a subcommand.

    I've only been able to figure out how to add arguments after all the subcommands, which is quite restricting.
     
    #310 gzx, Jun 12, 2019
    Last edited: Jun 17, 2019
  9. MiniDigger

    Supporter

    @gzx feature requests go onto github. in fact, there is already a request for your case https://github.com/aikar/commands/issues/145
    as this is a rather complex feature and aikar is rather busy nowadays, I don't see that request moving forward rather soon, unless somebody steps up and creates a PR (maybe you? :))
     
  10. Looking to swap over to using ACF - is there any way to make commands that are just /basecommand? I find any option that doesn't involve aliasing a subcommand. I guess I can just make a catch-all base, but it feels a bit silly.

    Edit: Looks like you can use @Default or the alias "__default".
     
    #313 Jikoo, Jun 17, 2019
    Last edited: Jun 18, 2019
  11. Hello,

    is it possible to somehow load ACF on runtime without shading it into uber JAR?

    Currently I'm loading all needed libs from /lib folder placed on server by adding URLs to ClassLoader on runtime but it clashes with ACF & it's dependency Expiring Map.

    Code (Text):

    java.lang.IllegalAccessError: tried to access class net.jodah.expiringmap.ExpiringMap$ExpiringEntry from class net.jodah.expiringmap.ExpiringMap
        at net.jodah.expiringmap.ExpiringMap.putInternal(ExpiringMap.java:1262)
        at net.jodah.expiringmap.ExpiringMap.putIfAbsent(ExpiringMap.java:970)
        at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:325)
        at skinsrestorer.shared.utils.acf.ACFPatterns.getPattern(ACFPatterns.java:76)
        at skinsrestorer.shared.utils.acf.ACFUtil.replace(ACFUtil.java:260)
        at skinsrestorer.shared.utils.acf.ACFUtil.replaceStrings(ACFUtil.java:307)
        at skinsrestorer.shared.utils.acf.CommandManager.formatMessage(CommandManager.java:409)
        at skinsrestorer.shared.utils.acf.CommandManager.sendMessage(CommandManager.java:399)
        at skinsrestorer.shared.utils.acf.CommandIssuer.sendMessage(CommandIssuer.java:90)
        at skinsrestorer.shared.utils.acf.CommandIssuer.sendMessage(CommandIssuer.java:87)
        at skinsrestorer.shared.utils.acf.CommandHelpFormatter.printHelpHeader(CommandHelpFormatter.java:77)
        at skinsrestorer.shared.utils.acf.CommandHelpFormatter.showAllResults(CommandHelpFormatter.java:41)
        at skinsrestorer.shared.utils.acf.CommandHelp.showHelp(CommandHelp.java:184)
        at skinsrestorer.shared.utils.acf.ACFBukkitHelpTopic.<init>(ACFBukkitHelpTopic.java:44)
        at skinsrestorer.shared.utils.acf.BukkitCommandManager.lambda$new$0(BukkitCommandManager.java:114)
        at org.bukkit.craftbukkit.v1_14_R1.help.SimpleHelpMap.initializeCommands(SimpleHelpMap.java:135)
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:395)
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:474)
        at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:290)
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:869)
        at java.lang.Thread.run(Thread.java:748)
    It's being used in SkinsRestorer - I've checked, it's the same exact version, but somehow it produces above error... :/
     
  12. Use Dependency Loader. ;P
     
  13. U should release this as library each plugin could use on its own. I don't want to add another plugin just for dependency downloading.