Unverified Commit 0c6dc80e authored by kellerkindt's avatar kellerkindt Committed by GitHub
Browse files

Merge pull request #14 from Sailoriae/original-fix-drop-air

Fix the "unable to drop air" problem
parents ab9c8fab 43b3c829
......@@ -746,11 +746,12 @@ public class SimpleShopHandler implements ShopHandler, Listener {
* !! Mobs can pick the Item up, but do not drop it, since it has an amount of 0,
* although they can use it ^^
*/
itemStack.setAmount(scs.getConfiguration().getSpawnCount());
// since mc 1.11 an amount of zero does not seem to work anymore?
if (itemStack.getAmount() == 0) {
// Warning : When setAmount(0), PaperMC resets the ItemStack to Material.AIR (Not Spigot)
if ( scs.getConfiguration().getSpawnCount() == 0 ) {
itemStack.setAmount(1);
} else {
itemStack.setAmount(scs.getConfiguration().getSpawnCount());
}
}
if(itemStack.getType() != Material.AIR) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment