Skip to content

Commit

Permalink
Version 1.6.0
Browse files Browse the repository at this point in the history
Fixed bug with tree growing event
  • Loading branch information
tastybento committed Aug 17, 2019
1 parent 2044ab5 commit b47cda2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>world.bentobox</groupId>
<artifactId>dimensionaltrees</artifactId>
<version>${revision}</version>
<version>${revision}</version>
<packaging>jar</packaging>

<name>DimensionalTrees</name>

<description>Add different trees to the other dimensions</description>

<url>https://github.com/BentoBoxWorld/DimensionalTrees</url>
<inceptionYear>2019</inceptionYear>
<scm>

<scm>
<connection>scm:git:https://github.com/BentoBoxWorld/DimensionalTrees.git</connection>
<developerConnection>scm:git:[email protected]:BentoBoxWorld/DimensionalTrees.git</developerConnection>
<url>https://github.com/BentoBoxWorld/DimensionalTrees</url>
Expand Down Expand Up @@ -50,11 +50,11 @@
<powermock.version>1.7.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.14.3-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.6.0-SNAPSHOT</bentobox.version>
<bentobox.version>1.6.0</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.0.1</build.version>
<build.version>1.6.0</build.version>
<build.number>-LOCAL</build.number>
</properties>

Expand Down
10 changes: 6 additions & 4 deletions src/main/java/world/bentobox/dimensionaltrees/Settings.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package world.bentobox.dimensionaltrees;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.StoreAt;
import world.bentobox.bentobox.api.configuration.ConfigObject;

import java.util.*;
import java.util.stream.Collectors;
import world.bentobox.bentobox.api.configuration.StoreAt;

@StoreAt(filename="config.yml", path="addons/DimensionalTrees") // Explicitly call out what name this should have.
@ConfigComment("DimensionalTrees Configuration [version]")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package world.bentobox.dimensionaltrees.commands;

import java.util.List;

import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.dimensionaltrees.DimensionalTrees;

import java.util.List;

public class AdminCommand extends CompositeCommand {

public AdminCommand(DimensionalTrees addon) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ public TreeGrowEvent(@NonNull DimensionalTrees addon) {
*/
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onTreeGrow(StructureGrowEvent e) {

if (!isEnabled()) {
return;
}

// Don't do anything if we're not in the right place.
if (!addon.getPlugin().getIWM().inWorld(e.getWorld())) {
return;
}

// Verify settings
if (endLeaves() == null || endLogs() == null || netherLeaves() == null || netherLogs() == null
|| Material.matchMaterial(endLeaves()) == null || Material.matchMaterial(endLogs()) == null
Expand All @@ -49,10 +46,9 @@ public void onTreeGrow(StructureGrowEvent e) {
return;
}
// Verify the sapling is in the settings list
if (!treeTypes().contains(e.getLocation().getBlock().getType().name().replace("", "_SAPLING").toLowerCase())) {
if (!treeTypes().contains(e.getLocation().getBlock().getType().name().replace("_SAPLING", "").toLowerCase())) {
return;
}

try {
if (e.getWorld().getEnvironment().equals(World.Environment.NETHER) && isNetherEnabled()) {
// Modify everything!
Expand Down

0 comments on commit b47cda2

Please sign in to comment.