Commit Graph

3422 Commits

Author SHA1 Message Date
BONNe 90ebe103c4
Templated Panel Title Parameters (#1934)
* Implement parameter adding to the templated panel title.

There was an issue when templated panels were always static, and api did not have a way how to change it. This will allow passing parameters to the tile, and allow adding dynamic texts.

* Implement parameter adding to the templated panel title.

There was an issue when templated panels were always static, and api did not have a way how to change it. This will allow passing parameters to the tile, and allow adding dynamic texts.
2022-01-28 18:43:14 -08:00
Huynh Tien 178529adb1
Fix null in reject invite (#1933)
* remove debug

* fix null in reject invite
2022-01-28 18:42:56 -08:00
BONNe 52cc2a8593
Implement multiple panels in single file (#1932)
The existing template file reader could read a single configuration section from a file, and the section was required to start with the same name as the file.
This changes it and allows to read any configuration section from the panel.

This change is backward compatible and does not influence existing panels.
2022-01-28 18:42:23 -08:00
BONNe 3ecdda65b5
Fixed bug with running onLeave commands (#1929)
In discord, it was reported that running the admin delete command produces a null-pointer if `[player]` placeholder is used.

With fast checking I found out the issue: incorrect user was passed to the command.
Also, I moved runCommands below all resets, so commands could be used to give items, or xp or other stuff that is removed.
2022-01-28 18:42:02 -08:00
BONNe da98bbcf38
Extend ranked commands (#1928)
* Add CompositeCommand#defaultCommandRank variable.

This variable stores default rank for a command. This adds more flexibility to the Island#commandRanks object. This change allows specifying default rank for each command.

* Add more commands for users to configure on their islands.

Owners now can specify who can use:
- sethome command
- renamehome command
- deletehome command
- setname command
- resetname command
2022-01-28 18:41:20 -08:00
tastybento 7b94aa0ea2
Adds bonus range elements to Island object. (#1921)
* Adds bonus range elements to Island object.

Admin commands still need to be adjusted or added to support management
of the bonus ranges.

* Changed to mutable class

Fixed bugs.
2022-01-28 18:35:55 -08:00
BONNe 54869a400a
Implement duplicated actions click type (#1919)
Some addons may want to introduce two different actions with the same click type.
This change will allow to do it, as now actions may be defined as lists instead of configuration sections.

To use it, action must be defined a bit differently:
```
      actions:
        - click-type: <value of enum ClickType>  # required
          type: <value of String> # not required
          content: <value of String>  # not required
          tooltip: <value of String>  # not required
        - click-type: <value of enum ClickType>  # required
          type: <value of String> # not required
          content: <value of String>  # not required
          tooltip: <value of String>  # not required
```

Co-authored-by: tastybento <tastybento@users.noreply.github.com>
2022-01-28 18:35:27 -08:00
BONNe 56c9f5c28e
Fixes a bug with on-join commands not working when players join the team. #1925 (#1926) 2022-01-23 15:25:27 -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 5573e9f329 Fix TNTListener tests 2022-01-22 11:57:11 -08:00
tastybento 823bc5ceed Fix Fire tests 2022-01-22 11:54:00 -08:00
tastybento f25e54f3c8 Return void for event listeners
https://github.com/BentoBoxWorld/BentoBox/issues/1918
2022-01-21 18:47:31 -08:00
tastybento 5ab89ac63d Fix tests 2022-01-15 16:20:12 -08:00
tastybento 046c4fff35 Fix for double chest protection.
Double chests could be viewed but not accessed even if chest access or
trapped chest access was allowed.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1912
2022-01-09 20:53:47 -08:00
tastybento bea9f0e394 List must be mutable. Remove debug. 2022-01-09 20:41:20 -08:00
tastybento 721f0271aa Dynamically grab flags
https://github.com/BentoBoxWorld/BentoBox/issues/1915
2022-01-09 19:44:44 -08:00
tastybento b63df41082 Remove |+ block chunking marker
https://github.com/BentoBoxWorld/BentoBox/issues/1914
2022-01-09 14:14:04 -08:00
tastybento d06688ad45 Remove the |+ block code because it adds linefeeds
At least with the latest server it does.

https://github.com/BentoBoxWorld/BentoBox/issues/1914
2022-01-08 15:16:01 -08:00
tastybento 00e174258e Hook into Vault after other plugins have loaded.
https://github.com/BentoBoxWorld/BentoBox/issues/1913
2022-01-07 19:08:15 -08:00
BONNe eaf2236f7f
Fixes a bug that increased all button count by 1 (#1911)
This will fix an issue when the next button was not displayed when it was necessary.
2022-01-07 18:48:25 -08:00
gitlocalize-app[bot] ff4a7c9d61
Translate vi.yml via GitLocalize (#1910)
Co-authored-by: HSGamer <huynhqtienvtag@gmail.com>
2022-01-07 18:47:58 -08:00
gitlocalize-app[bot] 318d399a5b
Translate zh-CN.yml via GitLocalize (#1908)
Co-authored-by: DuckSoft <realducksoft@gmail.com>
2022-01-07 18:47:46 -08:00
tastybento 5c94f97e71 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop 2022-01-02 12:27:09 -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
gitlocalize-app[bot] 2d08e28a01
Translate zh-CN.yml via GitLocalize (#1907)
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2022-01-01 18:20:24 -08:00
gitlocalize-app[bot] c1f33ad1d4
Dutch translation (#1906)
* Translate nl.yml via GitLocalize

* Translate nl.yml via GitLocalize

* Translate nl.yml via GitLocalize

Co-authored-by: mt-gitlocalize <mt@gitlocalize.com>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: Dark_Ville <darkville13@gmail.com>
2022-01-01 18:16:50 -08:00
gitlocalize-app[bot] a5f093758c
Translate tr.yml via GitLocalize (#1905)
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
2022-01-01 18:13:29 -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
BONNe d1eb175e88
Change AbsolutePath to CanonicalPath (#1901)
I am not 100% sure if this would fix https://github.com/BentoBoxWorld/BSkyBlock/issues/451

However, searching google I found that others had a similar issue with the absolute path and they changed it to canonical. 

As I was not able to reproduce the main reported issue, I do not know if this fixes it.
2022-01-01 17:45:05 -08:00
Huynh Tien 7088a2736f
Flags for Block Explode (#1899)
* add Block Explosion support for TNT_DAMAGE flag

* prevent block explosion from damaging entities

* seperated flags for block explode

* invert and cancel

* pattern instanceof
2022-01-01 17:42:46 -08:00
Huynh Tien dffe8a811e
fix an exception when cleaning an offline player (#1898) 2022-01-01 17:39:25 -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
Huynh Tien c9c9ea0389
Fix Biome compatibility on 1.17 (#1895)
* Fix Biome compatibility on 1.17

* check if it's not 1.17.1
2022-01-01 17:34:51 -08:00
gitlocalize-app[bot] b6a739db00
German Translation (#1904)
* Translate de.yml via GitLocalize

* Translate de.yml via GitLocalize

Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: Rikamo045 <rik.amos.krajinovic@gmail.com>
2022-01-01 17:33:11 -08:00
tastybento 17ac4f688a Add an admin delete homes command
https://github.com/BentoBoxWorld/BentoBox/issues/1900

This admin command removes all homes from a specified island.
2021-12-31 10:51:16 -08:00
tastybento bf62f18de5 Version 1.20.0 2021-12-31 10:49:46 -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
Huynh Tien e3b99195ca
Optimize safe location searching with configurable range limit (#1892)
* better safe spot finder

* this should be better

* limit how far the y-coordinate will be expanded

* load chunks passively
2021-12-20 09:44:34 -08:00
Huynh Tien 333c9a8272 load chunks passively 2021-12-20 19:37:50 +07:00
BONNe ed50765b98
Addres Biome's changes in Minecraft 1.18. (#1893)
Since Minecraft 1.18 renamed and removed a lot of biomes, some addons that stored them in the database may require migration.

This Adapter will fix that as now BentoBox itself will do migration for all Biome.class objects.
2021-12-19 08:49:29 -08:00
Huynh Tien 168de622ea limit how far the y-coordinate will be expanded 2021-12-19 20:40:01 +07:00