mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
parent
9b046bd490
commit
bac16238ac
@ -152,11 +152,16 @@ 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);
|
// Still need to finish brewing if the player is null
|
||||||
|
AlchemyPotionBrewer.finishBrewing(brewingStand, null, false);
|
||||||
|
} else {
|
||||||
|
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