I18n in SubCommandBase
LatvianModder opened this issue ยท 4 comments
This is completely wrong. getCommandUsage() returns an unlocalized string like "commands.name.usage", not translated one. Also caused this crash, because you are using client-side-only class on server side:
https://github.com/LatvianModder/FTBUtilities/issues/846
Why do you have your own class at all? CommandTreeBase exists
Hm, interesting... This code was there for 2 years in the mod, and the crash was only found now ๐
Thanks for reporting! It was written long time ago so I didn't really knew how to do things back then. I also needed a short version of the command, i.e. without the full description of sub-commands. I'll see what I'll be able to do about it.
CommandTreeBase exists
I'll take a look at it, but you know If it ainโt broke, donโt fix it. ๐
https://github.com/LatvianModder/FTBQuests/tree/master/src/main/java/com/feed_the_beast/ftbquests/command
You can take a look here for example (CommandFTBQuests being the main one here). And you can have CommandTreeBase children too, thus, tree command