mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Fix McMMOPlayerBrewEvent NPE in AlchemyBrewTask#finish
This commit is contained in:
parent
b87efb3f76
commit
c525ac8a8f
@ -152,11 +152,13 @@ public class AlchemyBrewTask extends CancellableRunnable {
|
|||||||
|
|
||||||
|
|
||||||
private void finish() {
|
private void finish() {
|
||||||
final McMMOPlayerBrewEvent event = new McMMOPlayerBrewEvent(mmoPlayer, brewingStand);
|
if(mmoPlayer != null) {
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
final McMMOPlayerBrewEvent event = new McMMOPlayerBrewEvent(mmoPlayer, brewingStand);
|
||||||
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
AlchemyPotionBrewer.finishBrewing(brewingStand, mmoPlayer, false);
|
AlchemyPotionBrewer.finishBrewing(brewingStand, mmoPlayer, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Alchemy.brewingStandMap.remove(brewingStand.getLocation());
|
Alchemy.brewingStandMap.remove(brewingStand.getLocation());
|
||||||
|
Loading…
Reference in New Issue
Block a user