Commit Graph

189 Commits

Author SHA1 Message Date
wizjany
8aa4c25186 Seeds don't modify blocks.
They already throw place events.
2019-06-04 17:20:42 -04:00
wizjany
026361ae0b Exclude some transitive deps. 2019-06-04 00:00:12 -04:00
wizjany
426a709e43 Fire off block place for items that modify blocks. 2019-06-02 19:33:42 -04:00
wizjany
903a831248 Fix dispenser workaround. 2019-06-02 12:12:57 -04:00
wizjany
1792bcb18a
Fail (slightly) faster. 2019-05-31 14:08:45 -04:00
wizjany
23ab79c999 Wrap and unwrap.
Exceptions are fun.
2019-05-29 21:38:31 -04:00
wizjany
a29afe8cc1 Also apply crop-growth to fully grown stems creating "fruit". 2019-05-27 20:51:28 -04:00
wizjany
029f867a41 Add crop-growth flag/config option.
Fixes WORLDGUARD-4088.
2019-05-27 20:42:17 -04:00
wizjany
ce35798f67 Fix issues with sometimes-loaded worlds in location flags. 2019-05-26 02:19:33 -04:00
wizjany
0f989fc1b4 Small config cleanup. 2019-05-25 09:59:52 -04:00
wizjany
4871752f49 Switch to useInteractedBlock/useItemInHand for PlayerInteractEvent.
Bukkit has very odd behavior regarding cancelling this event.

Fixes WORLDGUARD-4090.
2019-05-22 18:21:37 -04:00
wizjany
4b320ab733 Workaround CraftBukkit bug causing BlockSpreadEvent to report air. 2019-05-21 19:42:56 -04:00
wizjany
2b854f0d72 Use isTagged instead of getValues.
The implementation of getValues is quite atrocious for this purpose.
2019-05-20 23:56:37 -04:00
wizjany
36d25c08c6 Specify materials explicitly. 2019-05-17 23:52:21 -04:00
wizjany
d6c2504bbf Make CPU profiling interval configurable.
Also lower the default to something more sensible.

Also cleanup unused imports.
2019-05-14 19:01:47 -04:00
wizjany
f2d2f47394
Don't fail hard in 1.14. (#409)
Prevent lots of console spam and lack of protection.
2019-05-14 12:33:56 -04:00
wizjany
d542ba78ff Remove AsyncCommandHelper for new AsyncCommandBuilder.
Helper suffers from race conditions for short-lived tasks, leading to
some poor UX conditions such as errors not propagating to the user
(because the exception handler wasn't attached to the future yet), or
lack of success messages.

This commit replaces that system by a Builder which takes a callable to
begin, and then takes supervisor, delay message, and the success and
failure messages and handlers as parts of the builder. The success and
failure handlers wrap the callable itself before submitting to the
executor so they will always be run. The supervisor and delay are added
as listeners to the future since they aren't required if the task is
sufficiently short-lived (and to maintain compatibility with the classes
which are now in WorldEdit).

The builder also supports Components for success and failure messages,
as well as consumers of the callable's result or exception for better
customization of output, instead of having to rely on adding a callback
to the future.

The future is still returned for certain special usages.
2019-05-12 14:40:09 -04:00
wizjany
e7ef6af012 Handle BlockExplodeEvent as other explosion.
Also misc cleanup.
Closes #407, WORLDGUARD-3843.
2019-05-12 00:17:34 -04:00
isokissa3
1ffa4b48b8 Enderpearl & chorus-teleport flags should be checked before handlers
Before every handler would have been called, making them believe that the entry was successful
2019-05-11 14:36:15 -04:00
wizjany
ec4c53da77 Minor cleanup. 2019-05-11 11:30:45 -04:00
wizjany
5180673878 Treat inventory minecarts under chest-access.
Fixes WORLDGUARD-3585.
2019-05-05 16:14:35 -04:00
wizjany
82451595cb Add greeting-title and farewell-title flags.
Totally didn't accidentally include the flags in last commit.
Closes WORLDGUARD-4008.
2019-05-04 22:56:55 -04:00
wizjany
c516eb2174 Add frosted-ice-melt flag, and frosted-ice-form flag.
Frosted-ice-form is checked with build, meaning it can be set to allow
for non-members to use frost walker, deny for members to not be able to
use frost walker, or none to respect membership.

Reverts behavior of ice-melt flag to pre-7.x behavior.
Apparently this wasn't covered before.

Fixes WORLDGUARD-4077.
Closes #364.
2019-05-04 20:52:28 -04:00
wizjany
5b0bfd50d3 Fix build. 2019-04-28 21:06:12 -04:00
wizjany
2aee42cbf2 Clean up gradle dependencies. Tell me if this breaks downstream builds.
Either I broke something, or you were using WG's jar for some dep that we
don't consider to be API.
2019-04-28 20:36:28 -04:00
wizjany
3b8b67da84 Add logo to source, remove outdated notes. 2019-04-26 15:06:47 -04:00
wizjany
d9b09ab7f1 Damage is already handled and entering is handled via interact.
This method is redundant.
2019-04-25 11:13:30 -04:00
Matthew Miller
50e62bd0e7
Update text for WorldEdit changes (#401)
* Update for text in WE

* Properly write the legacy converter

* Made the text less thicc

* Update for new text API in WE
2019-04-25 19:40:01 +10:00
Matthew Miller
abfe3a2eb9 Fixed chipped and damaged anvils not being protected from use/interact 2019-04-23 12:36:20 +10:00
wizjany
e94af1d77e Treat kelp as vines for vine-growth.
Closes WORLDGUARD-4068.
2019-04-19 23:25:26 -04:00
wizjany
1dbd25d15e Add block-trampling flag.
Applies to turtle eggs and farmland.

Closes WORLDGUARD-4067, WORLDGUARD-3666.

Also do some misc cleanup.
2019-04-19 23:14:14 -04:00
wizjany
c3675a10a2 Force eject players from vehicles if the get too far.
Fixes WORLDGUARD-3936.
2019-04-17 21:24:10 -04:00
wizjany
ef2783f30a Add snowman-trails flag.
Closes WORLDGUARD-3566, #378.

Also clean up some listeners, and the flag listing.
2019-04-17 21:23:29 -04:00
wizjany
2c2b475513 Track AreaEffectCloud cause.
Also a bit of cleanup in EventAbstractionListener.

Fixes WORLDGUARD-3776.
2019-04-17 20:16:38 -04:00
wizjany
0ebb4e0ffa Formatting fix. 2019-04-14 11:34:54 -04:00
KisaragiEffective
47fb9bd30d Remove redudant type parameters. 2019-04-08 22:04:02 +09:00
wizjany
ca92464cca Revert "Load before worlds do."
This reverts commit 397a71a602.

Apparently this doesn't actually fix the issue. Some things
just straight up happen without sending events to plugins and there's
nothing we can do about it.
2019-04-06 17:33:56 -04:00
wizjany
453740b56a Don't whitelist droppers and hoppers.
By the time this code is called, the performance hit happened already.
There's a separate way to whitelist these that still allows keeping
the protections active.
2019-04-06 14:27:55 -04:00
wizjany
397a71a602 Load before worlds do.
When worlds first load, events start happening before plugins normally
(POSTWORLD) enable. This means that regions and other protections won't
be active when these events are called.

This shouldn't break anything that depends on us, e.g. custom flags,
since our API contract already states that should be done on load,
and all plugins are loaded on startup (just not enabled).
2019-04-05 22:03:29 -04:00
wizjany
44c4e5816f Move log message about loading regions to proper location. 2019-04-02 17:18:44 -04:00
Matthew Miller
c7ed49388c Make 'invincibility-removes-mobs' affect projectile shooting entities. 2019-03-31 21:14:29 +10:00
wizjany
c2f96c9587 Checkstyle pls.
That was the auto-folder's fault.
2019-03-30 18:39:55 -04:00
wizjany
c181a86fd1 Better wrapped player usage. Requires latest WorldEdit build. 2019-03-30 18:09:27 -04:00
wizjany
e2ffab5ee8 Cleanup last commit. 2019-03-28 23:07:48 -04:00
wizjany
8a3f066023 Turtle eggs throw PIE when being broken. 2019-03-28 23:02:28 -04:00
wizjany
d091cb578f Don't check spaces that won't get moved into by pistons.
Fixes WORLDGUARD-4064.
2019-03-20 21:50:00 -04:00
wizjany
b2fe4c9c71 Move tests to core.
(None of them are implementation-specific)
2019-03-20 17:50:12 -04:00
wizjany
10100bd194 Remove deprecated flags. Make sure we register our flags first.
Also make enderpearl + chorus fruit flags respect entry/exit deny message flags.
2019-03-14 18:07:41 -04:00
wizjany
e091a59063 Remove ender-chest protection.
Enderchests are not modified on use. In fact, they don't even
have inventories, so they are not modified at all. To deny usage,
the interact flag must be denied, since they most closely fit in
a category with other interact-covered blocks (and not use-covered
blocks, since using them does not change the region in any way).

This commit reverts f7d36b and ea4f4c0.
2019-03-10 19:09:36 -04:00
wizjany
ee7dc27283 Actually report game rule values.
Was just "<Recursive>" before, which is pretty useless.
2019-03-07 17:44:20 -05:00