mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 08:36:45 +01:00
Fixed #2496
This commit is contained in:
parent
758c343e52
commit
fd6fbebd69
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user