Skip to content

Commit

Permalink
Fix for dumb noobs who run 1.8 for some dumb reason
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 24, 2017
1 parent 450a511 commit 4020fd4
Showing 1 changed file with 5 additions and 0 deletions.
@@ -1,5 +1,7 @@
package net.aufdemrand.denizen.objects.properties.item;

import net.aufdemrand.denizen.nms.NMSHandler;
import net.aufdemrand.denizen.nms.NMSVersion;
import net.aufdemrand.denizen.objects.dItem;
import net.aufdemrand.denizencore.objects.Element;
import net.aufdemrand.denizencore.objects.Mechanism;
Expand All @@ -13,6 +15,9 @@
public class ItemSpawnEgg implements Property {

public static boolean describes(dObject item) {
if (!NMSHandler.getVersion().isAtLeast(NMSVersion.v1_9_R2)) {
return false;
}
return item instanceof dItem
&& ((dItem) item).getItemStack().getType() == Material.MONSTER_EGG;
}
Expand Down

0 comments on commit 4020fd4

Please sign in to comment.