Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Aikar, Apr 19, 2017.
is it really hurting that badly lol?
I mean, it would hurt me too to be reminded that I run a 1.8 server in 2019
Idm it being there it just fucks with the format of my startup message. I just wanted to be able to change the color
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
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?
See for example: https://gist.github.com/aikar/c8dec42a687102efa9bb8365e3cd45de#file-empirecommandmanager-java-L29
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
You would basically override these: https://github.com/aikar/commands/blob/master/languages/core/acf-core_en.properties by adding your own entries into your plugins locale file, which should replace the ones in acf
Thank you, I kinda feel stupid for missing that part in the wiki
Is there a way to have command arguments be positioned between subcommands?
For example, a command like this:
/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.
@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? )
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".
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.
java.lang.IllegalAccessError: tried to access class net.jodah.expiringmap.ExpiringMap$ExpiringEntry from class net.jodah.expiringmap.ExpiringMap
It's being used in SkinsRestorer - I've checked, it's the same exact version, but somehow it produces above error... :/
Use Dependency Loader. ;P
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.
Heey, sorry for bumping this. I'm trying to make my own ban system using ACF. What I'm actually trying to do is to pass multiple arguments into one single object (e.g I have this public void onTempban(CommandSender sender, Ban ban) and actually have this much arguments: <player> [-s] <time number><s|m|h|d|w> <reason>). How can I tell ACF to do this, or it is not a feature yet?
use a command context and pop all the args you need that make up the Ban object.
I already have a command context resolving it. The problem is that whenever I try to run it, acf says "unknown command".
Then you didn't register it properly. Join Aikar's discord and ask for help there.