Fix Guillotine Item Duplication

This commit is contained in:
Ste3et_C0st 2020-07-01 10:12:45 +02:00
parent 4a88d33310
commit 51786b3cfe

View File

@ -441,6 +441,8 @@ public class Guillotine extends Furniture implements Listener{
if(invII.getItem(16)!=null){ if(invII.getItem(16)!=null){
packet1.getInventory().setItemInMainHand(invII.getItem(16)); packet1.getInventory().setItemInMainHand(invII.getItem(16));
}else {
packet1.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
} }
}else{ }else{
if(invII.getItem(43)!=null&&!invII.getItem(43).getType().equals(Material.AIR)){getWorld().dropItem(getLocation().clone().add(0, 1, 0), invII.getItem(43));} if(invII.getItem(43)!=null&&!invII.getItem(43).getType().equals(Material.AIR)){getWorld().dropItem(getLocation().clone().add(0, 1, 0), invII.getItem(43));}