Project Borders

Project Borders

A simple world border management plugin. This plugins makes it easier maintain borders in a multi world environment.

:gift: 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.


:package: FEATURES

  • Multi-World support
  • Chunk Pre-generation
  • Easy to use

:open_file_folder: DOWNLOADS

Release: Download Here
Developement Builds Download Here

:wrench: COMMANDS

/border center
/border damage
/border diameter
/border generate
/border warning
/border info



:warning: Bugs


  • Pre-Generator crashes server periodically

If you find a bug or are having a problem with Project Borders, please create a ticket at GitHub


download link is wrong, it says Broders instead of Borders

A few things:

  • 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

Usage: /border info <world>

but instead I get

Usage: /border [damage|center|diameter|warning|generate|info]

which for someone that has never used this plugin is not very helpful in this situation. Idk I probably screwed something up.


Here is an issue that I created in April describing the same problem: Command usage displayed incorrectly · Issue #1165 · SpongePowered/SpongeAPI · GitHub.

1 Like

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

6.0E7 is a mathematical abbreviation. It represents 6 * 10^7, so a big number

so 60,000,000

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

also another question

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.

Yep, word for word.

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 :wink:

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 :slight_smile:

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”