This commit is contained in:
MattBDev 2019-09-08 18:43:47 -04:00
parent 758c343e52
commit fd6fbebd69
2 changed files with 18 additions and 0 deletions

View File

@ -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);

View File

@ -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);
}
}