Commit Graph

3147 Commits

Author SHA1 Message Date
tastybento
6964f8c61a Fix MV compatibility. Fixes #2244
Provides the correct generator for the seed worlds.
2023-12-06 13:38:59 -08:00
tastybento
12bf37d2c2
No tabs (#2243)
* Remove all tabs from source and replace with 4 spaces.
2023-12-04 20:55:40 -08:00
tastybento
22f398fe53 Fix deletion of islands when chunks are not deleted. Fixes #2241 2023-12-03 19:50:51 -08:00
tastybento
f256c3af8d Fixes #2240 Makes locations default to island center in IslandBaseEvent 2023-12-02 21:41:35 -08:00
tastybento
54ebf2dfd2 Fix issue where players with more than one island couldn't leave a team 2023-12-02 12:06:57 -08:00
BONNe
f80cf238f0
Fixes end portal finding issue when entering from side (#2238)
There was a bug in the code that prevented to finding of a portal location if the player entered from the side. 
It can happen only if the portal frame is removed, but as in vanilla it is possible, then it needs to be addressed.

The fix itself is simple: instead of checking just up from the starting location, the code will check all blocks in 10x10x10 square from the starting location and find the "closest" portal location.

This will fix #2237
2023-11-28 13:04:52 -08:00
gitlocalize-app[bot]
187ae1c61a
Add Ukrainian locale (#2235)
* Translate uk.yml via GitLocalize

* Translate uk.yml via GitLocalize

* Translate uk.yml via GitLocalize

* Update uk.yml

---------

Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: GIGABAIT <freebitcoin93@gmail.com>
Co-authored-by: BONNe <bonne@bonne.id.lv>
Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2023-11-26 10:34:27 -08:00
gitlocalize-app[bot]
ea6b5dd257
Add Ukrainian locale (#2236)
* Translate uk.yml via GitLocalize

* Translate uk.yml via GitLocalize

---------

Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: BONNe <bonne@bonne.id.lv>
2023-11-26 09:59:46 -08:00
tastybento
625b70de30 Simplify fillBorder 2023-11-25 18:22:37 -08:00
tastybento
4547232ac9 Better constants 2023-11-25 14:57:39 -08:00
tastybento
90751224d7 Better constants 2023-11-25 14:54:07 -08:00
tastybento
59c84990e5
Adds a method that can return a different default value than 0 (#2234) 2023-11-25 08:39:28 -08:00
Baterka
13c339ef4f
- Fixed separators to also work on Windows (#2233)
- Added missing `--add-opens=java.base/java.security=ALL-UNNAMED`
 - Added proper closing of AddonClassLoader
2023-11-25 07:45:56 -08:00
Huynh Tien
5de7302469
Switch to Spigot's PlayerProfile on HeadGetter (#2231)
* Switch to Spigot's PlayerProfile on HeadGetter

Remove AuthLib

* forgot to set meta back

* should check if the texture is not empty
2023-11-24 08:15:20 -08:00
tastybento
1cf7ccbb99 Fix bug where players couldn't invite other players.
The IslandsManager#inTeam method was returning true even if the team was
just 1 player.
2023-11-19 12:38:54 -08:00
tastybento
defb1c7a6e
Better French, maybe... (#2228) 2023-11-18 18:28:34 -08:00
tastybento
0ecbd9150b Even more French fixing... 2023-11-18 15:38:06 -08:00
tastybento
2818ac8f33 Correct French 2023-11-18 15:35:39 -08:00
tastybento
70e4ae15b7 Fix gender 2023-11-18 15:34:24 -08:00
tastybento
d95727fbdf Fix French - coffre, not poitrine. Chest not human chest! 2023-11-18 15:32:51 -08:00
tastybento
26dc5c5949 IslandsManager#isOwner correction and JavaDoc update 2023-11-18 13:49:33 -08:00
BONNe
a35353a802
Fixes an issue with entity teleportation if nether/end worlds are disabled (#2227)
There was a bug that used old code (environment switching) for teleportation out of dimension. 
The issue should be fixed with calling just calling teleportation with portal environment.
2023-11-15 23:34:13 +02:00
tastybento
63d092db93
Multi island api update (#2224)
* Fixes bug with island team joining and deletion. Include debug.

* Remove ambiguous API with mutli-island.

* Add back deprecated methods so developers can be wartned not to use them

* Added back in deprecated methods.

* Fix bugs and NPEs.

* Fix some code smells

* Remove debug logging.
2023-11-12 12:22:12 -08:00
tastybento
19d7e2fe0a Fix island resetting. #2223
Islands were being deleted in all worlds, and all islands were being
deleted from the player instead of just the one island.
2023-11-10 17:06:46 -08:00
tastybento
c63de278fe Revert "This changes the loading to not be on STARTUP (#2214)"
This reverts commit 4a6bf31dff.
2023-11-10 10:54:30 -08:00
tastybento
24148f30ba
Rank Management (#2220)
* Put ranks in the database. Prework for #1798

* Prevent coop and trust commands from being registered

if those ranks don't exist.

* Add /bbox rank command for ranks management

* Rename RanksObject to Ranks

* Strip / on commands if it exists. Fixes #2221

* Fix test failure
2023-11-10 10:53:28 -08:00
BONNe
285205fe3f
Fixes a bug with EntityTeleportListener (#2222)
There was incorrect teleportation type detection, as target world were set to NORMAL. This prevented to detect that portal in opposite side exists, and should be linked to the correct position.
2023-11-10 07:23:38 -08:00
tastybento
5503ce0d90 Fixes #2221 2023-11-05 15:17:56 -08:00
tastybento
6d09a5a359 Fixes #2219. Island homes were set incorrectly with a new island. 2023-11-04 10:29:28 -07:00
BONNe
4200fe4abb
Fixes a bug that removed old owner from island (#2218)
* Fixes a bug that removed old owner from island

These changes fix a bug that was introduced by clearing the island cache from the old owner for 2.0 verison.

This will set the previous owner as sub-owner on the island.

* Fixes rank on event fired.

Changes from Visitor to Sub owner rank

* Update IslandsManager.java

Removes line that removes player from cache. 

They should remain in the cache.

---------

Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2023-10-30 09:17:26 +02:00
tastybento
4a6bf31dff
This changes the loading to not be on STARTUP (#2214)
Worlds are then created in onEnable and not one-tick later.
2023-10-28 21:16:36 -07:00
tastybento
d903e57ad6
Remove the deprecated classes for 2.0 (#2216) 2023-10-28 21:16:04 -07:00
tastybento
fd99da68d9 Fix double trapped (redstone) chest protection. #2215 2023-10-23 18:31:57 -07:00
gitlocalize-app[bot]
7f50073ad1
Croatian translation WIP (#2212)
* Translate hr.yml via GitLocalize
---------

Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-10-21 16:00:25 -07:00
gitlocalize-app[bot]
c4fa6cf26e
French translation WIP (#2211)
* Translate fr.yml via GitLocalize

---------

Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2023-10-21 15:33:26 -07:00
gitlocalize-app[bot]
39882cb7bc
German Translation WIP (#2210)
* Translate de.yml via GitLocalize

---------

Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-10-21 15:01:32 -07:00
gitlocalize-app[bot]
4e0e3d2005
Portuguese translation (#2209)
* Translate pt.yml via GitLocalize

---------

Co-authored-by: dollyXtoddy <dollyxtoddy@gmail.com>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: SrVictor079 <cruz.joaovictor22@gmail.com>
2023-10-21 13:58:22 -07:00
gitlocalize-app[bot]
c195baf66d
Czech translation (#2208)
* Translate cs.yml via GitLocalize

---------

Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
2023-10-21 12:01:15 -07:00
gitlocalize-app[bot]
b3808334ad
Translate ja.yml via GitLocalize (#2207)
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-10-21 12:00:49 -07:00
gitlocalize-app[bot]
9e8df5ce80
Chinese translation (#2206)
* Translate zh-CN.yml via GitLocalize

---------

Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: Jeansou <bettertreebot@gmail.com>
Co-authored-by: CuteLittleSky <2173204318@qq.com>
2023-10-21 12:00:30 -07:00
gitlocalize-app[bot]
2c49e6d2f4
Hungarian translationrian (#2205)
* Translate hu.yml via GitLocalize

* Update hu.yml

Fixed placeholders.

---------

Co-authored-by: s3babyy <s3bastian540@gmail.com>
Co-authored-by: balazzrthd <balazzrt@gmail.com>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: SilkyFalcon <gerolytibor2007@gmail.com>
Co-authored-by: RayenHUN <huszarikd@gmail.com>
Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2023-10-21 11:09:33 -07:00
tastybento
e4836b9cef Remove island number check for owner transfer.
This is not needed anymore (we think).
2023-10-21 07:55:03 -07:00
BONNe
af3b0bba2d
Fixes missing locale text
The message was linked to a non-existing path.
2023-10-20 20:01:41 +03:00
tastybento
ea5529f077
Enables permissions to set how many islands a play can create. (#2201)
Multiple Island Permissions #2199
2023-10-15 19:01:02 -07:00
tastybento
489a1e332d Remove unregistration of MV worlds workaround.
This is no longer needed as with
https://github.com/Multiverse/Multiverse-Core/releases/tag/4.3.12 (or
maybe earlier) as the issue is fixed where the generator was not
remembered across reboots.
2023-10-15 13:57:48 -07:00
tastybento
c8b2e1d801 Changed some tests for ItemParsing.
Potions are no longer extended or upgraded using the deprecated
PotionData. They have explict names, like "long_night_vision" or
similar. So these tests don't work any more.
2023-10-11 22:48:39 -07:00
tastybento
9f8a6bcded Remove players from the island and cache. 2023-10-11 21:43:30 -07:00
tastybento
dc51bd87b1 Fix code to have a default entry on the switch, which is now required. 2023-10-11 21:42:45 -07:00
tastybento
2b65543935 Adds InvincibleVisitorFlagDamageRemovalEvent and tests.
Resolves #2196
2023-10-08 08:56:13 -07:00
tastybento
7fbd041be9 Check passengers of jockeys when spawned. #2195 2023-10-07 11:15:23 -07:00
tastybento
6d2f79881b Fixes getOwner and getIslands to properly return islands in the world
The world was not being used for the getOwner return so if a player had
an island in any world then it was returned. This caused an NPE if the
island was then requested by getIsland because it would not be there.
2023-10-07 10:30:16 -07:00
tastybento
e6ccce4a27 Added flags for Loom, stonecutter, cartography, smithing, grinding
Fixes #2194 and #2193
2023-10-07 09:52:24 -07:00
tastybento
8b78affc9b Update NMS to 1.20.2 2023-10-07 09:01:01 -07:00
tastybento
5c3ebc800c Add 1.20.2 compatibility. 2023-10-07 08:54:59 -07:00
tastybento
2bc82dd3cf
Add checking for enchantment table inventory (#2191)
Fixes #2190
2023-09-19 21:07:28 -07:00
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
b276c0715c Fix reference for home list syntax in IslandDeletehomeCommand 2023-09-04 12:24:56 -07:00
tastybento
8d3be9c0ff Added island member placeholders
Relates to #2180
2023-09-03 10:50:47 -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
gitlocalize-app[bot]
bcf569c019
Indonesian translation (#2184)
* Translate id.yml via GitLocalize

* Translate id.yml via GitLocalize

* Translate id.yml via GitLocalize

---------

Co-authored-by: Dusty <siapa-yg-mau-diblokir.kfrxp@simplelogin.com>
Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2023-09-01 15:28:49 -07:00
tastybento
a6f47e5c54 Translate ja.yml via GitLocalize 2023-09-01 21:58:31 +00:00
mt-gitlocalize
33a694cfd1 Translate ja.yml via GitLocalize 2023-09-01 21:58:30 +00:00
tastybento
d6978ce0f6 Translate ru.yml via GitLocalize 2023-09-01 21:33:37 +00:00
tastybento
0f6d5af1f8
Update ru.yml
New translation provided by @Moltanicaa https://github.com/Moltanicaa
2023-09-01 14:25:07 -07:00
BONNe
da2daae990
Fixes a bug with incorrectly indexed pages +1 (#2178)
* Fixes incorrect element displays in pages 1+.

The issue was introduced by #585f720f6f4a7e9480af5065469c92e23e5a987e which reduced complexity too much.

Fixes #2177

* Reformat and reduce complexity properly.

* Rework logic for getting number of same button types in the panel

* Add more comments.

* Add proper deprecated annotation.
2023-08-29 21:19:33 +03: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
08d73f232b Adds a config section in BentoBox to run commands when it is loaded
Commands are run as console.
2023-08-15 17:25:26 -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
397f9e4700 Added more JavaDoc for API usage 2023-08-01 09:43:47 -07:00
tastybento
475e67c447 Revert "Refactor YamlDatabaseHandler to reduce continue statements"
This reverts commit fec43adc35.
2023-07-24 18:27:06 -07:00
tastybento
2ad7796582 Refactor to reduce complexity 2023-07-22 16:20:21 -07:00
tastybento
3e1dc81592 Minor code smell reduction 2023-07-22 16:03:55 -07:00
tastybento
fec43adc35 Refactor YamlDatabaseHandler to reduce continue statements
in a loop to just one.
2023-07-22 15:52:15 -07:00
tastybento
7a21aba3a8 Added more JavaDoc to ConfirmableCommand 2023-07-22 12:00:43 -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
850939f3a8 Fix issue were glow was not removed.
If glow was applied to a panel item, but then the glow setting was set
to false, the glow was not removed from the panel item.

Relates to https://github.com/BentoBoxWorld/AOneBlock/issues/326
2023-07-20 00:27:27 -07:00
tastybento
a0b349ec27 Complexity reduction 2023-07-15 16:27:31 -07:00
tastybento
585f720f6f Reduce complexity 2023-07-10 22:48:33 -07:00
tastybento
a6bb78c80f Refactor to reduce complexity 2023-07-10 22:25:30 -07:00
tastybento
c5baa1d0eb Refactor to reduce complexity 2023-07-10 22:08:02 -07:00
tastybento
170c31fcec Judge location of damage by location of entity not user 2023-07-09 15:07:37 -07:00
tastybento
211d636bfb Remove dependency on apache util 2023-07-08 15:02:50 -07:00
tastybento
4ef974fbde Better error for unknown icon material, and test class 2023-07-08 08:52:20 -07:00
tastybento
9a464ab795 Minor refactor - use containsKey method. 2023-07-08 08:39:56 -07:00
tastybento
39a6fc5006 Refactor, use if statements instead of switches 2023-07-08 08:39:00 -07:00
tastybento
325c9c2351 JavaDoc fix 2023-07-08 08:38:30 -07:00
tastybento
30d29c6ff9 Refactor: Merge switch values 2023-07-08 08:38:20 -07:00
tastybento
df45fca562 Refactor - merge List creation and addAll into one 2023-07-08 08:36:29 -07:00
tastybento
df6fb7d716 Fix JavaDoc 2023-07-08 08:35:31 -07:00
tastybento
54139b60f0 Remove unneeded return 2023-07-08 08:35:22 -07:00
tastybento
74a2e9d3c8 Change OP to op 2023-07-08 08:33:51 -07:00
tastybento
9334858675 Added IslandDeletehomeCommand test class 2023-07-03 16:11:37 -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
7b8e18afff Adds Chiseled Bookshelf protection #2136 2023-07-01 10:04:05 -07:00
tastybento
f23ebec34e Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2023-06-30 18:36:06 -07:00
tastybento
9c6cc78c32 Adjust priority of PlayerInteraction event listener to NORMAL
This may help avoid mob shop clashes.
2023-06-30 18:35:55 -07:00
tastybento
c28ecb1c74 Add null check. Not really needed but make Sonar happy. 2023-06-29 17:29:04 -07:00
tastybento
4c0cb9f17c Unregisters worlds with MV on shutdown.
Fixes #2149
2023-06-26 22:08:49 -07:00