From 7159a0db1ef019810d2b3a9f8f2fc4ccd3eba672 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sun, 2 Feb 2020 17:32:58 +0100 Subject: [PATCH] Fix issue under 1.14/1.15 --- pom.xml | 2 +- .../java/de/minebench/plotgenerator/PlotChunkGenerator.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b3557f2..fdac3eb 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ org.spigotmc spigot-api - 1.13.2-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT provided diff --git a/src/main/java/de/minebench/plotgenerator/PlotChunkGenerator.java b/src/main/java/de/minebench/plotgenerator/PlotChunkGenerator.java index b03cde9..eeab3a1 100644 --- a/src/main/java/de/minebench/plotgenerator/PlotChunkGenerator.java +++ b/src/main/java/de/minebench/plotgenerator/PlotChunkGenerator.java @@ -20,9 +20,10 @@ import com.sk89q.worldedit.math.BlockVector3; import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.type.Sign; +import org.bukkit.block.data.type.WallSign; import org.bukkit.generator.ChunkGenerator; import java.util.Random; @@ -68,7 +69,7 @@ public ChunkData generateChunkData(World world, Random random, int x, int z, Bio for (int chunkY = 0; chunkY < schematic.getHeight(); chunkY++) { BlockData block = schematic.getBlock(schemX, chunkY, schemZ); data.setBlock(chunkX, chunkY, chunkZ, block); - if (sign == null && (block.getMaterial() == Material.SIGN || block.getMaterial() == Material.WALL_SIGN)) { + if (sign == null && (block instanceof Sign || block instanceof WallSign)) { sign = BlockVector3.at(x * 16 + chunkX, chunkY, z * 16 + chunkZ); } }