Skip to content

Commit 9094221

Browse files
BONNegitlocalize-app[bot]DJIronictastybentoSizarra
authored
Release 2.0 version (#99)
* Fixes an issue when creating biome with existing name crashes a GUI. * Translate cs.yml via GitLocalize (#89) Co-authored-by: Šimon Čecháček <[email protected]> * Fixes a bug with missing last biome in biome creation gui. * Github workflows sonar cloud * Update BiomeUpdateHelper.java Prevents an NPE when changing island owner. #92 * Fixes an issue when biomes prevents server from turning off in acceptable time (#90). Rework the way how biome is applied. Use temporary chunk loading before applying biome change to the area. This will change biome for every island chunks, and will not relay on storing data about biome change. * Fixes an issue when biomes prevents server from turning off in acceptable time (#90). (#93) Rework the way how biome is applied. Use temporary chunk loading before applying biome change to the area. This will change biome for every island chunks, and will not relay on storing data about biome change. * Update to 1.17 and Pladdon. * Move Addon Manager to a separate package. * Add CommonPanel and CommonPagedPanel classes. Prepare for reworking all panels. * Add dripstone and lush caves to the unused biomes. * Rework eng locale. * Add ManageBiomesPanel. Populate translation file with new values. * Create BiomeSelector and EnvironmentSelector Add PagedSelector class. * Rework EditBiomePanel. Fixes EnvironmentSelector. * Fix some warnings in EditBiomePanel * Update Settings file. Remove unnecessary parts. * Add method that allows to save settings. * Migrate EditSettingsPanel to the new CommonPanel structure. * Migrate ListBiomesPanel to the new format. * Rename to SettingsPanel * Rename panels to make them more consistent names. * Create Island Manage Panel * Create biomes island data object. * Fix compilation and test issues. * Update gitignore * Update github action to Java 17 * Add more data to the BiomesIslandDataObject. * Translate hu.yml via GitLocalize (#96) Co-authored-by: Sizarra <[email protected]> * Rework Addon Settings * Implement clear method for island data * Change clone to proper copy method. Clean up some syntax. * Implement BiomesBundle object. * Implement new functions in Manager to handle all new objects. * Create new import manager that will handle all file importing. * Update handlers to the changes. * Add BiomesBuyEvent and BiomeUnlockEvent * Update helper and task to the changes. * Add WebManager class that will allow to download data from repo. * Add permission methods in Utils. Update Biome Grouping to 1.18 changes. * Add some extra parameters to the Constants. * Add proper description generation to the bundles. * Update BiomeSelector with proper biome groups. * Implement BundleSelector which allows selecting bundle via GUI. * Complete Admin Menu Rework. Implement better data handling then in previous version. * Implement Customizable User Panels. * Rework Commands for addon. * Fixes main addon class. * Remove unnecessary classes. * Remove tests as main class is removed. * Update main pom. * Complete locales rework based on changes. * Add new features to the BiomesObject: - unlock items, - unlock cost, - change items, - change type, - change increment * Implement new features in admin menu. * Add some methods for easier working with BiomesIslandDataObject * Add some methods for easier working with BiomesIslandDataObject * Rename Buy event to Purchase. * Rework BiomePurchasedEvent. Use user, island and biomesObjects instead of their uuids. * Rework BiomeUnlockedEvent. Use user, island and biomesObjects instead of their uuids. * Add BiomePreChangeEvent that is triggered before starting biome change task. * Add 2 new options: - biome-change-timeout - timeout when biome change should be stopped. - parallel-biome-changes - number of parallel biome change processes. * Implement better biome change task. Implement singe biome change queue, that will process biome changes. Rework BiomeUpdateHelper and BiomeUpdateTask to reflect changes made for UpdateQueue. Rework BiomeChangedEvent so it is similar to other events. * Add missing object in helper constructors. * Fix crash when opening AdvancedPanel * Add Biomes Command Wrapper. This class contains useful methods for all commands. * Add admin biomes set command. * Fixes bugs in AdvancedPanel * Implement BUY mode in BiomesPanel. Switch from strict single-click-type mode to "array" of modes. Allows to have both: buy and choose buttons with the same click type. * Remove Button that is not used. * Implement option for admins to unlock and buy biomes for players. * Fixes bugs with AdvancedPanel which prevented users to change biome. * Fixes a bug when Biome changing with creative menu fails. * Fixes some bugs with description generation. - Fixes unnecessary unlock message generation. - Remove displaying "mode" when it is not necessary. - Add missing item colors. * Improves "buy" detection. Biomes without unlock cost and unlock items will be marked as "purchased." * Add JoinLeaveListener. This listener will manage when island data must be validated. * Add better feedback to users about biome changing process. * Implement storing of biome usage time. * Implement an ability to add empty line in descriptions. This can be achieved by adding `|`. The `|` will be replaced with empty line. If users want to use `|` symbol in their text, they need to escape it with `\` (`\|`) * Fixes an issue with broken admin gui that did not allow changing biome. Add error messages about issues with executing commands. * Add an ability to change biome change counter via admin menu. * Use proper command to detect if biome is purchased. * Add missing settings option to the config. * Fixes the unlock texts. * Add IslandLevelListener. This class listens for level calculation, and will update "unlocked" biomes for the player. * Prettify and reformat code. * Update copy-rights * Fixes a bug when "notify" was triggered only when GUI was opened. * Implement Bank addon usage. Admins now can enable that all money will be taken from the bank account. * Update config file * Add UpdateQueue.Result name method. * Fixes migration to the new BiomesObject format. * Update addon.yml file. * Rework and reimplement template file and its importing. * Remove unnecessary world variable from the BiomesObject class. * Add Lavian locale. Fix small bugs in eng locale. * Disable info command. * Fixes broken task starter. * Implement properly Purchase mechanism * Implement Admin Unlock command. * Fixes icon for frozen ocean * Add migration for older ids. Some id for biome objects were created with capital letters. This change will remove them via migration. * Implement BuyPanel. Split BiomesPanel into Change and Purchase mode. This allows to easily see available biomes for the users. * Fixes a bug, when players in creative menu still receive a message about missing items. * Fixes a bug, when players in creative menu still receive a message about missing items. * Add return button in AdvancedPanel * Change some text outputs for BiomesPanel * Remove hu.yml as it is outdated. * Update README.md file * Add ability to disable chunkRefresh method via config option. Apparently, chunkRefresh creates issues with Holographic Display plugin. Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com> Co-authored-by: Šimon Čecháček <[email protected]> Co-authored-by: tastybento <[email protected]> Co-authored-by: tastybento <[email protected]> Co-authored-by: Sizarra <[email protected]>
1 parent 4a54ab8 commit 9094221

File tree

101 files changed

+21514
-13052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+21514
-13052
lines changed

.github/workflows/build.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 17
21+
- name: Cache SonarCloud packages
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.sonar/cache
25+
key: ${{ runner.os }}-sonar
26+
restore-keys: ${{ runner.os }}-sonar
27+
- name: Cache Maven packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.m2
31+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+
restore-keys: ${{ runner.os }}-m2
33+
- name: Build and analyze
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

.travis.yml

-22
This file was deleted.

README.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ you can try **snapshot builds** where you can check and test new features that w
1515

1616
If you like this addon but something is missing or is not working as you want, you can always submit an [Issue request](https://github.com/BentoBoxWorld/Biomes/issues) or get a support in Discord [BentoBox ![icon](https://avatars2.githubusercontent.com/u/41555324?s=15&v=4)](https://discord.gg/JgWKvR)
1717

18+
More information about the Biomes Addon you can find here: [Wiki Biomes](https://docs.bentobox.world/en/latest/addons/Biomes/)
19+
1820
## Translations
1921

2022
As most of BentoBox projects, Biomes Addon is translatable in any language. Everyone can contribute, and translate some parts of the addon in their language via [GitLocalize](https://gitlocalize.com/repo/2894).
@@ -24,8 +26,8 @@ If your language is not in the list, please contact to developers via Discord an
2426

2527
1. Place the addon jar in the addons folder of the BentoBox plugin
2628
2. Restart the server
27-
3. The addon will create a data folder and inside the folder will be a *config.yml* and an example *biomes.yml*
28-
4. Edit the config.yml and *biomes.yml* files how you want. The *biomes.yml* is for importing only.
29+
3. The addon will create a data folder and inside the folder will be a *config.yml* and an example *biomesTemplate.yml*
30+
4. Edit the config.yml and *biomesTemplate.yml* files how you want. The *biomesTemplate.yml* is for importing only.
2931
5. Restart the server
3032

3133
## Config.yml
@@ -48,7 +50,7 @@ Users can access to biomes addon commands with `/[gamemode] biomes` command. By
4850

4951
* `/is biomes`: This method opens GUI that allows to change biome on User island.
5052
* `/is biomes help`: Show help for all the commands
51-
* `/is biomes info <biome>`: This command returns information about given biome, like cost and necessary level.
53+
* `/is biomes buy <biome>`: This command allows to buy given biome.
5254
* `/is biomes set <biome> [<type>] [<size>]`: This command allows to change biome on island without opening GUI. If prarameters < type> and < size> are not provided, command uses default values from addon config.
5355

5456
## Admin commands
@@ -57,25 +59,18 @@ There are a few admin commands and more being written. The main biomes admin com
5759

5860
* `/bsbadmin biomes`: To open Admin GUI.
5961
* `/bsbadmin biomes help` : Show help for all the commands
60-
* `/bsbadmin biomes import [overwrite]`: import biomes from biomes.yml
61-
* `/bsbadmin biomes add <biome>`: add a new biome what can be edited via GUI or `biomes edit` command. Biome will not be deployed. To do it, you should enable it in GUI or via `biomes edit <biome> deployed true` command.
62+
* `/bsbadmin biomes import <file>`: import biomes from biomes.yml
6263
* `/bsbadmin biomes set <player> <biome> [<type>] [<size>]`: This command works the same as user biome set command, but it is necessary to provide also player, which island biome will be updated.
63-
* `/bsbadmin biomes edit <biome> <property> <new_value>`: This command allows to edit provided biome property to new value.
64-
* `/bsbadmin biomes settings <property> <new_value>`: This command allows to edit current addon settings via command.
64+
* `/bsbadmin biomes unlock <player> <biome> [true]`: This command unlocks passed biome to a player island..
6565

6666
## Permissions
6767

6868
`{GameModePrefix}` is permission prefix for each Game Mode addon. F.e. BSkyBlock addon permission prefix is 'bskyblock' but AcidIsland permission prefix is 'acidisland'.
6969

7070
###### User permissions:
7171
- `{GameModePrefix}.biomes`: player can use biomes command that opens GUI.
72-
- `{GameModePrefix}.biomes.info`: player can use biomes info command.
72+
- `{GameModePrefix}.biomes.buy`: player can use biomes buy command.
7373
- `{GameModePrefix}.biomes.set`: player can use biomes set command.
7474

7575
###### Admin permissions:
7676
- `{GameModePrefix}.admin.biomes`: player can use admin biomes command that opens GUI.
77-
- `{GameModePrefix}.admin.biomes.add`: player can use admin biomes add command that adds new biome.
78-
- `{GameModePrefix}.admin.biomes.edit`: player can use admin biomes edit command that edits existing biomes parameters.
79-
- `{GameModePrefix}.admin.biomes.set`: player can use admin biomes set command that allows to change other player biomes.
80-
- `{GameModePrefix}.admin.biomes.import`: player can use admin biomes import command allows to import biomes in world.
81-
- `{GameModePrefix}.admin.biomes.settings`: player can use admin biomes settings command that allows to change addon settings.

pom.xml

+52-5
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,25 @@
4343
<properties>
4444
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4545
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
46-
<java.version>1.8</java.version>
46+
<java.version>17</java.version>
4747
<powermock.version>2.0.2</powermock.version>
4848
<!-- More visible way how to change dependency versions -->
49-
<spigot.version>1.16.4-R0.1-SNAPSHOT</spigot.version>
50-
<bentobox.version>1.15.4</bentobox.version>
49+
<spigot.version>1.18-R0.1-SNAPSHOT</spigot.version>
50+
<bentobox.version>1.20.0-SNAPSHOT</bentobox.version>
51+
<bank.version>1.4.0</bank.version>
5152
<level.version>2.5.0</level.version>
5253
<greenhouses.version>1.4.0-SNAPSHOT</greenhouses.version>
5354
<vault.version>1.7</vault.version>
55+
<panelutils.version>1.0.0</panelutils.version>
5456
<!-- Revision variable removes warning about dynamic version -->
5557
<revision>${build.version}-SNAPSHOT</revision>
5658
<!-- This allows to change between versions and snapshots. -->
57-
<build.version>1.14.0</build.version>
59+
<build.version>2.0.0</build.version>
5860
<build.number>-LOCAL</build.number>
61+
<!-- Sonar Cloud -->
62+
<sonar.projectKey>BentoBoxWorld_Biomes</sonar.projectKey>
63+
<sonar.organization>bentobox-world</sonar.organization>
64+
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
5965
</properties>
6066

6167
<profiles>
@@ -148,12 +154,24 @@
148154
<version>${spigot.version}</version>
149155
<scope>provided</scope>
150156
</dependency>
157+
<dependency>
158+
<groupId>org.spigotmc</groupId>
159+
<artifactId>plugin-annotations</artifactId>
160+
<version>1.2.3-SNAPSHOT</version>
161+
<scope>provided</scope>
162+
</dependency>
151163
<dependency>
152164
<groupId>world.bentobox</groupId>
153165
<artifactId>bentobox</artifactId>
154166
<version>${bentobox.version}</version>
155167
<scope>provided</scope>
156168
</dependency>
169+
<dependency>
170+
<groupId>world.bentobox</groupId>
171+
<artifactId>bank</artifactId>
172+
<version>${bank.version}</version>
173+
<scope>provided</scope>
174+
</dependency>
157175
<dependency>
158176
<groupId>world.bentobox</groupId>
159177
<artifactId>level</artifactId>
@@ -166,6 +184,12 @@
166184
<version>${greenhouses.version}</version>
167185
<scope>provided</scope>
168186
</dependency>
187+
<dependency>
188+
<groupId>lv.id.bonne</groupId>
189+
<artifactId>panelutils</artifactId>
190+
<version>${panelutils.version}</version>
191+
<scope>compile</scope>
192+
</dependency>
169193
<dependency>
170194
<groupId>net.milkbowl.vault</groupId>
171195
<artifactId>VaultAPI</artifactId>
@@ -191,6 +215,12 @@
191215
<version>${powermock.version}</version>
192216
<scope>test</scope>
193217
</dependency>
218+
<dependency>
219+
<groupId>org.jetbrains</groupId>
220+
<artifactId>annotations</artifactId>
221+
<version>22.0.0</version>
222+
<scope>provided</scope>
223+
</dependency>
194224
</dependencies>
195225

196226
<build>
@@ -234,6 +264,7 @@
234264
<configuration>
235265
<source>${java.version}</source>
236266
<target>${java.version}</target>
267+
<release>${java.version}</release>
237268
</configuration>
238269
</plugin>
239270
<plugin>
@@ -280,9 +311,25 @@
280311
<plugin>
281312
<groupId>org.apache.maven.plugins</groupId>
282313
<artifactId>maven-shade-plugin</artifactId>
283-
<version>3.1.1</version>
314+
<version>3.3.1-SNAPSHOT</version>
284315
<configuration>
285316
<minimizeJar>true</minimizeJar>
317+
<artifactSet>
318+
<includes>
319+
<include>lv.id.bonne:panelutils:*</include>
320+
</includes>
321+
</artifactSet>
322+
<transformers>
323+
<!-- Add a transformer to exclude any other manifest files (possibly from dependencies). -->
324+
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
325+
<resource>MANIFEST.MF</resource>
326+
</transformer>
327+
<!-- Add a transformer to include your custom manifest file. -->
328+
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
329+
<resource>META-INF/MANIFEST.MF</resource>
330+
<file>src/main/resources/META-INF/MANIFEST.MF</file>
331+
</transformer>
332+
</transformers>
286333
</configuration>
287334
<executions>
288335
<execution>

src/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.DS_Store

0 commit comments

Comments
 (0)