Commit Graph

944 Commits

Author SHA1 Message Date
sk89q
38587a1c61 Add a hash table index for regions that hashes on chunk coordinates. 2014-08-13 00:34:36 -07:00
sk89q
eb23e28c16 Handle Tameable as a cause. 2014-08-12 23:17:36 -07:00
sk89q
4379c7e989 Handle Vehicle.getPassenger() as a parent cause. 2014-08-12 23:15:47 -07:00
sk89q
989ce82c5d Merge branch 'feature/event-abstraction' into feature/region-api-update 2014-08-12 19:49:52 -07:00
sk89q
f92e55e061 Simplfy Cause objects. 2014-08-12 19:48:20 -07:00
sk89q
0fc3d21b90 Add abstracted event debugging listener. 2014-08-11 20:08:56 -07:00
sk89q
26d3645f86 Improve level of event listening. 2014-08-11 20:08:38 -07:00
sk89q
110aa2e56b Clean up docs / code for utility classes. 2014-08-11 17:54:55 -07:00
sk89q
05369b69b6 Reorganize classes into different packages. 2014-08-11 17:51:00 -07:00
sk89q
4a501a49db Abstract events for regions and blacklists further. 2014-08-11 17:48:40 -07:00
sk89q
7a01168781 Rewrite region API. Migrations need to be re-implemented.
This commit, however, adds:

* Better support for background saves and loads.
* Periodical writes of region changes rather than explicit save() calls.
* Rewrite of the MySQL region code.
* Support for partial saves when using MySQL.
* Decoupling of region index implementations and RegionManager.

What still needs to be done includes:

* Background region modification operations (addmember, etc.).
* Unit tests to verify correctness of the partial saving.
* Migration support (to be re-added).
* Better handling when regions are failing to save.
* Testing of the /rg load and /rg save commands.
* Verification of how server shutdown / world unload is handled.
* Verification that thread-unsafe concurrent saves of data is not happening.
2014-08-08 20:28:49 -07:00
sk89q
b5dfed9e01 Update for dependency package rename. 2014-08-02 23:35:12 -07:00
sk89q
29f804b9f0 Save YAML regions database to a temporary file before renaming. 2014-08-02 21:22:32 -07:00
sk89q
504fceceeb Remove /wg cancelall because it doesn't entirely work yet. 2014-08-02 21:19:05 -07:00
sk89q
9a852f4cbe Fix shutdown guard not working. 2014-08-02 21:08:11 -07:00
sk89q
fafd3aba6a Implement UUID migration. 2014-08-02 21:03:17 -07:00
sk89q
d87a335e85 Disable Flyway validation on migration. 2014-08-02 21:00:02 -07:00
sk89q
471b4496c9 Add task management and improve threaded code. 2014-08-02 18:38:18 -07:00
sk89q
bf48361b10 Switch to Odeum for executors. 2014-08-02 11:24:25 -07:00
sk89q
387431c9c7 Remove both UUID and names from domains for removal commands. 2014-08-02 10:03:41 -07:00
sk89q
9b69c07663 Show name: for legacy names in region domains. 2014-08-02 09:53:35 -07:00
sk89q
81a727fe7f Add support for UUIDs in region commands. 2014-08-02 09:32:30 -07:00
sk89q
189fd15498 Close connections properly in MySQLDatabaseImpl.chooseWorldId(). 2014-08-01 22:32:13 -07:00
sk89q
1a602f2f8a Implement UUID saving/loading support for regions.
Also fix WORLDGUARD-3117.
2014-08-01 22:31:58 -07:00
sk89q
7986238936 Add migrations for region MySQL support. 2014-08-01 21:29:40 -07:00
sk89q
a2fc9c94fd Fix NPE when a manager fails to load. 2014-08-01 20:02:50 -07:00
sk89q
51f98c9eb7 Reorganize MySQL region DB and added BoneCP as a dependency. 2014-08-01 19:19:48 -07:00
sk89q
418b8ff6a7 Add support for UUIDs in domains. 2014-08-01 17:36:56 -07:00
zreed
26ac987024 Use table prefix when deleting from region_poly2d_point. 2014-07-29 21:11:44 -04:00
sk89q
e44875532d Fix NPE in BlacklistEntry due to recent refactor. 2014-07-28 21:02:15 -07:00
sk89q
956d1b4248 Add support for data values in the blacklist. 2014-07-28 16:45:43 -07:00
sk89q
f46b1cb138 Change use of integer IDs to "Target" objects in blacklist code. 2014-07-28 15:58:07 -07:00
sk89q
5b5022b0b8 Change blacklist repeated event tracking to use an expiring cache and cause names as keys. 2014-07-28 15:01:01 -07:00
sk89q
d93c7fa09d Add on-dispense blacklist event. 2014-07-28 14:48:30 -07:00
sk89q
2c1d1ef0a3 Remove attachment check because it doesn't really make sense. 2014-07-28 14:45:05 -07:00
sk89q
bf97e41697 Rewrite blacklist code. 2014-07-28 14:38:43 -07:00
sk89q
c0852d63fe Add asynchronous region load/save for YAML databases.
These changes are intentionally limited so as to maintain backwards
compatibility with existing plugins using WG's API.

Some data structures were changed to CopyOnWrite to ensure thread
safety and the map of regions was changed to a ConcurrentHashMap.

Currently, saving requires making a copy of the regions map which can
cause a delay of a few milliseconds on large data sets.
2014-07-24 18:49:40 -07:00
sk89q
acc39e11b1 Handle null causes by skipping them. 2014-07-24 17:38:18 -07:00
sk89q
b4880ae982 Modularize potion blocking via the configuration. 2014-07-24 16:08:30 -07:00
Wyatt Childers
1a1acae588 Slight performance optimization to the movement checks to improve performance with slow permissions plugins 2014-07-23 22:26:34 -04:00
sk89q
1581390092 Add unit test to test global command blacklist with region command whitelist. 2014-07-21 19:52:27 -07:00
sk89q
cd221ea19c Refactor command filter into a unit tested class.
Also adds support for regex \s as the subcommand delimiter.
2014-07-21 19:36:25 -07:00
sk89q
abeab91be4 Add messages warning about auto-god mode and auto-amphibious mode. 2014-07-18 18:39:49 -07:00
sk89q
ac88367f6c Handle null custom flags registered by third-party plugins.
See WORLDGUARD-3094.
2014-07-13 02:23:04 -07:00
sk89q
f788f0e0d9 Add internal.check-attached-blocks option to check attached blocks.
This does not check the other way yet (i.e. check if other blocks depend
on the block in question).
2014-07-12 21:14:26 -07:00
sk89q
9a4bc70cdd Added basic abstracted events. 2014-07-12 20:59:33 -07:00
sk89q
ab46fd6244 Add Guava and jsr305 to dependencies. 2014-07-12 19:38:30 -07:00
sk89q
6deafa660d Cleanup code and add checkstyle configs from WorldEdit. 2014-07-12 19:31:43 -07:00
sk89q
0d2adc5707 Add more detail error messages when parsing regions file. 2014-07-11 13:20:42 -07:00
Albert Pham
b0ed119585 Merge pull request #263 from kukelekuuk00/patch-1
Add some command aliases to RegionMemberCommands
2014-07-06 15:55:43 -07:00
sk89q
894a42ea13 Merge pull request #316 from zreed/sqltableprefix 2014-07-06 15:37:26 -07:00
sk89q
d827e01760 Merge pull request #313 from TheCutter/master 2014-07-06 15:09:51 -07:00
sk89q
b298bedea0 Set saturation level to food level with feed flag. 2014-06-26 17:47:14 -07:00
eswick
3bfcd69fd9 Convert region ID to lowercase when saving polygon points to MySQL database. Check number of points in polygonal region before registering it.
When saving the points of a polygonal region to a MySQL database, the region ID was not converted to lowercase. If a region ID contained a capital letter, upon reload no points would be found, causing an out-of-bounds exception and essentially leaving WorldGuard unuseable.
2014-06-22 14:13:45 -04:00
Wizjany
c66adf0119 Removed sensitive info from reports. 2014-06-17 23:24:13 -04:00
TheCutter
2119b274fd Merge branch 'master' of https://github.com/sk89q/worldguard 2014-06-14 21:36:06 +02:00
wizjany
22f45c45ee Apply obsidian generator disabling to tripwire. 2014-05-07 13:09:06 -04:00
wizjany
0dd9729b35 Fixed logic error in blocked-cmds for real this time.
Closes WORLDGUARD-3050.
2014-04-29 12:01:38 -04:00
wizjany
ff46c2cf54 Fixed logic error in blocked-cmds checkings.
Closes WORLDGUARD-3048.
2014-04-26 11:31:24 -04:00
TheCutter
1537fc879e fixed indenation 2014-04-19 15:53:15 +02:00
TheCutter
f00352cde0 updates comments 2014-04-19 11:03:03 +02:00
TheCutter
fdc74b1c0d fixing syntax for guideline 2014-04-18 20:21:48 +02:00
TheCutter
83a3c61b66 fixed memory leak with closing mysql resources 2014-04-18 20:10:32 +02:00
wizjany
4422d536b7 Fixed a compilation error due to a sort-of-but-not-really-breaking bukkit change. 2014-02-28 21:21:00 -05:00
TomyLobo
4dd13bd925 Merge pull request #310 from jmhertlein/master
Fixed ProtectedCuboidRegion::getPoints() returning points in wrong order

Fixes com.sk89q.worldguard.protection.regions.RegionIntersectTest.testIntersection.
2014-02-28 08:19:30 +01:00
TomyLobo
4ce97bca0e Added a unit test for ProtectedRegion.intersectsEdges. 2014-02-28 00:48:40 +01:00
Joshua M Hertlein
ec9712f30e Fixed ProtectedCuboidRegion::getPoints() returning points in wrong order
ProtectedPolygonRegion returns points in an order such that you could play "connect the dots" and end up with the correct polygon. ProtectedCuboidRegion returns them in an order such that playing connect the dots gives you a Z shape. This breaks the intersectsEdges() function in ProtectedRegion when comparing cuboids. This commit causes ProtectedCuboidRegion::getPoints() to return them in an order consistent with ProtectedPolygonRegion, which makes intersectsEdges() work correctly.
2014-02-25 13:51:57 -06:00
wizjany
2df3290d38 Fixed snowman trails being treated as snow fall. 2014-01-11 16:08:26 -05:00
wizjany
4805df2f03 Fix being able to use bonemeal to turn tall grass into double plants. 2014-01-08 14:56:59 -05:00
Wizjany
ffda88f193 Fix number of args for migratedb command. 2013-12-14 17:21:07 -05:00
Dark Arc
96a69aa2ef Resolved an issue where explosions of type OTHER_EXPLOSION were ignoring the world config settings 2013-12-11 00:53:49 -05:00
wizjany
2d90fddbee Check for entities and projectiles removing items from frames too. 2013-12-09 17:46:33 -05:00
wizjany
bbd1a0ef10 Protect items in item frames in protected regions. 2013-12-09 08:40:28 -05:00
md_5
73b9a7fb0d Using checked exceptions for control flow is slow. Lets replace it with an isEmpty check. 2013-12-09 19:22:48 +11:00
wizjany
5f32ebe2de Fix compile-time error due to 23766f20 2013-11-17 21:16:51 -05:00
TomyLobo
d024ed7b81 typos, unused imports 2013-11-17 23:59:02 +01:00
TomyLobo
23766f20dd Transformed the BlockFadeEvent handler into a switch. 2013-11-16 17:35:35 +01:00
TomyLobo
31739c647b Dissolved a .* import.
Rationale: grepping for qualified class names
2013-11-16 17:35:35 +01:00
Dark Arc
faa016180a Added a config option to allow explosion flags to only prevent block
damage
2013-09-22 15:39:10 -04:00
wizjany
e26238e814 Added formatting codes, &k/l/m/n/o and &x (reset). 2013-08-31 10:07:46 -04:00
wizjany
f8ed1a3e3e Make /rg list default to own regions if the player doesn't have permission otherwise. 2013-08-27 23:36:01 -04:00
Wizjany
d47c255168 Check bypass perms for item-drop flag. 2013-08-20 17:03:00 -04:00
wizjany
d1e7796f81 Added allow-tamed-spawns setting, on by default.
This will stop WorldGuard from culling tamed animals
in regions with mob-spawning deny when they log in
with their owner.
2013-08-20 14:58:46 -04:00
wizjany
a15c9d289b There have been bigger non-backwards-compatible changes since. 2013-08-18 18:48:31 -04:00
wizjany
c0f95bebf0 Send item-use blacklist event when right-clicking entities. 2013-08-16 13:17:28 -04:00
wizjany
0a54779fc4 Added snow-fall-blocks option to config to restrict snow fall to certain blocks 2013-08-12 18:09:45 -04:00
wizjany
ac525958c5 Added config option and flag to prevent soil from drying naturally. 2013-08-12 18:06:31 -04:00
wizjany
458cf64501 Fixed addowner/addmember commands adding command artifacts.
Specifically, "-w <world>" will no longer be added when using it.
This requires WorldEdit with commit cd5f832 or newer.
Additionally fixed a typo: DefaultDomain.removaAll -> removeAll.
2013-08-03 09:46:29 -04:00
wizjany
4acef77623 Fixed milking cows in protected areas.
It seems that Bukkit changed the return of the bucket/itemstack
methods in the event, causing WG to think a different bucket was used.
2013-07-30 11:14:59 -04:00
TomyLobo
d38d7fc492 Changed entity report format slightly.
This makes it clearer to users what that floating point number means.
2013-07-30 12:15:28 +02:00
wizjany
2510c3eeb5 Allow players to add newlines (\n) via command, not just manually in yml. 2013-07-25 13:10:16 -04:00
wizjany
326d53fd09 Allow the console to load/save all region managers with one command. 2013-07-25 10:12:03 -04:00
sk89q
6f56cb29a5 Fixed -w flag for /rg load and /rg save. 2013-07-07 12:14:41 -07:00
sk89q
977c7d2f29 Changed DoubleFlag and IntegerFlag to take java.lang.Number objects in unmarshal(). 2013-07-07 11:45:22 -07:00
sk89q
a57c162cd8 Convert heal flags datatype from integer to double.
Existing data should be cast with no data loss.
2013-07-07 11:38:03 -07:00
wizjany
60c3ed4f6b Polish the fix from the last commit and straighten some other multiworld issues in the move handler. 2013-06-23 20:17:20 -04:00
wizjany
714e75eb95 Potential fix for broken multiworld states. 2013-06-23 16:35:57 -04:00
Wizjany
636819c801 Revert change to permissions node for flags.
region.flag.own/member/etc was region.flag.regions.own/member/etc
This shouldn't be changed in between, especially if we maintain compatibility with the other flag node (flag.flags).
2013-06-20 00:52:59 -03:00
wizjany
9a6c2e0685 Finish reverting changes from earlier 2013-06-10 23:12:06 -04:00
wizjany
736eecc13b Add config option to use player teleports for move events.
Additionally removed code duplication in Vehicle listener.
2013-06-08 12:04:58 -04:00