diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java index a2d0b0c9b..ebf67e075 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java @@ -22,6 +22,7 @@ import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.block.Sign; import org.bukkit.block.data.Directional; +import org.bukkit.block.data.type.WallSign; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; @@ -359,6 +360,10 @@ import java.util.Set; } else { block.setType(Material.valueOf("OAK_WALL_SIGN"), false); } + if (!(block.getBlockData() instanceof WallSign)) { + PlotSquared.debug(block.getBlockData().getAsString()); + throw new RuntimeException("Something went wrong generating a sign"); + } final Directional sign = (Directional) block.getBlockData(); sign.setFacing(facing); block.setBlockData(sign, false); diff --git a/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java b/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java new file mode 100644 index 000000000..069c886da --- /dev/null +++ b/Core/src/test/java/com/github/intellectualsites/plotsquared/plot/PlotVersionTest.java @@ -0,0 +1,13 @@ +package com.github.intellectualsites.plotsquared.plot; + +import org.junit.Test; + +public class PlotVersionTest { + + @Test public void tryParse() { + //These are all random values chosen to form the test class. + PlotVersion version = new PlotVersion("4.340", "f06903f", "19.08.05"); + System.out.println(version.build); + + } +}