mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-30 20:54:44 +02:00
Fix McMMOPlayerBrewEvent NPE in AlchemyBrewTask#finish
This commit is contained in:
@ -152,12 +152,14 @@ public class AlchemyBrewTask extends CancellableRunnable {
|
||||
|
||||
|
||||
private void finish() {
|
||||
if(mmoPlayer != null) {
|
||||
final McMMOPlayerBrewEvent event = new McMMOPlayerBrewEvent(mmoPlayer, brewingStand);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
AlchemyPotionBrewer.finishBrewing(brewingStand, mmoPlayer, false);
|
||||
}
|
||||
}
|
||||
|
||||
Alchemy.brewingStandMap.remove(brewingStand.getLocation());
|
||||
}
|
||||
|
Reference in New Issue
Block a user