Handle deprecated materials
This commit is contained in:
parent
00ec1dc12e
commit
96bd48528f
1 changed files with 4 additions and 2 deletions
|
|
@ -1341,11 +1341,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||||
public void onBlockFromTo(BlockFromToEvent event) {
|
public void onBlockFromTo(BlockFromToEvent event) {
|
||||||
Block b = event.getBlock();
|
Block b = event.getBlock();
|
||||||
Material m = b.getType();
|
Material m = b.getType();
|
||||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
String m_id = (m != null) ? m.toString() : "";
|
||||||
|
boolean not_pressure_plate = (m_id != "WOOD_PLATE") && (m_id != "STONE_PLATE") && (!m_id.contains("PRESSURE_PLATE")) && (m_id != "");
|
||||||
|
if (not_pressure_plate)
|
||||||
checkBlock(b, "blockfromto");
|
checkBlock(b, "blockfromto");
|
||||||
b = event.getToBlock();
|
b = event.getToBlock();
|
||||||
m = b.getType();
|
m = b.getType();
|
||||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
if (not_pressure_plate)
|
||||||
checkBlock(b, "blockfromto");
|
checkBlock(b, "blockfromto");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue