mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Fixed #2496
This commit is contained in:
parent
758c343e52
commit
fd6fbebd69
2 changed files with 18 additions and 0 deletions
|
@ -22,6 +22,7 @@ import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.block.data.Directional;
|
import org.bukkit.block.data.Directional;
|
||||||
|
import org.bukkit.block.data.type.WallSign;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
@ -359,6 +360,10 @@ import java.util.Set;
|
||||||
} else {
|
} else {
|
||||||
block.setType(Material.valueOf("OAK_WALL_SIGN"), false);
|
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();
|
final Directional sign = (Directional) block.getBlockData();
|
||||||
sign.setFacing(facing);
|
sign.setFacing(facing);
|
||||||
block.setBlockData(sign, false);
|
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 a new issue