mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Apparently our ItemStack can be null here.
This commit is contained in:
parent
52bf73aecc
commit
862f5d73e1
@ -344,8 +344,9 @@ public final class Misc {
|
|||||||
*/
|
*/
|
||||||
public static void dropItem(Location location, ItemStack itemStack) {
|
public static void dropItem(Location location, ItemStack itemStack) {
|
||||||
|
|
||||||
if(itemStack.getType() == Material.AIR)
|
if (itemStack.getType() != null || itemStack.getType() == Material.AIR) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event.
|
// We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event.
|
||||||
McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);
|
McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);
|
||||||
|
Loading…
Reference in New Issue
Block a user