mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Potion NPE fix
This commit is contained in:
parent
1d1736481c
commit
ded7fd5bdf
@ -1,3 +1,6 @@
|
|||||||
|
Version 2.1.134
|
||||||
|
Fixed a NPE that could happen with thrown potions
|
||||||
|
|
||||||
Version 2.1.133
|
Version 2.1.133
|
||||||
A fix for an 'array out of bounds' error related to players clicking outside the inventory windows has been fixed
|
A fix for an 'array out of bounds' error related to players clicking outside the inventory windows has been fixed
|
||||||
French locale has been updated (thanks Elikill58)
|
French locale has been updated (thanks Elikill58)
|
||||||
|
@ -1061,6 +1061,9 @@ public class EntityListener implements Listener {
|
|||||||
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(event.getPotion().getItem().getItemMeta() == null)
|
||||||
|
return;
|
||||||
|
|
||||||
for (PotionEffect effect : ((PotionMeta) event.getPotion().getItem().getItemMeta()).getCustomEffects()) {
|
for (PotionEffect effect : ((PotionMeta) event.getPotion().getItem().getItemMeta()).getCustomEffects()) {
|
||||||
if (!effect.getType().equals(PotionEffectType.SATURATION)) {
|
if (!effect.getType().equals(PotionEffectType.SATURATION)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user