Skip to content

Commit

Permalink
Push Biomes 1.6.0.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Sep 3, 2019
2 parents a657b23 + b0df4ce commit 769fdea
Show file tree
Hide file tree
Showing 43 changed files with 3,254 additions and 696 deletions.
37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/contributor-request.md

This file was deleted.

21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Biomes addon for SkyBlock, SkyGrid, CaveBlock and AcidIsland. It allows to chang
## Where to find

Currently Biomes Addon is in **Beta stage**, so it may or may not contain bugs... a lot of bugs. Also it means, that some features are not working or implemented.
Latest official **Beta Release is 1.5.0.0**, and you can download it from [Release tab](https://github.com/BentoBoxWorld/Biomes/releases)
Latest official **Beta Release is 1.6.0.1**, and you can download it from [Release tab](https://github.com/BentoBoxWorld/Biomes/releases)

Or you can try **nightly builds** where you can check and test new features that will be implemented in next release from [Jenkins Server](https://ci.codemc.org/job/BentoBoxWorld/job/Biomes/lastStableBuild/).

Expand All @@ -23,21 +23,8 @@ If you like this addon but something is missing or is not working as you want, y

## Config.yml

The *config.yml* has following sections:

* Advanced Menu: if this is *true*, users will be able to choose all options how the biome can be updated.
* Default Type: this allows to choose default selected type that will be available when users opens Biome GUI.
Valid values are *'ISLAND', 'CHUNK' and 'SQUARE'*
* Default Size: this allows to set default value that will be set when Biome GUI is opened. It must be integer larger then 0.
* Reset Biomes: if this is *true*, on owner change, addon will reset biome on whole island to default biome, if user does not have biomes.set permission.
* Timeout: this allows to set some delay before user can change biome on his island again.
* biomes-visibility: this variable allows to choose which biomes users can see in Biomes GUI.
Valid values are *'ALL', 'DEPLOYED' , 'ACCESSIBLE' and 'TOGGLEABLE'*
* disabled-gamemodes: this allows to disable Biomes Addon in certain GameModes. To disable GameMode just need to add new line with "-" in front of GameMode name, f.e.:
```
disabled-gamemodes:
- BSkyBlock
```
After addon is successful installed, it will create config.yml file. Every option in this file comes with comments about them. Please check file for more information.
Most of options are also editable admin via commands.

## Biomes.yml

Expand All @@ -49,6 +36,8 @@ Note that you must import biomes into both BSkyBlock and AcidIsland separately.

## User commands

Users can access to biomes addon commands with `/[gamemode] biomes` command. By default for BSkyBlock it is **/island biomes**, for AcidIsland - **/ai biomes**, for CaveBlock - **/cave biomes**, for SkyGrid - **/sg biomes**.

* `/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.
Expand Down
10 changes: 5 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This page contains plans for each Addon version.
- [x] On owner change, reset biomes that is not available for new owner.

## Release 0.5.0
- [ ] Rework GUI again:
- [ ] Do the same tricks as in Challenges GUI.
- [ ] Add proper Biomes Description #18
- [ ] Simplify user GUI
- [x] Rework GUI again:
- [x] Do the same tricks as in Challenges GUI.
- [x] Add proper Biomes Description #18
- [x] Simplify user GUI
- [ ] Store Biome change information per:
- [ ] Player
- [ ] Island
- [ ] Implement more cost options:
- [ ] Cost per biome change (linear / exponential)
- [ ] Cost per block
- [ ] Remove deprecated code.
- [x] Remove deprecated code.

## Release 0.4.0
- [ ] Create unlockable biomes:
Expand Down
18 changes: 6 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
<powermock.version>1.7.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.5.0</bentobox.version>
<level.version>1.4.0</level.version>
<bentobox.version>1.6.0</bentobox.version>
<level.version>1.6.0</level.version>
<vault.version>1.7</vault.version>
<anvilgui.version>1.2.1-SNAPSHOT</anvilgui.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.5.0.0</build.version>
<build.version>1.6.0.1</build.version>
<build.number>-LOCAL</build.number>
</properties>

Expand Down Expand Up @@ -108,8 +107,8 @@
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
<repository>
<id>wesjd-repo</id>
<url>https://nexus.wesjd.net/repository/thirdparty/</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

Expand All @@ -131,19 +130,14 @@
<artifactId>level</artifactId>
<version>${level.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>${anvilgui.version}</version>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>${vault.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencies>

<build>
<!-- By default ${revision} is ${build.version}-SNAPSHOT -->
Expand Down
49 changes: 44 additions & 5 deletions src/main/java/world/bentobox/biomes/BiomesAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@

import org.bukkit.Bukkit;
import org.bukkit.Material;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.World;
import java.util.Iterator;
import java.util.Optional;

import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.flags.Flag;
import world.bentobox.bentobox.hooks.VaultHook;
import world.bentobox.bentobox.managers.RanksManager;
import world.bentobox.biomes.commands.admin.AdminCommand;
import world.bentobox.biomes.commands.user.BiomesCommand;
import world.bentobox.biomes.database.objects.BiomeChunkUpdateObject;
import world.bentobox.biomes.handlers.BiomeDataRequestHandler;
import world.bentobox.biomes.handlers.BiomeListRequestHandler;
import world.bentobox.biomes.handlers.ChangeBiomeRequestHandler;
import world.bentobox.biomes.listeners.ChangeOwnerListener;
import world.bentobox.biomes.config.Settings;
import world.bentobox.biomes.listeners.ChunkLoadListener;
import world.bentobox.level.Level;


Expand Down Expand Up @@ -121,6 +122,7 @@ public void onEnable()

// Register the reset listener
this.registerListener(new ChangeOwnerListener(this));
this.registerListener(new ChunkLoadListener(this));

// Register Flags
this.registerFlag(BIOMES_WORLD_PROTECTION);
Expand All @@ -131,6 +133,37 @@ public void onEnable()
this.registerRequestHandler(new BiomeListRequestHandler(this));

this.registerRequestHandler(new ChangeBiomeRequestHandler(this));

// This task will force-load chunk every 5th tick if its biome is not updated.
Bukkit.getScheduler().runTaskTimer(this.getPlugin(), () -> {
Iterator<BiomeChunkUpdateObject> iterator = this.addonManager.getBiomeUpdaterCollection().iterator();

// if there is nothing to load, then skip.
if (!iterator.hasNext())
{
return;
}

BiomeChunkUpdateObject updater = iterator.next();

// if chunk is already force-loaded, then skip.
while (iterator.hasNext() && updater.isForceLoaded())
{
updater = iterator.next();
}

World world = updater.getWorld();

// if chunk is loaded then skip.
if (!world.isChunkLoaded(updater.getChunkX(), updater.getChunkZ()))
{
// Set flag as force-loaded.
updater.setForceLoaded(true);

// force-load chunk.
world.loadChunk(updater.getChunkX(), updater.getChunkZ());
}
}, 5L, 5L);
}
else
{
Expand Down Expand Up @@ -315,15 +348,21 @@ public boolean isLevelProvided()
* player to their island. Useful for skygrid without protection flags.
*/
public static Flag BIOMES_WORLD_PROTECTION =
new Flag.Builder("BIOMES_WORLD_PROTECTION", Material.GRASS_BLOCK).type(Flag.Type.WORLD_SETTING).defaultSetting(true).build();
new Flag.Builder("BIOMES_WORLD_PROTECTION", Material.GRASS_BLOCK).
type(Flag.Type.WORLD_SETTING).
mode(Flag.Mode.ADVANCED).
defaultSetting(true).
build();

/**
* This flag allows to define which users can change biomes. F.e. it can be set
* that only Island owner can change biomes.
* By default it is set to Visitor.
*/
public static Flag BIOMES_ISLAND_PROTECTION =
new Flag.Builder("BIOMES_ISLAND_PROTECTION", Material.GRASS_BLOCK).defaultRank(RanksManager.VISITOR_RANK).build();
new Flag.Builder("BIOMES_ISLAND_PROTECTION", Material.GRASS_BLOCK).
mode(Flag.Mode.ADVANCED).
build();


// ---------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 769fdea

Please sign in to comment.