Provides public methods to get the percentage for the fill and trim
task. These can be used by 3rd party plugins to get the calculated
percentage or get the values of the processed/total amount of chunks.
Possible usages I have in mind:
- Boss bar showing a progress of the fill task
- Action bar showing the status
- ...
The bug was that locations at Y level 1 were never treated as safe locations for border knockback, even though they can be safe on a world which has only a flat 1-block height layer of bedrock at the bottom. For reference, normal worlds have multiple layers of bedrock at the bottom.
Prevents players from placing blocks outside the world border. Default
off.
This is for the PrisonPearl plugin, where if a player is imprisoned in a
chest placed far enough outside the world border it becomes impossible
to break the chest and free the player.
The BlockPlaceEvent listener is only registered if the option is
enabled.
This allows players to perform time based, vote based or donation based commands to increase the map size.
Examples:
1) Player votes, increase the map by 1 block
2) Player joins (more players) increase the map, Player is offline for X days decrease the map
3) Reached donation goal, increase the map
The UUID/player name lookup code I've used is by evilmidget38, from: http://forums.bukkit.org/threads/player-name-uuid-fetcher.250926/
NOTE: if you have a bypass list saved, it will be wiped when you first run this update. The wipe will only happen once, as it is a safety precaution.
This is marked as a beta to be on the safe side due to the overhaul of the entire command system. I've tested every command both through the server console and in-game, but it's certainly possible I missed a bug or two somewhere in there.
Normally players can't have anything riding them, but various plugins make that possible for pets or similar, as unwise as that may currently be with the CraftBukkit teleportation problems outlined above.
I finally set aside some time to add and test this workaround out using EchoPet to make sure it actually works.
Some further changes as well, including some minor code design improvement. As part of that, the root plugin's GetWorldBorder(String worldName) method has been deprecated and replaced with proper first-letter capitalization: getWorldBorder(String worldName).
All commands have now been tested in-game and through console, and a couple of remaining command bugs have been fixed.
Replacing the monolithic and crude "if...else if...else if..." command handler in WBCommand.java with every command crammed in there, each command is now handled in a separate subclass in the new "com.wimbli.WorldBorder.cmd" package. This is inspired by the way the Factions plugin handles subclassed commands.
This is the first pass of the command handling rework. I still need to do some further testing, and I plan to further improve feedback for input errors to also show some basic help info along with the command examples.
This option isn't made available to change through a command as most people shouldn't change it. It's been made available for people who are running extremely low memory (and thus necessarily tiny) servers which have less than 768 MB memory available to their CraftBukkit server.
/wb [world] set <radiusX> [radiusZ] spawn - uses the world's spawn point.
/wb set <radiusX> [radiusZ] player <name> - centers a border on the specified player.
This option was mainly added for people wanting to follow Mojang's recommendation to load all important world chunks in 1.6.3 - 1.6.4 before updating to the eventual 1.7 release to prevent errors with structures such as witch huts and nether fortresses:
https://mojang.com/2013/09/minecraft-snapshot-13w37a/
Working around Minecraft and Bukkit client/server glitches when teleporting an entity which has a passenger or is a passenger is the whole reason for this "feature". The need was introduced a few Minecraft versions back when this well and truly broke; hopefully they will fix the underlying problems eventually.
A delay of at least 2 ticks worked on my local VM test server, but for potentially loaded live servers on the internet with players who potentially have slow/poor connections... a longer delay is probably needed to prevent client glitches. I've set the delay to 10 ticks (half a second) which still looks reasonable enough in-game, I think.
Further, I found that out of the native vehicles boats in particular quite simply cannot be teleported without the client ending up confused about where it actually is for whatever reason. I came up with a workaround for this by destroying the boat and spawning a new one in the correct position.
Bah, gotta love workarounds within workarounds.
As a reminder, this all primarily came about due to the ability to teleport entities which have a passenger being removed by the Bukkit team to apparently combat a nasty related bug.
Players going through a portal will now no longer be able to generate chunks outside the border; the portal teleport location is re-targeted inside the border to prevent that so that new portals aren't created outside the border
added redstone comparator and activator rail to "safe open blocks" list for knockback safe location finder
Note that I tried to work around it by ejecting the player, teleporting the entity they were riding (minecart, pig, whatever), and then setting the player as passenger again, but it was bugged and only halfway treating the player as if they were riding something.
This is useful now that border shapes can be rectangular/elliptical with different X and Z radius values.
Also various cleanup of new rectangular/elliptical support. Commands can now accept a single radius value (as it used to) or separate X and Z. Radius is displayed as single number if X and Z are equal. "shape" and "wshape" commands accept round|square as before for backwards compatibility and simplicity, alongside the new elliptical|rectangular (which work the same). Updated config loader to support loading older configs with single radius value specified. Added various other methods for backwards compatibility.
New command /wb bypass [player] [on/off], which allows the player to go beyond the border without being knocked back. Requires "worldborder.bypass" permission (Ops only by default). Nobody has bypass mode enabled by default (has to be toggled on), and the list of people with bypass enabled is wiped on server restarts. Player name ("[player]") is optional if run in-game and defaults to the player running the command, but must be specified if run from console. If on or off ("[on/off]") is not specified, it will simply be toggled.
Also attempt to fix problem when riding mobs via MobRider where mob and player end up underground after knockback; seems unsuccessful. Seeing as pigs in vanilla CraftBukkit without MobRider don't have this problem, but _do_ have the problem along with all other mobs when MobRider is loaded, I'm not bothering with this one further for now.
Also added variables for Dynmap border color/thickness/opacity, just for internal clarity... will also simplify things if I or someone else ever gets around to adding settings for those values, to allow them to be changed
Thanks to mikeprimm for adding a couple of requested features to DynMap which made this feature possible.
New commands:
/wb dynmap <on/off> - turn DynMap border display on or off.
/wb dynmapmsg <text> - DynMap border labels will show this.
New permissions:
worldborder.dynmap (Op): Can enable/disable DynMap border display integration
worldborder.dynmapmsg (Op): Can set the label text for borders shown in DynMap
Also, a slight improvement to how boolean values are determined from command input; it accepts "y", "yes", "true" instead of just "on".