Commit Graph

67 Commits

Author SHA1 Message Date
Brettflan f88ede397c Fix for incorrect use of World.setChunkForceLoaded, which apparently triggers the chunk to load if it isn't, rather than just setting the "force loaded" flag for it; thanks to SpottedLeaf for pointing this out and providing example code to fix it 2019-07-26 19:52:44 -05:00
Brettflan 0d45093fa6 attempt fix for circular border displaying in DynMap in isometric view with height of 64 instead of actual height of the world (normally would be 256) 2019-06-13 01:05:01 -05:00
Brettflan e14d526541 Misc 1.14 updates:
* using "force loaded" chunk flag instead of canceling ChunkUnloadEvents, which is no longer possible as of Spigot 1.14
* replaced UUID lookup code with newer and slightly improved implementation
* added new 1.14 wooden sign variations to safe open blocks list
* fix for error if Fill was canceled or finished without actually loading any chunks
* added notice to end of Trim recommending server restart
2019-05-23 19:48:54 -05:00
Brettflan 179d1cfda3 Release 1.9.9 (beta) 2019-04-30 21:00:33 -05:00
Guntram Blohm ade2ca6352 Fix formatting (spaces/tabs) 2019-03-20 19:27:10 +01:00
Guntram Blohm 12bb4b1da9 Use async Chunk generation, if possible, using PaperLib
This routes all world generation requests through PaperLib, which will generate Chunks asynchronously if the server allows it (Paper does, Spigot doesn't). This means changes to which chunks are still needed, and which can be unloaded, as well; the code keeps a list of Chunks that are needed for others, and will unload them only when the target chunk has been generated. Unloads by the server itself get prevented while the chunk is needed; else the server could decide on a tick that chunk has no players nearby and needs to be unloaded.
2019-03-20 19:02:55 +01:00
Guntram Blohm e6564300c7 Merge remote-tracking branch 'upstream/master' into asyncFill 2019-03-20 09:54:48 +01:00
Brettflan 8e68e83e3d prevent issue of Fill process potentially making the server unresponsive while skipping over huge numbers of already fully generated chunks, most likely with very large already mostly generated worlds which are stored on old/slow hard drives 2019-03-06 01:26:18 -06:00
Guntram Blohm ec843cde03 test async fill 2019-02-21 20:39:17 +01:00
Brettflan af4727d1b6 use ByteBuffer + IntBuffer for reading region file headers, to improve performance of chunk existence checks, as suggested by aikar
https://github.com/Brettflan/WorldBorder/issues/114
2018-10-24 04:14:43 -05:00
Brettflan 1d35e59c0e minor cleanup 2018-09-16 09:39:27 -05:00
Mike Primm 2cd033c808 Alter fully generated prediction to match 1.13.x worldgen behavior 2018-09-03 14:07:13 -05:00
Brettflan 20b4f5ed67 minor cleanup 2018-08-30 00:09:42 -05:00
Brokkonaut ad97e1f9de Add wooden buttons, double plants and beetroots to the safe blocks list 2018-08-23 04:58:05 +02:00
Brokkonaut 45ef28c8d3 Update for 1.13 + Some cleanup 2018-08-22 16:39:56 +02:00
Brettflan 69895a071d minor cleanup of last commit 2018-04-07 11:40:51 -05:00
joblo.2213 bae30eb52f Make player priority and hide by default for dynmap marker set customizable 2018-04-07 18:03:36 +02:00
Brettflan ed0c46a557 Fix for boat type being changed in Minecraft 1.9+ when knocked back from the border; note this breaks boat knockback for Minecraft versions older than 1.9 2016-11-29 03:13:06 -06:00
Brettflan f9d89034b4 Merge branch 'master' of github.com:Brettflan/WorldBorder 2016-07-10 23:03:52 -05:00
Brettflan e64defbdeb suppress logging of border-checking task being "stopped" when the task is being restarted (which is done to make sure there's only one such task running at any time), to reduce potential confusion 2016-07-10 23:03:29 -05:00
Marcel Maryniak a762b95cfe fixes #57 2016-02-26 02:47:03 +01:00
Maxim Van de Wynckel 895bec7061 public percentage methods for fill and trim task
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
- ...
2016-01-15 12:38:17 +01:00
BuildTools dd4a8348be World Trim/Fill task start events 2016-01-12 20:47:10 +01:00
Brettflan fd134e4527 Fix for minor bug in border knockback code for worlds that have a single layer bedrock base at Y level 1.
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.
2016-01-02 04:54:10 -06:00
Brettflan 98c98b8618 minor style cleanup of last commit to match project style 2015-09-05 04:13:10 -05:00
timafh e42c5be1dc Adding WorldBorder Events 2015-09-04 20:20:27 +02:00
Brettflan a349063a74 Release 1.8.4
Also updated Spigot and Dynmap API version references, and one very minor bit of code cleanup.
2015-06-23 12:38:26 -05:00
Brettflan 99bfc689f2 Minor bit of code cleanup 2015-05-19 09:17:24 -05:00
Roy Curtis 1320215c3f Proposed & implemented feature: prevent mob spawns outside of border, including:
- command `/we preventmobspawn`
- permission `worldborder.preventmobspawn`
- MobSpawnListener for cancelling spawns outside border

Changes outside of scope:
- prevent potential NPEs whilst disabling already-disabled preventblockplace and preventmobspawn
- added intelliJ IDE files to gitignore
2015-05-18 12:18:36 +01:00
ShadowRanger a548578819 Minor code formatting changes
Updated some classes to ensure code formatting consistency is kept
throughout the entire project.
2015-03-02 11:37:01 +11:00
Brettflan c96672a9ec initial test update for MC 1.8 Spigot... fix for border check routine failing and spewing errors due to change in Bukkit.getServer().getOnlinePlayers() 2015-02-08 09:14:31 -06:00
Brettflan 211a40f893 minor tidying of preventblockplace 2014-11-26 04:14:09 -06:00
gipsy 3028b3c7c6 add prevent-block-place option
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.
2014-11-25 21:33:51 +01:00
Brettflan d38bfc3f30 When checking for +/- on radiusZ parameter, it was incorrectly checking the radiusX parameter instead; fixed 2014-06-17 05:53:02 -05:00
Brettflan 2c02a33275 minor cleanup and formatting changes to last commit, and added +/- info to radius command help 2014-06-17 05:48:11 -05:00
Maxim Van de Wynckel 15f47118e8 Added + and - before radius as an optional char
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
2014-06-15 10:50:27 +02:00
Brettflan 2984d9513f Changed bypass list to track UUIDs instead of names, in advance of changeable names in Minecraft 1.8.0+. There might be a slight delay in response now when running the /wb bypasslist command, and when running the /wb bypass command on a player who is not online. This is because the Mojang UUID lookup server must be queried in those cases. This may be handled better in a future update if/when Bukkit provides methods for caching and looking up that information.
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.
2014-05-28 11:13:16 -05:00
Brettflan 1698548fb5 completion message for Fill process now indicates which world it was running on 2014-05-13 08:02:23 -05:00
Brettflan abdfeda774 Workaround fix for players who have a passenger (pet riding their head or whatever) being able to bypass borders. This is due to a CraftBukkit issue (bug really, but whatever) where all teleportation fails silently if the entity attempted to be teleported has a rider/passenger.
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.
2014-03-12 04:50:59 -05:00
Brettflan b8735aded0 Made "whoosh" effect default to on, as it's a nice effect that I think most people would like. For some reason I thought I'd already done this long ago.
Also a few more bits of code improvement.
2014-03-10 22:40:52 -05:00
Brettflan 1faccf0a25 New command: /wb help [command] - get help on command usage. This provides further help for any specified command. Accordingly, help info has been added to every command. This info is also provided if there was an error with the command parameters passed to any given command.
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.
2014-03-10 22:27:42 -05:00
Brettflan cd9ee900ae Major rework of command handling. This is mostly internal code changes rather than something noticeable to the end user, though on command input errors (wrong number or format of arguments, etc.) it will now have it show examples for the command the same as seen in the command list provided by the root wb command.
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.
2014-03-06 15:03:44 -06:00
Brettflan 6e7f79711a fix for "denypearl" command not correctly indicating whether it's enabling or disabling the option 2014-02-27 19:30:16 -06:00
Brettflan 41912f9e17 a bit of cleanup for denypearl functionality, and made setting enable itself for people updating from older versions of the plugin where it defaulted to false (as it now defaults to true); this is done since the changed functionality should now be desirable for most people 2014-02-22 08:10:13 -06:00
Brettflan 9e7e9d0682 Some minor code refactoring and cleanup courtesy of Zeluboba, taken in desired bits referenced from his larger pull request here:
https://github.com/Brettflan/WorldBorder/pull/32/files
2014-02-17 06:37:18 -06:00
Brettflan fd161533d0 Changed existing "deny-enderpearl" config setting to only deny ender pearls which are thrown past the border, and switched it to be enabled by default. Added new command /wb denypearl <on/off> to toggle the option on or off, which requires the new permission worldborder.denypearl to use. 2014-02-17 05:51:40 -06:00
Brettflan cfaf955e9a Add TeleportCause.PLUGIN indicator to the teleport methods used by border knockback, so other plugins can see that the teleport was triggered by a plugin and potentially not interfere if they otherwise would have
Specifically, this should hopefully take care of CombatTag preventing WorldBorder knockback if the player is considered to be in combat
2014-01-26 20:51:37 -06:00
Brettflan 66390223c6 Added config option "fill-memory-tolerance" which defaults to 500. If/when the Fill process pauses due to low memory (<200 MB), this setting is the amount of free memory (in MB) required to be available before it automatically continues.
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.
2014-01-20 12:51:44 -06:00
Brettflan 9f7719074f Two new variations of the set command are available thanks to sponsorship from Rhythmatic:
/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.
2014-01-09 08:42:26 -06:00
Brettflan 2e48a5f903 Additional check added to make sure frequency value specified in Fill and Trim commands is greater than zero. Thanks to sync667 for pointing this oversight out. 2013-12-20 06:03:04 -06:00