Fixed an issue with specific versions.

This commit is contained in:
Brianna 2020-11-07 19:05:19 -06:00
parent 0fd9a8c11f
commit 7e4e50fe1b

View File

@ -1574,7 +1574,7 @@ public enum CompatibleMaterial {
public void applyToBlock(Block block) {
if (block == null) return;
block.setType(material);
if (data != -1 && ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_12)) {
if (data != null && data != -1 && ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_12)) {
try {
methodSetData.invoke(block, data);
} catch (IllegalAccessException | InvocationTargetException e) {