isAllowedBlock() has been rewritten so that it no longer uses item IDs. This was done to fix the issue with burials not working properly, but it likely fixes other issues as well.

This commit is contained in:
David Berdik 2017-12-18 22:33:07 -05:00
parent eda1e27022
commit 9bf7e4d898

View File

@ -256,31 +256,12 @@ public class Herobrine extends JavaPlugin implements Listener {
return mat.isSolid();
}
@SuppressWarnings("deprecation")
public static boolean isAllowedBlock(final Material mat) {
switch (mat.getId()) {
case 10: {
return false;
}
case 11: {
return false;
}
case 8: {
return false;
}
case 9: {
return false;
}
case 174: {
return false;
}
case 79: {
return false;
}
default: {
return !mat.isSolid();
}
}
if(mat == Material.WATER || mat == Material.STATIONARY_WATER || mat == Material.LAVA || mat == Material.STATIONARY_LAVA
|| mat == Material.ICE || mat == Material.PACKED_ICE)
return false;
else
return mat.isSolid();
}
@EventHandler