Commit Graph

15 Commits

Author SHA1 Message Date
BONNe 1991dc7236
Fixes failing test
Increase flag listener counter.
2022-06-14 09:09:06 +03:00
BONNe 85b52f4bfb
Implement new 1.19 materials and entities (#1990)
* Update to Spigot and Paper API 1.19 and Java 17

* Set minimal version to 1.18.

* Add breeding protection for Axolotl and Goats (1.18)
Add breeding protection for Frog and Allay (1.19)

* Clean up switch statement in BlockInteractionListener

* Add chest boat support to BreakBlocksListener.

Part of #1987

* Add powdered snow pickup with bucket protection.

* Add glow ink sac protection on signs.
Switch to SheepDyeWoolEvent as it now contains player variable.

* Clean up Hurting Listener

* Mark 1.16.5, 1.17 and 1.17.1 as incompatible.
Mark 1.18, 1.18.1 and 1.18.2 as supported.

Add 1.19 as compatible.
Part of 1987

* Add ChestBoat inventory protection.
Part of #1987

* Clean up LockAndBanListener

* Add MANGROVE_PRESSURE_PLATE protection.
Part of #1987

* Add Glow Item Frame protection to player interact event.

* Clean up MobSpawnListener

* Clean up ChestDamageListener

* Change from custom method to Tag.PRESSURE_PLATES to detect pressure plates.
Part of #1987

* Implement proper chest boat protection.
Part of #1987

* Move to 1.19 R1 world regenerator.
Part of #1987

* Add allay to the animal entity list.
Part of #1987

* Add axolotl and other fish scooping protection.
Part of #1987

* Fixes Bucket and Glass Bottle filling.

Buckets and bottles were not working since cauldron splitting by type. This change fixes that.

It also protects from filling bottles with water from water sources or waterlogged blocks.

* Remove 1.17.1 compatibility check for biome adapter.
Add cheezee 1.19.1 compatibility version.

* Fixes chest boat interactions.

Part of #1987

* Implement Allay protection.
New flag ALLAY is required to interact with allays.

Part of #1987

* Prevent visitors for being targeted by entities if ENTITY_ATTACK is enabled.

* Implement Sculk Sensor and Shrieker activation protection setting.

Part of #1987

* Add music discs to the LangUtilsHook
Part of #1987

* Fixes failing unit-tests.
2022-06-14 00:38:53 +03:00
tastybento 9e3a57248a Fix test by incrementing listener value check
There is a new listener now.
2021-07-06 14:55:19 -07:00
tastybento 17d9f1c3f8 Fix test 2021-02-14 12:53:38 -08:00
tastybento 2b5deb4133 Added unregisterFlag method to FlagManager
This was requested on Discord. Enables plugs or addons to tidy up flags
if they are disabled for some reason.
2020-07-02 16:05:42 -07:00
tastybento 02b16c233c Fixes tests. 2020-04-02 14:49:45 -07:00
tastybento 3f1d6d16ff Added Mockito.framework().clearInlineMocks() to all test classes per
https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2

This is just e defensive measure and may not have an affect on any
particular class.
2019-12-06 08:29:29 -08:00
tastybento 784988ca54 Test class cleanup. Use Bukkit direct calls instead of Bukkit.getServer 2019-10-18 19:33:24 -05:00
Florian CUNY ea12d8c167 Moved all the flags listeners to subpackages 2019-02-03 10:22:44 +01:00
tastybento 4e81baf45e Flags are requested from FlagManager not statically
Previous the Flags class was being used to grab all flags. This is wrong
because it may not contain all the flags that may exists, for example
ones registered by other addons. The correct way is to request flags
using the getFlag() method in the flags manager class.
This change was to prepare for the time when addons will register their
own flags with BentoBox.
2019-01-26 09:39:34 -08:00
tastybento 68d6b008f4 Fixed tests by fixing the default rank value.
Flag was marked as deprecated, which may be okay, but because it caused
a lot of warnings in the tests because they bypass the builder I removed
the deprecation but kept the warning in the JavaDoc.
2018-12-23 22:15:37 -08:00
Florian CUNY 3e284b90eb Fixed protection listeners not being registered to Bukkit
Basically removed the "plugin loaded" limitation.
2018-11-03 11:31:08 +01:00
tastybento 765268aa25 Code cleanup using Intellij 2018-08-04 21:50:10 -07:00
tastybento 4fab167d10 Fixed build errors.
Reverted back the generic commands for use by addons.

WIP - some tests need fixing for 1.13.
2018-08-01 08:55:48 -07:00
Florian CUNY 3473fb48e6 Renamed 'world.bentobox.bbox' to 'world.bentobox.bentobox' 2018-07-31 18:03:32 +02:00