Skip to content

Commit fe49df3

Browse files
committed
Fix error on 1.7.10 when getting specific ItemMeta
1 parent 060ae4c commit fe49df3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@
5252
import com.laytonsmith.abstraction.enums.MCPatternShape;
5353
import com.laytonsmith.abstraction.enums.MCRecipeType;
5454
import com.laytonsmith.abstraction.enums.MCTone;
55+
import com.laytonsmith.abstraction.enums.MCVersion;
5556
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCDyeColor;
5657
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCEntityType;
5758
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCPatternShape;
5859
import com.laytonsmith.annotations.convert;
5960
import com.laytonsmith.commandhelper.CommandHelperPlugin;
6061
import com.laytonsmith.core.CHLog;
6162
import com.laytonsmith.core.LogLevel;
63+
import com.laytonsmith.core.Static;
6264
import com.laytonsmith.core.constructs.Target;
6365
import com.laytonsmith.core.environments.CommandHelperEnvironment;
6466
import com.laytonsmith.core.environments.Environment;
@@ -419,7 +421,7 @@ public List<MCEntity> GetEntitiesAt(MCLocation location, double radius) {
419421
}
420422

421423
public static MCItemMeta BukkitGetCorrectMeta(ItemMeta im) {
422-
if (im instanceof BannerMeta) {
424+
if (Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_8) && im instanceof BannerMeta) {
423425
return new BukkitMCBannerMeta((BannerMeta) im);
424426
}
425427
if (im instanceof BookMeta) {

0 commit comments

Comments
 (0)