I’m really recommending the use of injection. Especially here, you’re finding the config path arbitrarily, rather than using Sponge’s built-in utilities for getting default config files.
Why is everything in CommandManager a GenericArguments.optional(GenericArguments.string(key))? There are many, many GenericArguments methods that fit the exact use cases you have, yet you’re not using any of them. For one of your commands, there’s a 7:1 ratio of parsing code to executing code. This is exactly what the high-level command API is supposed to solve. Also, calling special attention to the optional() part, because most of those aren’t actually optional (although /help will subsequently list them as such).
Just to explain. My reasoning behind my excessive use of optional arguments is because I found that Sponges argument error and usage outputs aren’t very helpful, and the more complicated the command the more confusing it can get when entering an invalid argument or command. Doing this way allows to override Sponges output and use my own. I’ve never liked doing this way but it was either that, go low level or deal with flooding of questions, (pex anyone?). I always planned on changes this as Sponge development progressed, just haven’t found a good solution other than maybe creating my own generic arguments which I haven’t look into that much.
The configs is just an old habit from early Sponge development. I have a tendency to borrow code from my other projects if it wasn’t obvious.
Feel free to submit a PR to make them better. Meanwhile, you may as well just directly implement CommandCallable and split(" ") since you’re not actually using the high-level API. I find that a slightly difficult help message is worth being able to make a command in four lines.
My question is why when executing a sub command that is missing arguments it returns the usage of the root command and not the sub command? At least that’s what I’m seeing. Example /border info requires world argument. I’d expect the Usage output to be
When generating out to the world border, if you stop part way through (from a crash or nuclear meltdown, whatever) and then start it up later, will it take the same amount of time as if it was started from the beginning? And I’m assuming it doesn’t regenerate existing chunks
I know it says easy to use, but the diameter command is not well explained. I looked at the current border for my world. whatever it defaults to and it says “6.0E7”
No idea what that means. I was expecting a diameter in blocks to set. For instance if I wanted my world to be more 30,000 blocks in diameter, I’m not sure what to enter in the diameter command to get the world the size I want it and I see no link to a wiki or even a read me file to explain the commands and usage of the plugin
Eh, it’s just adding zeroes; it’s just another way of saying “6 then seven 0’s” which is probably my preference for number illustration. That said, users aren’t all going to know how it’s laid out, so I agree it’s probably worth changing
Is this the case @TrenTech? My server died at 11% inexplicably after hours of chunk loading. Would be interesting to know if this picks up from it, or does the progress all over again. Similarly, if the latter is truly the case, will it then regenerate (and wipe) previously generated chunks?
Because if it does not re-generate, then it means that it is tracking down what chunks are generated, and therefore the process can be stopped, and continued without loosing said progress.
If there is a way to change you should, no matter how fast the google search is to learn it you will get endless “how do I make my map this size” post on here. Most like myself will come here to post questions for the dev instead of googling the term. One of the practices of this kind of dev process is helping the dev by providing feedback instead of googling your answer.
Also googling it only takes 5 secs when you google the equation, if you don’t know the name of the equation or how its used then trying the same google search in reverse becomes frustrating (IE I know I want X amout of blocks as my world size but don’t know the equation needed to get that number)
Just putting a scientific equation as a value in the config file seems not user friendly and not needed when you could have the player say the amount of blocks out right. The shortest distence between two lines as they lines. Now that I know it was unintentional I’m glad I brought it up so it can have attention brought to it and hopefully get changed. The value of feedback
This is part of the HOCON spec by default. We don’t work with configuration files directly, we just use the library, which does this.Simply auto-saving the file causes it to be processed like that. The long form of the number works too.