Commit Graph

3656 Commits

Author SHA1 Message Date
tastybento
0ffa213fd2 Adds more island cache methods. Adds tests. 2024-07-01 08:46:17 -07:00
tastybento
59fd8d94b5 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2024-06-29 15:44:56 -07:00
tastybento
58937d6353 Add 1.21 compatibility 2024-06-29 15:44:47 -07:00
TreemanKing
534fd675b3
feat: new flag - handle tamed animals (#2412) 2024-06-24 07:31:53 -07:00
tastybento
24fa4fe8d3 Fix for #2413 - support for 1.20.1 2024-06-23 17:18:29 -07:00
tastybento
2f9e3c42fd
Better migration of databases relates to #2404 (#2411)
Also, adds support for 1.21.
2024-06-19 09:08:07 -07:00
tastybento
09c5cbb449 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2024-06-14 21:43:23 -07:00
tastybento
894b063694 Split out the Paper-only event 2024-06-14 21:43:13 -07:00
tastybento
d23f15f16f
Rework tests to not break so much with constant definitions (#2407) 2024-06-14 18:49:08 -07:00
tastybento
96564275a8
Support nms pasting (#2406) 2024-06-14 13:10:01 -07:00
tastybento
86e5a02516
Fix for #2402 player record was deleted on quit (#2403)
This was due to the changes to the Player cache. On quit the cache was
cleared, but this was also deleting the player from the database.
2024-06-10 16:16:00 -07:00
tastybento
156c3da3bb
Add command to teleport users. (#2399)
* Add command to teleport users.

* Fix bugs
2024-06-02 18:23:23 -07:00
tastybento
0938df8824
Added API methods for direct database loads and saves #2396 (#2398)
* Added API methods for direct database loads and saves #2396

* Fix test
2024-06-02 18:05:48 -07:00
tastybento
f68af5529f Remove concurrent hashmap because it cannot handle null values.
Need to use another approach if concurrency is required.
2024-06-02 18:04:54 -07:00
tastybento
d831722821
Shift to using ConcurrentHashMap (#2397)
Sometimes, these calls are made async, but as they now update the cache,
there could be concurrency issues. This fixes that.
2024-06-02 08:30:40 -07:00
Minecraft_15
961a35bace
Corrected translation errors (#2391)
* Delete src/main/resources/locales/zh-CN.yml

delete old language file(zh-CN)

* Readd language zh-CN.yml

Corrected translation errors
2024-06-02 08:26:38 -07:00
tastybento
affb0c263a
Added %[gamemode]_visited_island_rank% #2390 (#2395)
* Added %[gamemode]_visited_island_rank% #2390

* Fix test
2024-06-01 12:25:34 -07:00
tastybento
250c7950f9 Fixes for Island cache issues
Fix the size check and the new island creation.
2024-06-01 11:42:22 -07:00
tastybento
01dcd6ecc6
Adds more options around getting islands and caching (#2394)
Sometimes, there is a need to get an island once but not cache it. For
example, when loading addons they may need to scan all the islands, but
not have them cached.
2024-06-01 08:37:37 -07:00
tastybento
475f6372e2 Added defensive code for JUnit testing 2024-05-31 17:11:43 -07:00
tastybento
8e68349004 Add way to bypass code during testing, if required. 2024-05-31 17:04:13 -07:00
tastybento
fc9b00233b
Sends messages only once to all players on the island (#2389)
Was sending to visitors and all players so visitors saw it twice.
2024-05-26 17:56:46 -07:00
tastybento
1fd4a9043f
Protect pumpkins from being sheared (#2388)
Requires Paper
2024-05-26 17:45:45 -07:00
tastybento
ee3b0bfcc2
Update en-US.yml (#2387) 2024-05-26 17:36:45 -07:00
tastybento
35704b3fd3
Update zh-CN.yml (#2386) 2024-05-26 17:34:01 -07:00
tastybento
60fa60372d Fix tests 2024-05-26 17:27:41 -07:00
tastybento
8b0a5a3d0b Do not load all players just to get a name. 2024-05-26 17:01:02 -07:00
tastybento
ca15740a8c
Fixes a bunch of items related to making the cache smaller (#2383)
* Fixes a bunch of items related to making the cache smaller

* Fix test
2024-05-25 22:38:53 -07:00
tastybento
5e5707f2a2
Fixes #2377, was not accounting for unknown UUIDs (#2380) 2024-05-24 16:43:55 -07:00
tastybento
ef58838c41
Fixes #2378 where an unknown UUID was yielding null instead of "" (#2379) 2024-05-24 15:57:46 -07:00
BONNe
885d2449d9
Fixes creeper ignation by visitors (#2375)
This fixes a long-standing bug which was introduced with a code that prevented hostile entities from targeting visitors.  

As player was not a target for creeper it allowed it to explode.

This code change prevents visitors from igniting creepers as I do not see a reason why we should allow them to ignite them, while still protecting from griefing. 

Addresses issue reported in #2372
2024-05-24 07:22:20 -07:00
tastybento
888b485f82 Fixes #2376 2024-05-24 07:18:39 -07:00
tastybento
e2d9c2ce34
Avoids loading islands into cache unless they are needed. (#2373)
* Avoids loading islands into cache unless they are needed.

* Adjust methods that were calling all islands

When we cached all island, this was an inexpensive call but not now. The
methods remain but pull from the database directly. The use of them were
changed to be player specific.
2024-05-23 21:42:14 -07:00
tastybento
8aba736383
Fixes breaking rooted dirt exploit (#2371) 2024-05-19 15:35:38 -07:00
tastybento
50276cb8e5 Abstract out getting and setting islands by ID
This is preparation for potentially making the cache smaller and pulling
from the database instead when required. However, there are issues with
this because some calls can result in loading the whole database anyway.
2024-05-18 22:49:20 -07:00
tastybento
d701b7e43c
Uses Bukkit version method instead of class names (#2370)
* Uses Bukkit version method instead of class names

See https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/

* Fix tests

* Fix server compatibility reporting issue with Paper

* Remove unused import
2024-05-18 21:47:09 -07:00
tastybento
2fc3396a8f Remove debug code that slipped in. 2024-05-18 20:08:21 -07:00
tastybento
99717f5b60
Reduces storage of Island objects in the cache #2360 (#2369) 2024-05-18 19:48:42 -07:00
tastybento
290158e6ef
Allow NPC's to hit players (#2368)
* WIP for debug only

* Allow attacks from NPC's
2024-05-18 11:07:59 -07:00
tastybento
7126e837ed
Admin command updates (#2367)
* Enables tp'ing to specific islands of a player

* Admin delete command. Fixes to admin tp command.
2024-05-16 21:02:45 -07:00
tastybento
f536a13c59 Back to 1.20.6 2024-05-12 17:20:14 -07:00
tastybento
aad50eab38 Just use null. 2024-05-11 13:03:50 -07:00
tastybento
24d81da907 Update to latest 1.20.6 API for PlayerDeathEvent 2024-05-11 12:55:14 -07:00
tastybento
d288528a17
2356 better deletion (#2364)
* Fix 1.20.4 backwards compatibility

* Improve deletion speed and memory usage
2024-05-11 11:07:47 -07:00
tastybento
83698c267f
Purges based on team members all being offline for too long (#2362)
* Purges based on team members all being offline for too long

* Fix to riff off real team members not trusts and banned as well
2024-05-11 08:50:28 -07:00
tastybento
52a280dc0b
Remove an unused Map in cache. (#2361) 2024-05-11 08:50:03 -07:00
tastybento
4a0d44c035
Implement new API for ItemsAdder item deletion (#2353) 2024-05-11 08:49:47 -07:00
tastybento
b8e1f33800
Fixes #2352 obsidian scooping NPE (#2358) 2024-05-07 21:25:58 -07:00
tastybento
d8891796cd JavaDoc fixes and fix for Particle enums 2024-05-05 21:28:04 -07:00
tastybento
61e7c22bbc
Add a hook for Multipaper (#2354) 2024-05-05 21:11:16 -07:00
tastybento
b1fe76c45d
Multipaper (#2343)
* Switch to use database for team invites.

* WIP multipaper

* Fixes teams. Test still need to be fixed.

* Islands are now updated correctly across servers.

This build has a lot of debug in it!

* Fix tests

* Remove debug

* Remove primary island listing

* Version id

* Fix team management and ranks

* Removed debug

* Handle island deletion better

* Island deletion across servers.

* Fix bug with MythicMobs changes #2340

* 2.4.0

* Load of debug - trying to solve the settings slowness

* Debug debug

* Bug found - addPlayer being called instead of getPlayer

* Uncomment code after debug

* Fix tests
2024-05-04 22:27:58 -07:00
tastybento
744665a16e
Merge branch 'develop' into 1.20.5_compatibility 2024-05-01 18:01:51 -07:00
tastybento
09ede87971 Write the Blueprint bundle meta data to admin info 2024-05-01 17:58:05 -07:00
tastybento
15335eb992 Add NMS for latest 2024-04-29 22:26:09 -07:00
tastybento
e33823d0c0 Fix tests 2024-04-29 21:37:08 -07:00
tastybento
63cc0a01d9 Fix compatibility for 1.20.6 2024-04-29 19:46:06 -07:00
tastybento
6949432cb6 1.20.5 compatibility. Not all backward compatibility done
Won't run on 1.20.4 yet without stopping due to enum incompatibility
2024-04-28 17:56:02 -07:00
tastybento
69a22e917e Fix MythicMobs test 2024-04-14 22:11:41 -07:00
tastybento
ffb955b22b Fix bug with MythicMobs changes #2340 2024-04-14 22:00:37 -07:00
tastybento
3de0ff236e Fix tests 2024-04-08 23:01:45 -07:00
tastybento
c86eb6a19c Make sure it's the user's island that the target is being kicked from 2024-04-08 22:11:52 -07:00
tastybento
e7055c6cba Remove player from island, not all islands when kicked. 2024-04-08 21:53:18 -07:00
tastybento
5834dcbb59 Fix placeholders manager test 2024-04-08 20:15:34 -07:00
tastybento
2c75939bc3 JavaDoc and import changes 2024-04-06 09:08:11 -07:00
tastybento
f6f4da1c89 Added placeholders for island names and member lists #2329 2024-04-04 12:59:20 -07:00
tastybento
e1536fcae0 Remove superfluous null check 2024-04-04 09:12:45 -07:00
tastybento
1c19703f44 Merge if statement 2024-04-04 09:11:49 -07:00
tastybento
24b7d26fbe NPE avoid. 2024-04-04 09:09:46 -07:00
tastybento
ec60991aeb Merge branch 'develop' into 2328_team_members_can_have_islands 2024-04-01 10:59:30 -07:00
tastybento
83eaa50b49 Refactor to improve code quality 2024-03-31 18:16:45 -07:00
tastybento
1215a43766 Add feature to limit blueprint availability. 2024-03-31 17:29:18 -07:00
tastybento
81f765df36 Fix invites and accepts. 2024-03-30 20:57:20 -07:00
tastybento
0e6a25d74b WIP - needs work on team invites. 2024-03-29 20:26:07 -07:00
tastybento
2b19d43c85 Remove restrictions on having multiple islands for team members.
Added API to enable checking for teams on islands easier.
2024-03-29 19:38:44 -07:00
tastybento
1bce4ec1b9 Limit blueprint pasting to world y coords. Addresses #2334 2024-03-28 21:58:01 -07:00
tastybento
ea8562f351 Remove more debug 2024-03-28 21:42:33 -07:00
tastybento
d8f2c12fe5 Remove pasting blueprints as stone debug. 2024-03-28 21:27:48 -07:00
tastybento
44454f5854 Adds support for multi islands to the admin range command 2024-03-24 18:44:24 -07:00
tastybento
6599e3de80 Sort player's islands by age so they are always in the same order. 2024-03-21 19:20:31 -07:00
tastybento
d77c94c30c Fix #2320. Enables hiding of flags when in another world
The world was being taken from the user's location not the panel's world
2024-03-16 10:04:28 -07:00
tastybento
75412a4674 Fix bug 2024-03-15 19:24:41 -07:00
tastybento
40e96b9169 Remove useeless eq 2024-03-15 18:53:08 -07:00
tastybento
db2b97d2fc Remove ; after record definition 2024-03-15 18:52:37 -07:00
tastybento
5ad2ba1cd9 Remove useless eq()'s 2024-03-15 18:52:24 -07:00
tastybento
6127cdced1 Reduce complexity. 2024-03-15 18:49:20 -07:00
tastybento
91998b4e24 Use method reference 2024-03-15 18:47:14 -07:00
tastybento
06ca7a311a Simplify code. Fix code smells. 2024-03-15 18:46:07 -07:00
tastybento
e4e92b9634 Fix code smell 2024-03-15 18:45:55 -07:00
tastybento
0c4a4ba862 Fix tests. Added coops and trusted to team GUI view. 2024-03-15 07:50:50 -07:00
tastybento
e2a4233f69 Fix for IslandPromoteCommandTest 2024-03-14 21:11:22 -07:00
tastybento
977c82015b Rewrite. Tested with players. 2024-03-14 20:59:20 -07:00
tastybento
6db04f872b Fix promote and demote #2322 2024-03-14 18:16:09 -07:00
tastybento
eef3dcbc46 Allow the maxhomes to apply per island. 2024-03-13 17:58:28 -07:00
tastybento
253e5d7101 Use method references. 2024-03-10 22:36:42 -07:00
tastybento
dc42f51168 Uses path normalization to prevent directory traversal attacks. 2024-03-10 11:46:44 -07:00
tastybento
4170616e47 Fixes bug where non-members could be made island owners. 2024-03-10 11:29:51 -07:00
tastybento
7f532b1257 Resolve JavaDoc issues 2024-03-10 11:21:03 -07:00
tastybento
4810c4c4ad Adds the ability to include MythicMobs in Blueprints. Fixes #2316 2024-03-10 10:40:26 -07:00
tastybento
57164dd846 Fixes #2313 2024-03-04 07:01:47 -08:00
tastybento
24c68a0d95 Rewrite of admin setowner command #2309 2024-03-03 16:07:49 -08:00
tastybento
994019836a Merge branch 'develop' into admin_setowner 2024-03-03 14:35:18 -08:00
tastybento
19d81c70c6 Fix for Island team kick requires confirmation when using GUI #2311 2024-03-02 19:29:26 -08:00
tastybento
a3a4a70921 Fix NPE #2310 2024-03-01 21:51:10 -08:00
tastybento
bb9ed87175 WIP 2024-03-01 21:39:18 -08:00
tastybento
562b515bfe Change respawn point to the default home on the island. #2305 2024-02-24 16:06:56 -08:00
tastybento
0a9da71c65 Fix admin commands to avoid removing players from more than one island 2024-02-24 15:51:24 -08:00
tastybento
631a15563d Remove deprecated methods from IslandsManager and IslandCache 2024-02-24 15:07:05 -08:00
tastybento
f11a56cc6b Better enable disbanding of teams via admin command 2024-02-24 14:47:22 -08:00
tastybento
78f84de3cb Use Bukkit pasting if user is too close to new island.
This prevents players experiencing invisible blocks at the expense of
lag.
2024-02-23 23:04:47 -08:00
tastybento
070c1102db Use Bukkit for Admin BP pasting. 2024-02-23 22:05:32 -08:00
tastybento
a1d19fae74 WIP - use Bukkit for bp admin pasting. 2024-02-23 21:56:32 -08:00
tastybento
59124cfa8a Fix NPE with unregister command 2024-02-23 21:51:17 -08:00
tastybento
e8acd05dbe Adjust null check. 2024-02-19 16:51:08 -08:00
tastybento
3784d5d28d Added tests. Added check for world. Removed y ignore for closest island. 2024-02-19 16:27:38 -08:00
tastybento
95b7ed137f Added tests 2024-02-19 15:45:47 -08:00
tastybento
87b147ace4 Allow multi-island registrations 2024-02-19 12:03:53 -08:00
tastybento
1846ed8088 Added tests 2024-02-19 11:36:47 -08:00
tastybento
af843aeb35 Unregister coded. 2024-02-19 10:55:15 -08:00
tastybento
38551a138a Fix tests 2024-02-18 14:43:29 -08:00
tastybento
83479ac8a4 Added placeholders for team online member counts #2299 2024-02-18 14:36:42 -08:00
tastybento
f81354fa3e Fix for MySQL https://github.com/BentoBoxWorld/BentoBox/issues/2298 2024-02-13 18:55:45 -08:00
tastybento
24025fd9ae Ignore test 2024-02-12 20:02:49 -08:00
tastybento
87054687f0 Add new DamageSource parameter 'null' to test events 2024-02-12 19:56:10 -08:00
tastybento
01f51f4d29 Temporarily not do IA custom block deletion. #2297 2024-02-12 19:27:56 -08:00
tastybento
59c18e26f5 Reduce duplications 2024-02-09 22:21:22 -08:00
tastybento
b63aef5589 Add support for older 1.20.x versions 2024-02-09 17:40:58 -08:00
tastybento
2d0d9ac1c2 Add defensive code to log an warning on YAML config issue
Relates to https://github.com/BentoBoxWorld/SkyGrid/issues/67
2024-02-07 19:02:45 -08:00
tastybento
8217b375d5 Fix test. 2024-02-03 12:11:57 -08:00
tastybento
43db8d346c Added ability to hide command rank commands by Ops. 2024-02-03 11:32:28 -08:00
tastybento
9acb79fc60 Added extra info to version command on version used. 2024-02-03 08:00:17 -08:00
tastybento
6316ff4a93 Add some defensive code to try and load addons if they are not pladdons 2024-02-01 22:46:00 -08:00
tastybento
c100fe0047 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2024-01-30 22:31:01 -08:00
tastybento
b2550882ba Add optimization for Slimefun deletion. #2289 2024-01-30 22:30:51 -08:00
BONNe
6bf12d5e20
Fixes EXP reset for players onJoin and onLeave (#2286)
The total experience does not reset player collected exp. This fixes that, as it will set level to 0 and progress in towards next level to 0
2024-01-30 19:32:13 -08:00
tastybento
c9b7074e79 Fix test 2024-01-27 20:31:51 -08:00
tastybento
b25c65b7b2
Center default home (#2287)
* Center default home

* Remove debug
2024-01-27 17:06:31 -08:00
tastybento
787424b999 Check for SHORT_GRASS before using it. #2283 2024-01-23 12:50:42 -08:00
tastybento
13bd1bb8f3
Fix for #2281 (#2282) 2024-01-22 14:50:24 -08:00
tastybento
5d3821094c
Fix for #2279 on-island placeholder for nether and end (#2280) 2024-01-21 10:58:53 -08:00
tastybento
90a53e9fd8
Fixes #2274 hanging signs protection (#2278) 2024-01-20 08:17:50 -08:00
tastybento
ffcda52912 Use latest form of icon format for TIPPED ARROWS in panels 2024-01-19 22:16:12 -08:00
tastybento
b672755ef9
Use a different method to grab the DataObject classes. (#2277)
Previously, when all Addons were Addons and men were men, the
DataObjects could be tracked using the BentoBox custom ClassLoader.
However, as Addons now can be and usually are loaded using the Bukkit
Classloader, this is no longer possible. However, we can track them when
a Database class is instantiated and use that. This relies on Addons
declaring their database objects. If they have not when the migration
command is run, then obviously they cannot be transfered.
2024-01-19 21:56:19 -08:00
tastybento
7c3056b0e8 Add ability to place glowberry cave vines if planting allowed. 2024-01-15 14:48:45 -08:00
tastybento
2d44c5dbca Adds protection for berries #2272 2024-01-15 14:22:37 -08:00
tastybento
ce4d8a377e JavaDoc fixes 2024-01-14 18:57:37 -08:00
tastybento
cc7b1eba4c Require panel to have a world. 2024-01-13 08:01:49 -08:00
tastybento
4bfbe41956
World context settings (#2271)
* WIP to having admin setting world based on the command

and not the location of the user.

* Make world settings depend on the world of the command

Previous code based world on the location of the user when they ran the
command.

* Remove unused import

* Fix JavaDoc

* Remove unused import.
2024-01-12 20:28:07 -08:00
tastybento
76a36e685e
Enable template to determine what is shown/clickable. (#2269) 2024-01-11 19:53:27 -08:00
tastybento
f1001b1d05 Do not allow invite clicks if they have been removed from the panel 2024-01-11 18:13:43 -08:00
tastybento
98d336faf0 Fix admin settings NPE. 2024-01-11 15:59:53 +09:00
tastybento
edd7bcfbd2 Fix settings panel bug NPE.
The parent needs to be set before it can be used.
2024-01-11 14:38:45 +09:00
tastybento
be9b429308
Faster teleports (#2267)
* Fixed bug with teleporting where home name would not be used.

* Remove debug
2024-01-10 21:09:53 -08:00
tastybento
26e5d750a0 Clarify creeper damage. Active means creepers can damage. 2024-01-09 11:57:57 +09:00
tastybento
ca2976cc4b Test clean up. 2024-01-08 22:21:31 +09:00
tastybento
54a7b8b0f2 Fix to avoid admins becoming subowners when registering an island. 2024-01-08 22:21:20 +09:00
tastybento
0e0c502e1d
Team gui (#2251)
* WIP - add GUI for teams.

* WIP teams GUI

* Moe WIP on team GUI

* Modified file to avoid an NPE.

* Minor refactor to prevent int to Integer warning.

* Use latest dependencies for tests to pass.

* Move to singleton pattern for RanksManager,

* Team GUI WIP

* Added support for kick, setowner, and leave.

* Added support for accepting and rejecting an invite.

* Fixed bugs with text and operations.

* WIP for team invites.

* Adds inviting to the GUI.

* Fix tests

* Fixed minor bugs reported by SonarCloud

* Up Minecraft version and paper to 1.20.4 in POM

* Added features based on Discord feedback.

1. added some lore to the invite button to explain the players shown are
from the game world
2. removed the team state in chat
3. added a search to the invite panel

* Added back button.

Refactored some code and templates.

* Fixed bugs with teams and uncoop untrust etc of Ops.

* Return to name search GUI if name not found.

* Added return to GUI for player search

* Use Path.of
2024-01-08 20:50:26 +09:00
Rafał Chomczyk
68da898e79
Optimize CopyWorldRegenerator#copyChunkDataToChunk to reduce performance impact in case of multiple resets simultaneously (#2261) 2024-01-08 19:09:41 +09:00
tastybento
c62d4f603f
Add island object to Panel for context. (#2263)
Enable Tab object to reference parent TabbedPanel in the builder. It is
late assigned after building. This enables tabs to get the parent, and
therefore get the Island object.

default methods were used to support backward compatibility.
2024-01-08 07:07:30 +02:00
BONNe
fc658ca073
Fixes warning about already existing file saving. (#2260)
Spigot JavaPlugin#saveResources either replaces or complains that replacement is disabled. So it is necessary to check if file does not exists before saving it.

Fixes #2259
2024-01-05 06:18:41 +02:00
BONNe
caade1a71c
Fixes ItemParser. (#2257)
* Fixes ItemParser.

Implements new Potion and Skull parsing.
Fixes custom model data parsing.
Implements ItemFactory#createItemStack parsing that parses item using `/give` syntax.

Solves some issues mentioned in #2198

* Fixes failing BentoBoxLocaleTest

In runTime ItemFactory#createItemStack from invalid text would throw IllegalArgumentException.
2024-01-04 21:30:16 +09:00
BONNe
31fb10629a Fixes merge conflicts. 2024-01-04 10:18:25 +02:00
BONNe
38d845d2e9
Fixes issue with file exporting in Windows system. (#2256)
JAR files does not store files inside it with filesystem separator. Only spot where it makes sense to transform "/" into file separator is in output file saving.
2024-01-04 17:15:13 +09:00
BONNe
bfb487342a
Customizable Island Creation Panel (#2255)
* Customizable Island Creation Panel

This implements customizable Island Creation Panel. By default, panel is generated in `/plugins/bentobox/panels` folder, however, if GameModeAddon has a specific panel defined in their folder, then that panel is taken.

* Create UnitTests for new panels

* Add island creation panel saving on loading

* Remove old IslandCreationPanel and move to the new one.

* Fixes some issues with locale and panel

---------

Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2024-01-04 17:14:23 +09:00
BONNe
3be034bfa9
Customizable Language Selection Panel (#2254)
* Customizable Language Selection Panel

This implements customizable Language Selection Panel. By default, panel is generated in `/plugins/bentobox/panels` folder, however, if GameModeAddon has a specific panel defined in their folder, then that panel is taken.

* Migrate LanguagePanelTest to customizable panel.

* Remove original LanguagePanel

* Save language_panel.yml on server starting.

* Fixes some bugs in LanguagePanel.
2024-01-04 17:09:44 +09:00
tastybento
e8e1d6184e
Material Type adapter (#2253)
* Fix powermockito test dependencies.

* Add Material gson type adapter to handle old Material enums

In this case GRASS -> SHORT_GRASS
2024-01-02 12:54:50 +09:00
tastybento
cc5c8aa9b6
Adds an ItemAdder hook to delete any blocks when island is deleted. (#2250)
* Adds an ItemAdder hook to delete any blocks when island is deleted.

Also includes a flag for explosions.

* Make the error reporting method non-abstract.

This is not a mandatory method for many hooks.

* Delete this class as it is not used any more and just duplicate.

* Added test class.

* Minor issues resolved.
2023-12-28 10:30:20 +09:00
tastybento
86d8d147d1
Delete slimefun chunks/blocks when island is deleted. (#2247) 2023-12-24 21:24:21 +09:00
BONNe
96499f3ad6
Improves obsidian platform generation (#2246)
The obsidian platform was not generating constantly in the same spot. It was moving depending on the entrance point (from the sides).
This code changes it, as it will move through relative blocks. 
Also, this change will sync portal and platform center points, which was not done previously. 

Fixes #2239
2023-12-24 13:19:45 +09:00
tastybento
b260cf1f4f Add backward compatibility handleing for GRASS 2023-12-23 08:42:46 +09:00
tastybento
f6e26aa5bd Fix admin register command to handle worlds correctly
The register command was failing if a player had more that one island,
even if the island was in a different game mode.
2023-12-19 04:51:10 -08:00
tastybento
1ef55a2b1e Fix issue where seed worlds lost generators with Multiverse on restart 2023-12-19 04:36:00 -08:00
tastybento
b2f5a441e5 Added 1.20.4 compatibility. 2023-12-10 09:23:10 -08:00
tastybento
8dce036d70 Workaround to avoid massive test failures.
The addition of a null check in the Enchantment Bukkit code causes a lot
of test failures. While we work out how to mock that particular area,
this code avoids running Enchantment code when under test.
2023-12-10 09:18:54 -08:00
tastybento
55e94b4c9f Revert "Rewrote PanelItemTest to avoid null check errors in Bukkit class"
This reverts commit 5a193cda1c.
2023-12-10 09:10:48 -08:00
tastybento
5a193cda1c Rewrote PanelItemTest to avoid null check errors in Bukkit class 2023-12-09 09:25:07 -08:00
tastybento
af861f2a34 Update to 1.20.3 2023-12-06 13:45:44 -08:00
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
tastybento
26e6310fba Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2023-12-02 11:51:58 -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
9fe5212c3c Added AddonEvent test class. 2023-11-25 18:43:18 -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