mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Properly fixed the NPE in dropItem
It was due to bad logic in Herbalism
This commit is contained in:
parent
12faebca27
commit
6d871c9bdb
@ -196,7 +196,7 @@ public class Herbalism {
|
||||
if (chance > Misc.getRandom().nextInt(activationChance)) {
|
||||
Location location = block.getLocation();
|
||||
|
||||
if (herbalismBlock != null && herbalismBlock.canDoubleDrop()) {
|
||||
if (dropItem != null && herbalismBlock.canDoubleDrop()) {
|
||||
Misc.dropItems(location, dropItem, dropAmount);
|
||||
}
|
||||
else if (customBlock != null){
|
||||
|
@ -344,7 +344,7 @@ public final class Misc {
|
||||
*/
|
||||
public static void dropItem(Location location, ItemStack itemStack) {
|
||||
|
||||
if (itemStack == null || itemStack.getType() == Material.AIR) {
|
||||
if (itemStack.getType() == Material.AIR) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user