Commit Graph

736 Commits

Author SHA1 Message Date
tastybento
a4bef159be
2 0 0 multi island (#2185)
* Multi world WIP - stashing

* Initial work on supporting multiple islands per player

The default allowed number is 5 for now, but will be set to 1 by
default.

Lots more work to do on this!

* More work on multi island. Fixed tests so clean compile.

* Remove unused imports

* Updated island go and homes command to multi island

Updated tests.

* Do not reload addons anymore.

* Add island name when entering or leaving own island

* Remove unused import

* Adds island names to /island go command.

* Enables more homes to be set if player has more than one island

* Switch to using a set for islands and explicit primary boolean in Island

* WIP

* Fix bugs with the go command.

* Be able to delete multiple islands, e.g. when joining a team

This is not fully tested.

* Do not remove all islands when a player does reset.

Players can reset just the island they are on.

* More fixes for go command

* Fix tests

* Fix @NonNull annotation

* Fix home syntax listing reference for IslandDeleteHome

* Fixed deletehome for multiple islands.

* Fix /island command teleport to current island default home.

* Remove deprecated code.

* Fix tag for concurrent island setting in config.yml

* Improve error when trying to make additional islands over limit

* Update config.yml

* Correctly assign invites for islands.

* Switch to canExecute API in prep for multi-island handling

* Prevent players from obtaining more concurrent islands by owner transfer

* Handle leaving and disbanding of teams

* Fix tests

* Fix minor bugs or code smells.

* Restore the quarantine code from deprecation.

This code can stay. It checks if islands can load, and if not puts them
in a trash. It does no harm.

* Remove unneeded eq()'s

* Fix tests
2023-09-16 15:55:52 -07:00
tastybento
503107a90c Fix test 2023-09-04 14:58:23 -07:00
tastybento
8d3be9c0ff Added island member placeholders
Relates to #2180
2023-09-03 10:50:47 -07:00
tastybento
ba31dd78b4 Ignoring sculk sensor test for now.
It used to work, but now doesn't. I've tried updating various plugins
and trying different things, but it seems that the mocking is not
working correctly. I don't know why.
2023-09-03 08:58:00 -07:00
tastybento
a7b791f4be Fixes #2173. Copies the correct range of blocks. Added test class.
Issue was with negative numbers that (int) rounds towards zero and not
towards negative infinity.
2023-09-02 08:04:34 -07:00
tastybento
aed78038ef Fix issue with NPE when Op does Command Ranks and does not own island
Related to #2170

Added a test class for CommandRankClickListener and reworked the logic.
2023-08-17 20:42:17 -07:00
tastybento
06ccb8a5e0 Fixed issue with demoting or promoting above yourself.
Addresses #2164

Added test class to check command. Added new error text.
2023-08-10 21:57:41 -07:00
tastybento
3e1dc81592 Minor code smell reduction 2023-07-22 16:03:55 -07:00
tastybento
62a3a8d6fa Fixed NPE when getting UUID for unknown name.
Added test methods for PlayersManager
2023-07-22 12:00:10 -07:00
tastybento
1a0a314ece Added ClosestSafeSpotTeleport class
Removed code from the main class that was not being used. e.g.,
failureRunnable.
2023-07-20 15:09:14 -07:00
tastybento
2512a892fd Added clearInline Mocks just in case. 2023-07-20 00:38:58 -07:00
tastybento
8ce78c8fe0 Added DefaultPasteUtil test class 2023-07-15 17:55:48 -07:00
tastybento
2dfd136591 Added test class 2023-07-15 16:55:59 -07:00
tastybento
357a8fdc5f Added test class for BlueprintEntity 2023-07-15 16:45:51 -07:00
tastybento
a6bb78c80f Refactor to reduce complexity 2023-07-10 22:25:30 -07:00
tastybento
170c31fcec Judge location of damage by location of entity not user 2023-07-09 15:07:37 -07:00
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