Skip to content
Permalink
Browse files

Fix NPE when the item is null (#535)

  • Loading branch information...
EntryPointKR authored and LadyCailin committed Aug 6, 2019
1 parent a530bb0 commit 8fdc1d47186b059d75cc88237034ef59fca82c89
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCItemStack.java
@@ -6,14 +6,14 @@
import com.laytonsmith.abstraction.MCItemStack;
import com.laytonsmith.abstraction.blocks.MCMaterial;
import com.laytonsmith.abstraction.bukkit.blocks.BukkitMCMaterial;
import java.util.HashMap;
import java.util.Map;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;

import java.util.HashMap;
import java.util.Map;

public class BukkitMCItemStack implements MCItemStack {

ItemStack is;
@@ -146,7 +146,7 @@ public int hashCode() {

@Override
public boolean hasItemMeta() {
return is.hasItemMeta();
return is != null && is.hasItemMeta();
}

@Override

0 comments on commit 8fdc1d4

Please sign in to comment.
You can’t perform that action at this time.