Multiverse-Core icon indicating copy to clipboard operation
Multiverse-Core copied to clipboard

Console Per-World Worldborder Command

Open KermMartian opened this issue 8 years ago • 14 comments

(Not a duplicate of #1517, which discusses in-game /worldborder usage). An automated script that periodically refreshes the mining world on my server needs to be able to set the center and radius of a world other than the server's main world. Currently, the /worldborder command as used from the console only modifies the main world's parameters; you must be on the server, in the target world, to use /worldborder on a specific world. I propose/request one or two Multiverse command(s) to set the (1) radius and (2) center of a per-world world border, including from the console. Thanks in advance.

KermMartian avatar Nov 20 '16 17:11 KermMartian

I'd also like to see this implemented. I'd imagine it'd just be added to the available settings in /mvm

RoboMWM avatar Oct 06 '17 19:10 RoboMWM

Would love to see this too. pls add

BijuuKrunos avatar Feb 04 '20 15:02 BijuuKrunos

There are plugins out there like this https://www.spigotmc.org/resources/worldborder-1-15.80466/ that handles such a feature. I don't see MV needing to implement it.

benwoo1110 avatar Sep 23 '20 12:09 benwoo1110

worldborder is a vanilla feature, and as far as I'm aware, multiverse's design is meant to modify vanilla features and gamerules.

The plugin you linked appears to enforce its own border, similar to brettflan's, at least at a first glance. I see nothing for the "vanilla" world border.

RoboMWM avatar Sep 23 '20 15:09 RoboMWM

Worldborder is a vanilla feature that does not have per world support, so plugin like I linked allow for that. And there are already good plugins that have implementation for it. Also, if MV were to do it, we too have to enforce borders with our own implementation. But whats the point when another plugin already does the job well?

benwoo1110 avatar Sep 23 '20 15:09 benwoo1110

Also, if MV were to do it, we too have to enforce borders with our own implementation.

No you wouldn't. Vanilla has its own implementation.

Worldborder is a vanilla feature that does not have per world support

The worldborder feature in vanilla is per-world.

RoboMWM avatar Sep 23 '20 18:09 RoboMWM

@RoboMWM might be right, there's a WorldBorder class built into the Bukkit API.

nicegamer7 avatar Sep 23 '20 18:09 nicegamer7

Yea, I think I've messed around with that once along with gamerules. https://github.com/MLG-Fortress/MountainDewritoes/blob/5e1a8f2dd6dceec524afad48bd8ee4a7bbe3b5bb/src/main/java/me/robomwm/MountainDewritoes/MountainDewritoes.java#L406-L422

RoboMWM avatar Sep 23 '20 18:09 RoboMWM

As i needed to search for another solution. I came up that you can do this with simple Vanilla Commands. with the "execute in run worldborder set XX" you can set the worldborder and do other things. Here is an example wich I use in my script now: screen -S Farmwelten -X stuff 'execute in normal run worldborder set 4000\n'

Hope this solve the problem. Greetz Krunos

BijuuKrunos avatar Sep 23 '20 18:09 BijuuKrunos

@BijuuKrunos Yes you can run any vanilla commands with various wrappers, but it'd be a lot easier to just change the worldborder in a world from the command line in a single command, just like I can with the other gamerules.

Also, your solution will only be applied to the default world... you have to be ingame in the world you wish to modify to modify another world's vanilla worldborder with the vanilla command.

RoboMWM avatar Sep 23 '20 18:09 RoboMWM

I'll reopen this and see if it is feasible.

nicegamer7 avatar Sep 23 '20 18:09 nicegamer7

@BijuuKrunos Yes you can run any vanilla commands with various wrappers, but it'd be a lot easier to just change the worldborder in a world from the command line in a single command, just like I can with the other gamerules.

Also, your solution will only be applied to the default world... you have to be ingame in the world you wish to modify to modify another world's vanilla worldborder with the vanilla command.

with my example I just wanted to show you, that you can do this in any script and don't need to do this in the minecraft Console. BUT you can change the worldborder of any world with it too. Thats why i am using the execute command and not only the worldborder command. If you want to now more visit the wiki: https://minecraft.gamepedia.com/Commands/execute

"execute in XX" means that the command should be executed in the world XX. This does not have to be the default one. "run" means tu run the command... "worldborder..." is the command wich should be run. It can be any Vanilla command you want.

I am using this to set the worldborder from my farmworlds (nether,the_end,normal). Greetz Krunos

BijuuKrunos avatar Sep 23 '20 19:09 BijuuKrunos

Ah ok, that's interesting and useful. I'm guessing though that all requires op-level permission unless spigot has a permission. I'd like to give admins permissions to modify worldborders without op-level access (as well as compatibility with other plugins like PurpleIRC) similar to how I can provide access to change gamerules.

RoboMWM avatar Sep 23 '20 20:09 RoboMWM

I don't think you'd be able to do that. You can give only the /worldborder command, but if you give /execute permission it will give them access to every single vanilla command by just doing /execute run

Shuba-Shuba avatar Sep 29 '20 16:09 Shuba-Shuba