Skip to content

Commit

Permalink
Release 2.0 version (#99)
Browse files Browse the repository at this point in the history
* Fixes an issue when creating biome with existing name crashes a GUI.

* Translate cs.yml via GitLocalize (#89)

Co-authored-by: Šimon Čecháček <dj@life-games.cz>

* 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 <kreka2002@gmail.com>

* 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 <dj@life-games.cz>
Co-authored-by: tastybento <tastybento@wasteofplastic.com>
Co-authored-by: tastybento <tastybento@users.noreply.github.com>
Co-authored-by: Sizarra <kreka2002@gmail.com>
  • Loading branch information
6 people committed Mar 3, 2022
1 parent 4a54ab8 commit 9094221
Show file tree
Hide file tree
Showing 101 changed files with 21,514 additions and 13,052 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build
on:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ you can try **snapshot builds** where you can check and test new features that w

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)

More information about the Biomes Addon you can find here: [Wiki Biomes](https://docs.bentobox.world/en/latest/addons/Biomes/)

## Translations

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).
Expand All @@ -24,8 +26,8 @@ If your language is not in the list, please contact to developers via Discord an

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

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

* `/is biomes`: This method opens GUI that allows to change biome on User island.
* `/is biomes help`: Show help for all the commands
* `/is biomes info <biome>`: This command returns information about given biome, like cost and necessary level.
* `/is biomes buy <biome>`: This command allows to buy given biome.
* `/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.

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

* `/bsbadmin biomes`: To open Admin GUI.
* `/bsbadmin biomes help` : Show help for all the commands
* `/bsbadmin biomes import [overwrite]`: import biomes from biomes.yml
* `/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.
* `/bsbadmin biomes import <file>`: import biomes from biomes.yml
* `/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.
* `/bsbadmin biomes edit <biome> <property> <new_value>`: This command allows to edit provided biome property to new value.
* `/bsbadmin biomes settings <property> <new_value>`: This command allows to edit current addon settings via command.
* `/bsbadmin biomes unlock <player> <biome> [true]`: This command unlocks passed biome to a player island..

## Permissions

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

###### User permissions:
- `{GameModePrefix}.biomes`: player can use biomes command that opens GUI.
- `{GameModePrefix}.biomes.info`: player can use biomes info command.
- `{GameModePrefix}.biomes.buy`: player can use biomes buy command.
- `{GameModePrefix}.biomes.set`: player can use biomes set command.

###### Admin permissions:
- `{GameModePrefix}.admin.biomes`: player can use admin biomes command that opens GUI.
- `{GameModePrefix}.admin.biomes.add`: player can use admin biomes add command that adds new biome.
- `{GameModePrefix}.admin.biomes.edit`: player can use admin biomes edit command that edits existing biomes parameters.
- `{GameModePrefix}.admin.biomes.set`: player can use admin biomes set command that allows to change other player biomes.
- `{GameModePrefix}.admin.biomes.import`: player can use admin biomes import command allows to import biomes in world.
- `{GameModePrefix}.admin.biomes.settings`: player can use admin biomes settings command that allows to change addon settings.
57 changes: 52 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,25 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
<powermock.version>2.0.2</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.16.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.15.4</bentobox.version>
<spigot.version>1.18-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.20.0-SNAPSHOT</bentobox.version>
<bank.version>1.4.0</bank.version>
<level.version>2.5.0</level.version>
<greenhouses.version>1.4.0-SNAPSHOT</greenhouses.version>
<vault.version>1.7</vault.version>
<panelutils.version>1.0.0</panelutils.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.14.0</build.version>
<build.version>2.0.0</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Biomes</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<profiles>
Expand Down Expand Up @@ -148,12 +154,24 @@
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>plugin-annotations</artifactId>
<version>1.2.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
<version>${bentobox.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bank</artifactId>
<version>${bank.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>level</artifactId>
Expand All @@ -166,6 +184,12 @@
<version>${greenhouses.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>lv.id.bonne</groupId>
<artifactId>panelutils</artifactId>
<version>${panelutils.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
Expand All @@ -191,6 +215,12 @@
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -234,6 +264,7 @@
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -280,9 +311,25 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.1-SNAPSHOT</version>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>lv.id.bonne:panelutils:*</include>
</includes>
</artifactSet>
<transformers>
<!-- Add a transformer to exclude any other manifest files (possibly from dependencies). -->
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
<resource>MANIFEST.MF</resource>
</transformer>
<!-- Add a transformer to include your custom manifest file. -->
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/MANIFEST.MF</resource>
<file>src/main/resources/META-INF/MANIFEST.MF</file>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
Expand Down
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.DS_Store

0 comments on commit 9094221

Please sign in to comment.