A simple world border management plugin. This plugins makes it easier maintain borders in a multi world environment.
Donations
Creating plugins for Sponge takes time and effort. If you enjoy the hard work Iāve put into to this please feel free to get my a cup of coffee. It is much appreciated.
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.
One thing that Iāve thought that might be worth adding to the API, is a genericArguments that can wrap stuff, and just pass-through the commandarguments, but let you change the usage text.
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
would seem āeasier to useā if it just let you limit in block size like this instead of needing a scientific calculator. Not many can do that kind of math in their head
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
Will this que up the rendered chunks for load on dynmap as they rendered with the generator or will I have to do a full dynmap render again after pre loading the world
The mathematical abbreviation happens on itās own. Itās not something I purposely did. I never changed it, because short hand is better and it takes 5 seconds to Google it.
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.
ahh I didnāt know the long form as an entry was an option
guess the only thing need changing is the description to make that know in game. So people donāt get an equation when they where expecting a straight forward number and go āwait whatā