use of au.com.mineauz.minigames.objects.MockSign in project Minigames by AddstarMC.
the class TestHelper method createSignBlock.
public static BlockMock createSignBlock(Map<Integer, String> lines, WorldMock world) {
MaterialData data = new MaterialData(Material.OAK_SIGN, (byte) 0);
MockSign sign = new MockSign(data, true);
for (Map.Entry<Integer, String> e : lines.entrySet()) {
sign.setLine(e.getKey(), e.getValue());
}
BlockData bData = new BlockData() {
@Override
public Material getMaterial() {
return Material.OAK_SIGN;
}
@Override
public String getAsString() {
return null;
}
@Override
public String getAsString(boolean b) {
return "SIGN";
}
@Override
public BlockData merge(BlockData blockData) {
return this;
}
@Override
public boolean matches(BlockData blockData) {
return true;
}
@Override
public BlockData clone() {
return this;
}
};
return new SignBlockMock(Material.OAK_SIGN, new Location(world, 10, 40, 10), sign, bData);
}
Aggregations