Properly check if item is empty (Fixes #123)

This commit is contained in:
Phoenix616 2018-04-02 17:41:45 +01:00
parent e40865ac26
commit ae8d1c79e9

View File

@ -81,7 +81,7 @@ public class PlayerInteract implements Listener {
if (Properties.ALLOW_AUTO_ITEM_FILL && ChatColor.stripColor(sign.getLine(ITEM_LINE)).equals(AUTOFILL_CODE)) {
if (canAccess) {
ItemStack item = player.getInventory().getItemInMainHand();
if (item != null) {
if (!MaterialUtil.isEmpty(item)) {
String itemCode = MaterialUtil.getSignName(item);
String[] lines = sign.getLines();
lines[ITEM_LINE] = itemCode;