Commit Graph

986 Commits

Author SHA1 Message Date
tastybento 4ef974fbde Better error for unknown icon material, and test class 2023-07-08 08:52:20 -07:00
tastybento 2c8db2a797 Use any() which now is a varArg tester. Remove deprecation 2023-07-08 08:37:10 -07:00
tastybento 9334858675 Added IslandDeletehomeCommand test class 2023-07-03 16:11:37 -07:00
tastybento 7d25aff28f Added test class for DefaultPlayerCommand 2023-07-02 15:52:20 -07:00
tastybento f47e87af82 Added test class for PanelItem 2023-07-02 15:10:23 -07:00
tastybento 9bd0104a3d Put island deletion under one class manager
The goal is to make BentoBox less of a monster class and have fewer
dependent classes.
2023-07-01 12:49:18 -07:00
tastybento e846d26fab Fix test
Test doesn't do anything though...
2023-06-28 21:02:39 -07:00
tastybento 0038c3f2b7 Remove boolean return for listener. Check event cancelation instead. 2023-06-24 15:22:23 -07:00
tastybento 66d27e7070
Merge pull request #2148 from BentoBoxWorld/sculk_cal
Adds calibrated sculk sensor to protection
2023-06-24 12:55:36 -07:00
tastybento 1a416d9a23 Fixes #2137 adds calibrated sculk sensor and test class 2023-06-24 12:11:08 -07:00
tastybento 89a9b13d81 Hidden commands can be seen by console, but are hidden from players 2023-06-24 10:40:44 -07:00
tastybento a7ffb79f1d
Merge branch 'develop' into bbox_perms_command 2023-06-24 10:15:34 -07:00
tastybento 0856d48470 Proactively clear Users before tests just in case. 2023-06-24 10:13:11 -07:00
tastybento 4d295068cf Fix onlyConsole usage and added test class 2023-06-24 09:45:40 -07:00
tastybento bcb4ed28b8
Fixes #2142 (#2144)
Fixes the logic and adds a bunch of tests to prove the logic works.
2023-06-21 08:15:53 +03:00
tastybento a90a00b09b Fix new permission tests 2023-06-19 09:36:45 -07:00
tastybento 5a52978803 Add perms test for admin teleport command 2023-06-18 13:35:16 -07:00
tastybento 2672ee5d1b Handle Boats and other Materials for 1.20. Uses Tags a lot.
May break compatibility with older server versions.
2023-06-10 21:31:39 -07:00
tastybento e4a3891590 Add new IslandNameEvent and test class for command 2023-06-06 20:38:59 -07:00
tastybento 8f954090e7 Fixes VisitorKeepInventory to disregard coops and trusted
#2126
Also fixes some tests.
2023-05-13 09:20:47 -07:00
tastybento b4737f104c Implements HARVEST and CROP_PLANTING protection flags
Requested by #2113
2023-04-07 20:51:59 +01:00
tastybento 073f3a49d5
Adds API to enable translations to be set and specific API for flags (#2109)
This was a request on Discord so that plugins can set flags and set the
name and lore for them too.
2023-03-26 10:06:38 -07:00
tastybento 6894695024 Clean up test classes; use latest API 2023-03-23 11:02:08 -07:00
tastybento ca604f893c
Relates to #2104. Adds user.displayName() as a placeholder option (#2108)
* Relates to #2104. Adds user.displayName() as a placeholder option

* Fix test
2023-03-18 10:27:50 -07:00
tastybento 3285ef1ad2 Fix and enhancement for #2105 2023-03-17 20:45:15 -07:00
tastybento 70f044265a Fix test - 54 flags 2023-03-13 20:42:26 -07:00
tastybento 2940d2e492 Add cheat flag to prevent Endermen from teleporting
Fixes #2105
2023-03-13 20:17:03 -07:00
tastybento 2c283ae3a9
Javadoc and other cleanup from code analysis (#2099) 2023-02-26 17:48:37 -08:00
tastybento 1b81e74f4c Evaluates banned commands with spaces
Addresses #2092
2023-02-20 09:59:26 -08:00
tastybento 8276406f9f Fix runCommands method
Note to future self, don't remove Util methods because someone might be
using them!
2023-02-12 08:22:22 -08:00
tastybento 5eaf54e905 Added AdminBlueprintLoadCommand test class 2023-02-11 15:47:52 -08:00
tastybento 04545e676f AdminBlueprintDeleteCommand test class. 2023-02-11 14:57:42 -08:00
tastybento 08a1ad8126 Added AdminBlueprintCopyCommand test class 2023-02-11 14:46:34 -08:00
tastybento 79d56a5cef Added test class for AdminBlueprintSaveCommand 2023-02-11 12:03:16 -08:00
tastybento f93c49184f Added AddonDescription test class 2023-02-11 10:11:51 -08:00
tastybento 6c1bcdec05 Added test class for IslandChunkDeletionManager 2023-02-08 20:23:19 -08:00
tastybento a793a33758 Minimal test class for BlueprintPaster 2023-02-08 19:53:16 -08:00
tastybento a703499817 Added test class. 2023-02-08 19:16:32 -08:00
tastybento c6fc42846a Remove unused imports 2023-02-05 10:15:34 -08:00
tastybento 0c29d0b5dd
Uses seed worlds for deletion purposes (#2084)
* Uses seed worlds for deletion purposes

* Use Flat type

* Implement the superflat saver

* Fix nullable issue

* Fix tests.

* Fix code smells
2023-02-04 18:37:06 -08:00
tastybento 7040047fcb Fix broken test for IslandRespawnListener 2023-02-04 10:37:02 -08:00
tastybento a604d5cf82
Add [owner] in command placeholders #2080 (#2081) 2023-01-31 07:13:01 -08:00
tastybento bbb8207cf0 Teleportation was processed for entities even if it was switched off
Addresses #2078

Added test class to cover some of the logic in the teleportation class.
More tests can be written to cover the various outcomes.
2023-01-28 16:04:52 -08:00
tastybento 8e40bf9dcf Added more validation for addon.yml and test class 2023-01-02 09:31:16 -08:00
tastybento f545a4576e Remove unused comment 2023-01-01 00:19:10 -08:00
tastybento ab434b63fa Completed tests for User class 2023-01-01 00:17:30 -08:00
tastybento 0bffe3806a Fix tests 2022-12-31 18:19:32 -08:00
tastybento 056cff4b6f
Code clean up from Sonar Cloud analysis (#2068)
* Code clean up from Sonar Cloud analysis

* Fix tests

* Remove code smell

* Rename "island" which hides the field declared at line 25.

* Removed code smells.

* Rename variable record to rec

Renamed "record" variable to not match a restricted identifier.
Restricted Identifiers should not be used as identifiers. "record" is
using in Java 16.

* Added private constructor to prevent instantiation of static class

Changed variable name to rec instead of restricted "record".

* Remove Blueprint code smells.

* Use a record for database settings constructor

Code smell: Methods should not have too many parameters. I'm not sure
what methods are using this class though.

* Update MyWorlds version

The POM for MyWorlds is invalid and causes a warning, but this still
persists with this version.

* Extracted nested try block into a separate method.

Makes it clear when reading the code what might be caught

* Extracted nested try block into a separate method.

* Fixed JavaDoc /** instead of just /*

* Extracted nested try block into a separate method.

* Refactored to not assign loop counter from within the loop body.

* Better delete option. With results.

That said, this is legacy code to handle an issue that occurred a long
time ago and this whole set of code can probably be removed.

* Catch Exceptions not Throwable

* Log error with BentoBox logError

* Use computeIfAbsent

Using these instead leads to cleaner and more readable code.

* User can no longer be null

* Added the missing @Deprecated annotation and @since ref

* Added @since reference

* Merge if statements

* Use BentoBox error logging.

* Added JavaDoc @since

* Remove deprecated class and move used class

* Remove deprecated WoodType and use Type.

* Remove unused import

* Extracted nested try block into a separate method.

* Comment empty default statement

* Clean up logic; avoid switch

* Use Java instead of Guava

* private constructor to hide the implicit public one.

* Private constructor to hide the implicit public one.

Merged if statement.

* Add comment

* if merge

* Make variable constant

* Remove unused imports

* Remove deprecated and unused method

* Remove unused import

* Typo

* Remove instanceof and cast

* Remove superfluous null check

* Put constant at bottom of file because @BONNe likes it there.

* Simplify particle validation code
2022-12-31 16:41:17 -08:00
tastybento 36ae34da5d
2049 trees growing outside range (#2050)
* Fixes #2046. Handles null players for placeholders.

* Remove unused import

* Fixes #2049 for adjacent island spaces

This also deletes blocks in the event rather than setting them to AIR as
was done previously.
2022-12-30 09:37:18 -08:00
tastybento 18983e5570
Code cleanup (#2065)
* Cast operands to (double)

* Code clean up from static analysis

* Revert the GitHubAPI version change because it didn't work.
2022-12-29 10:01:25 -08:00
tastybento e2b5545f3f Expand remove mobs world setting to include respawning protection
Addresses #2058

We already have a option to protect against hostile mobs when logging in
or teleporting, but not respawn. This adds protection to that. Admin can
turn off the option if they want it more hard core.
2022-12-04 21:06:14 -08:00
tastybento 69fa951907 Handles null player world better on joining server
In theory, this should not be required, but it seems that a player's
world might be null in some edge cases. Alternatively, the Util.getWorld
function can return a null if the player was in a nether or end but that
does not have a corresponding overworld.
Addresses #2057
2022-12-04 20:36:41 -08:00
tastybento 7aa1e2da89 Fix to handle kelp and bamboo spread.
Addresses #2053. This is actually due to a server bug
https://hub.spigotmc.org/jira/browse/SPIGOT-5312. This change uses the
BlockSpreadEvent to trap kelp and bamboo and bamboo sapling.
2022-11-26 17:36:19 -08:00
tastybento d50208c0e1
Add and fix tests for end gateway and portal. (#2044) 2022-10-31 17:59:04 -07:00
BONNe 369001d368
Rework SQL database implementation. (#1993)
This change switches from plain JDBC driver implementation to a HikariCP Pool implementation.

Pool Implementation is complete for PostgreSQL and SQLite, while MariaDB and MySQL implementation still uses JDBC drivers, however with HikariCP pools.

Also, I added extra properties for SQL databases, where users could specify their own datasource properties.
2022-10-04 12:31:51 +03:00
BONNe 173808b787
Adds glow berries protection. (#2027)
Uuups... someone forgot to add them.

Fixes #2020
2022-09-29 18:58:53 +03:00
BONNe 35ce1a7d81
Rework blueprint and blueprint bundle names. (#2026)
* Fixes issue when blueprint clipboard was stuck after saving.

The issue was that Map#putIfAbsent still creates a new task, even if object is already in map. The usage requires to use Map#computeIfAbsent.

* Rework blueprint and blueprint bundle names.

There was an issue with using non-english characters in blueprint names. It was not possible, as all chars for names were converted to lower cased english letters. It included display names.

I reworked it a bit and now it should be possible to set non-english names for bundles and blueprints.

Fixes #1954
2022-09-29 18:44:07 +03:00
BONNe 9088ea4b80 Fix failing unit-test 2022-08-26 12:43:05 +03:00
BONNe 50bc236bbc Fix failing unit-test 2022-08-26 12:27:11 +03:00
BONNe 64b4c43742 Revert 6e734fc343
The commit was wrong. Protection range should not be decreased, as that would mean that max X and Z blocks are not included in island protection bounding box.
This change is the same as 3c65194dfb but was missed when it was fixed.

Relate to #473
2022-07-25 00:16:16 +03:00
BONNe db323390cf
Implements adding unknown default island flag values in settings. (#2001)
* Implements option to define non-existing flags in WorldSettings.

This change adds 2 new methods in WorldSettings:
* WorldSettings#getDefaultIslandFlagNames
* WorldSettings#getDefaultIslandSettingNames

These methods replace getDefaultIslandFlags and getDefaultIslandSettings methods.
Default implementation just reads values from replaced methods.

Fixes #1830

* Implement conversion from flag id to actual flag object.

Replaces flag assignment to new island based on flag id's.

Fixes #1830

* Switch from Flag object to String object in Island class.

This switch allows to keep flags that are not present in current BentoBox installation. Otherwise, unknown flags may cause an issues.

Fixes #1830

* Implement FlagBooleanSerializer.

This serializer converts input map of String, Boolean to map of String, Integer.

This map is used to read island setting flags, and integer value is not classic boolean values. (0 for true and -1 for false).

Fixes #1830
2022-07-06 20:20:08 +03:00
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
BONNe 6f2a9929c0
Fixes Glowing Item frames protection (#1985)
* Fixes glowing item frame protection.
Glowing item frames were not protected.

Fixes #475

* Fixes check-style.
2022-06-05 21:52:37 +03:00
BONNe 3ab7ac8484
Implement ability to create ItemStacks with Custom Model Data. (#1981) 2022-05-23 20:46:02 +03:00
BONNe b3e55a7b55
Fixes failures in obsidian cooping listener. (#1965)
Failures happened after implementing #1964
2022-04-11 08:23:13 +03:00
BONNe ad0931ffcb
Fixes kick command (#1960)
PR #1957 broke kick command and noone could kick players from teams.
This should fix it.
2022-04-03 08:12:41 +03:00
tastybento 4e8ca6d22c Fix for kicking offline players
https://github.com/BentoBoxWorld/BentoBox/issues/1950
2022-03-18 13:59:41 +00:00
tastybento 546cf2c9b9 Fix for random test failures. 2022-03-12 19:12:13 -08:00
tastybento 945bfa66ee Adjusted test to try to avoid errors 2022-03-12 12:20:27 -08:00
tastybento cef31306ac Fix JoinLeaveListenerTest 2022-01-28 21:54:30 -08:00
tastybento ee94a49e85 Fix IslandInfoCommandTest 2022-01-28 21:40:45 -08:00
tastybento 78a3c49361 Fix AdminInfoCommandTest 2022-01-28 21:39:06 -08:00
tastybento 937e8bf614 Fix island test and max ever range bug 2022-01-28 21:33:39 -08:00
tastybento 2f0869fd6e More voiding of event listeners
https://github.com/BentoBoxWorld/BentoBox/issues/1918
2022-01-22 18:04:00 -08:00
tastybento d14ad977ab Clean up imports. 2022-01-22 13:14:57 -08:00
tastybento 9062aab34b Change behavior of teleporting to default nether
If create-and-link-portals is true, then teleporting to the nether will
not go to a central portal point and instead create a portal in the
nether at the same coordinates as the portal in the overworld.
Teleporting back will not be affected.

https://github.com/BentoBoxWorld/BSkyBlock/issues/464
2022-01-22 13:14:34 -08:00
tastybento 94b982f644 Fix tests
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1918
2022-01-22 12:16:27 -08:00
tastybento 5ab89ac63d Fix tests 2022-01-15 16:20:12 -08:00
tastybento 721f0271aa Dynamically grab flags
https://github.com/BentoBoxWorld/BentoBox/issues/1915
2022-01-09 19:44:44 -08:00
tastybento bfbeb7964b Fix tests 2022-01-02 12:25:35 -08:00
tastybento 5c8af0c1df Fix tests 2022-01-02 12:21:28 -08:00
tastybento 728c60d472 Fix failing tests. 2022-01-02 12:19:43 -08:00
tastybento 20a6846523 Remove deprecated methods 2022-01-01 18:05:40 -08:00
tastybento 796114eeef Fix tests 2022-01-01 18:01:50 -08:00
Huynh Tien ce1d8e5117
Rework the chunk deletion (#1897)
* delete island one by one

* register before IslandDeletionManager

* optimize imports

* setting

* just some indents

* config

* run synchronously

* a bit reformat before recoding

* proper delete chunks

* comment

* combine the task call

* expose the NMS Handler

* don't have to try-catch this

* we know that this is final

* expose copy chunk data so that it can be overridden

* Don't have to use Vector

* set block from minimum height

* remove NMS and use fallback if not set

* only get the height once

* fix test
2022-01-01 17:38:27 -08:00
tastybento acba363523 Added why to VisitorKeepInventory and test class
why reports can now be made by subclasses of FlagListener
2021-12-21 10:12:20 -08:00
tastybento 7fbae58bb2 Make check an NPE check and failure 2021-12-20 15:30:29 -08:00
tastybento 3ece0d049a Added test for SafeSpotTeleport and removed old test 2021-12-20 09:50:45 -08:00
tastybento f049fc6941 Added SafeSpotTepeortTest 2021-12-20 09:46:04 -08:00
BONNe 3b64973c2b
Make BlockEndDragon support custom max world height (#1888)
Use max world height instead of magic 255 value.
2021-12-06 11:49:22 +01:00
tastybento 6b6ab711e5 Fixes console teleporting.
https://github.com/BentoBoxWorld/BentoBox/issues/1877
2021-11-11 15:36:49 -08:00
tastybento d3e7b55be5 Fix test
IWM inWorld must return true
2021-10-08 17:27:52 -07:00
tastybento 665724e825 Fix test
IWM inWworld needs to return true
2021-10-08 17:25:20 -07:00
tastybento fe2e9e1a9e Fix tests and refactor code 2021-10-08 17:15:41 -07:00
tastybento b5d9d2e52e API: Require getWorldSettings to be a game mode world 2021-10-03 20:33:50 -07:00
tastybento cfad9879a5 Refactored setowner command and added test class 2021-10-03 19:20:45 -07:00
tastybento 3c65194dfb Fix missing edge deletion of island.
The bounding box was erroneously being made smaller when it was not
required because the inBounds check does that already.

https://github.com/BentoBoxWorld/BentoBox/issues/1863
2021-10-03 15:50:18 -07:00
tastybento a1c3f78293 Fix tests 2021-10-03 15:46:11 -07:00
tastybento d780bbd4c0
1.18.0 (#1860)
* Mark all home-related methods in PlayersManager as deprecated.

* Fix bug where maxHomes was shown as null

* Version 1.18.0

API changes may break compatibility with Addons.

* Remove usage of deprecated methods except for migration code.

* Prevent NPE. Check isPlayer instead of getWorld() == null

* Fix nullability issue and added to @Deprecated annotations

* Added deprecation notices to home methods in Players
2021-09-26 13:35:18 -07:00
tastybento f66eeed4a1 Version NPE protections. 2021-09-25 16:42:54 -07:00
tastybento 3236c68e5c Fix test. 2021-09-25 09:42:51 -07:00
tastybento 500f7292c6 Fix tests. 2021-09-25 09:34:02 -07:00
tastybento af3c0a874c Added API to get a translation without color conversion
It may be necessary to read the translation without converting colors to
Bukkit colors.
2021-09-25 08:47:14 -07:00
tastybento 0a4fc83218 Fix tests - just counts of events. 2021-09-25 08:33:07 -07:00
tastybento 8b474833e1 Fix IslandSethomeCommand test 2021-09-25 08:07:15 -07:00
tastybento 53f02ae686
Npe squashing (#1857)
* Fix hanging [uuid] in info.

* NPE checking

* Make getProtectionCenter nonNull

* More NPE fixes.

* Fix test

* Make getPlayer() and getOfflinePlayer() nonNull returns

This requires addons to not use null checks and instead us the isPlayer
or isOfflinePlayer methods.

* NPE blockers

* Deprecate CompositeCommand isPlayer method.

* Fix test
2021-09-18 17:59:32 -07:00
tastybento b247b360bf Fix test. 2021-09-18 12:25:25 -07:00
tastybento 02a14cab6e
Requires nonNull parameters for User.instanceOf (#1852)
* Requires nonNull parameters for User.instanceOf

The only reason why User.instanceOf was returning a potential null was
if the parameter was null. Further absolutely no null checking was being
done, so the assumption was that User.instanceOf should never return a
null. This corrects the annotations and requires non-Null parameters.

* Remove null player test
2021-09-16 16:41:27 -07:00
tastybento 0e744cae81 Added test class for Island. 2021-09-12 17:35:52 -07:00
tastybento 3dd9e973fb Island range perms could be 2x island distance
This could allow protection ranges to be much greater than the island
range and therefore overflow into adjacent islands.

https://github.com/BentoBoxWorld/BentoBox/issues/1851
2021-09-11 16:50:43 -07:00
tastybento 28cecc2658 Fix test failure in InvincibleVisitorsListenerTest 2021-09-04 15:43:41 -07:00
tastybento e77a40f0cb Fix PVPListenerTest
Visitors are no longer invincible when on a PVP island.
2021-09-04 15:12:26 -07:00
tastybento 0f7ca6ac60 Slimmer trimmer island info for players.
https://github.com/BentoBoxWorld/BentoBox/issues/1501
2021-09-04 10:02:37 -07:00
tastybento 547c266975 Extracted island info from the Island object.
This is in preparation to have a different info for players than admins.

https://github.com/BentoBoxWorld/BentoBox/issues/1501
2021-09-04 09:46:28 -07:00
tastybento 5bb12d53bd Prevent home teleport when already home teleporting
Home teleporting is async so it's possible to issue the command multiple
times. This puts a flag in so that if a playeer is mid-teleport, then
issuing the go command will just repeat the text that the player is
teleporting home.

https://github.com/BentoBoxWorld/BentoBox/issues/1637
2021-09-03 15:39:08 -07:00
tastybento 23857501f5
Static code analysis (#1844)
* StringBuffer (Java 5) may be declared as StringBuilder

* Replace map with flatMap

* Use instanceof naming

* No need to specify paramter types.

* Remove verbose code

* Fix JavaDoc issues

* Make internal class a record.

* Remove unused import.

* Make internal class a record.

* Made internal class a record.

* Removed unused import

* Fix typos

* Fix typo in test.
2021-08-29 18:17:38 -07:00
tastybento 9dc4ebc2d1
Make variables final if they can be. (#1843)
* Make variables final if they can be.

* Do not use final so that test can pass.

For testing, we use a trick to set this variable, but it won't work if
it is final. Right now, I'd like to keep the test.
2021-08-29 18:17:21 -07:00
BONNe fa41abc062
Implement Flag icon changing via Locales file. (#1829)
This commit contains 2 changes:
- An option for Flag to use icon that is defined in locales after "icon" string.
- An option for ItemParser to parse icon or return given value, if parsing was not successful.

The flag option is not ideal, but it is simpler and easier to maintain then adding new config section where icons can be changed, as the locales file already contains a lot of info about each flag.
2021-08-29 13:30:45 -07:00
tastybento 6c75733417 Fix color test. 2021-08-21 09:23:18 -07:00
tastybento b906f5561a
Hex pr 1820 (#1822) 2021-08-19 12:09:23 -07:00
tastybento 32638e7a87
Prevents repeated portaling when nether is disabled. (#1826)
* Prevents repeated portaling when nether is disabled.

https://github.com/BentoBoxWorld/BentoBox/issues/1782

* Fix test
2021-08-15 17:05:20 -07:00
tastybento 6b839d9c69 Prevent bucket duping when scooping obsidian Part 35
https://github.com/BentoBoxWorld/BentoBox/issues/1825
2021-08-14 16:23:13 -07:00
BONNe 56a1fdb55a
Improve ItemParser code. (#1821)
* Improve ItemParser code.

Add ability to parse text if Material is just a single string.
Add ability to parse player heads.

Add comments to the code.

* Fixes failing test.
2021-08-08 10:05:14 -07:00
tastybento 9e3a57248a Fix test by incrementing listener value check
There is a new listener now.
2021-07-06 14:55:19 -07:00
Justin 0f7866a00b
Parent/sub-flag support, split up and designate CONTAINER flag as parent flag (#1784)
* Split CONTAINER flag into multiple flags

CONTAINER split into
- CONTAINER (Chest/Minecart Chest)
- BARREL (Barrel)
- COMPOSTER (Composter)
- FLOWER_POT (Flower Pot)
- SHULKER_BOX (Shulker Box)
- TRAPPED_CHEST (Trapped Chest)

Fixes #1777

* Add subflag support

* Create container parent flag, chest subflag

* Remove extra string from when CHEST was CONTAINER

* Fix incorrect flag specified on fired event in IslandToggleClick

* Add missing world subflag event firing

* Remove extra import
2021-07-06 13:41:23 -07:00
tastybento c89fd03833 Fixed tests 2021-06-20 16:24:36 -07:00
tastybento c2e832095a
Minecraft 1.17 support (#1781)
* Java 16 preliminary branch.

This compiles, but junit tests fail all over because there is a lack of
Java 16 support right now.

* Use Java 16

* 1.17 WIP

* Require 1.17

* Fixes tests.

* WIP fixing tests

* Exclude maven from shading

* Try update snapshots to build action

* Try repo on command line

* Remove reference to shade plugin in dependencies
2021-06-20 12:18:10 -07:00
tastybento cc43dbfabe Fix slime split test as it is allowed. 2021-06-12 09:25:29 -07:00
tastybento e472e07c34 Fixes Invincible Visitor settings panel
https://github.com/BentoBoxWorld/BentoBox/issues/1762
2021-05-22 17:41:47 -07:00
tastybento 17af44e67a Fix GameModePlaceholderTest 2021-05-09 13:10:37 -07:00
tastybento ac8458fd3c Add IslandHomesCommand
https://github.com/BentoBoxWorld/BentoBox/issues/1737
2021-04-07 21:36:49 -07:00
tastybento c85f3b9af2 Fix test 2021-03-27 18:21:32 -07:00
tastybento 9220f9652b Fix broken tests. 2021-03-27 17:20:43 -07:00
tastybento c6e2a9bd66 Admin teleport now goes to island spawn locations if they exist 2021-03-27 09:23:24 -07:00
tastybento ed46695546 Added teleport method test to DelayedTeleportCommandTest. 2021-03-21 15:58:10 -07:00
tastybento 9e0fdbd210 Add Util method to enable multi-lingual broadcasts. 2021-03-21 09:04:30 -07:00
tastybento 8f767d5e44 Fix tests - event is canceled now.
Change done here: 592b4e3d1f
2021-03-18 18:45:05 -07:00
tastybento 87bdee0946 Return island protection center instead of island logical center
IslandsManager.getIslandLocation(world, uuid) is used to find the
starting point for the island home if a safe home for players cannot be
found. It returns the island center location but should return the
center of the island protection because that can now be in a different
location.
2021-03-17 15:18:55 -07:00
tastybento 6c775329d0 Fix InvincibleVisitorsListenerTest. 2021-03-14 13:48:31 -07:00
tastybento d97d15d47a Added locale strings for the DamageCause enum. Used in InvincibleVistors
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1705
2021-03-14 10:18:33 -07:00
tastybento 6849c2a8bd Delete backup database during tests. 2021-03-07 11:34:30 -08:00
tastybento e4a8d705f1 Fix IslandTeamCoopCommand test. 2021-03-06 14:12:46 -08:00
tastybento b6a69d0c90
Switch to island homes from player homes. (#1689)
* Switch to island homes from player homes.

Stores home locations and max homes in the Island object. Adds commands
required to manage home names, specifically rename and delete. I did not
add list as there is tab complete on island go, but it may be required.
2021-03-01 10:42:08 -08:00
tastybento a8473c27a9 Added test for isCheckForBlocks 2021-02-28 15:25:30 -08:00
tastybento bae0e6c36f Fix tests. 2021-02-28 15:24:29 -08:00
tastybento 93417d6a6c Test cleanup 2021-02-28 08:10:18 -08:00
tastybento 010a56bc7b Fixed broken tests in IslandsManager 2021-02-28 07:54:13 -08:00
tastybento dfd4df4e05
Adds maxMembers to the Island object for persistent storage (#1691)
* Adds maxMembers to the Island object for persistent storage

https://github.com/BentoBoxWorld/BentoBox/issues/1690

* Expanded approach to include coop and trusted ranks.

* Checks for max members/coops/trusts on accept based on island setting.

* Write island max member/coop/trusted if owner joins server

This updates the island's settings based on the owner's permissions.
2021-02-27 11:19:02 -08:00
tastybento 04be4cf7de Fixed long standing bug in unused Util method getClosestIsland
Changed AdminRegisterCommand to use the method to remove code
duplication.
2021-02-17 18:36:57 -08:00