mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Check if brewing stand still exists before processing AlchemyBrewTask
This commit is contained in:
parent
3b794c897d
commit
9349416326
@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BrewingStand;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -57,6 +58,16 @@ public class AlchemyBrewTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (brewingStand.getType() != Material.BREWING_STAND) {
|
||||
if (Alchemy.brewingStandMap.containsKey(brewingStand)) {
|
||||
Alchemy.brewingStandMap.remove(brewingStand);
|
||||
}
|
||||
|
||||
this.cancel();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
brewTimer -= brewSpeed;
|
||||
|
||||
// Vanilla potion brewing completes when BrewingTime == 1
|
||||
|
Loading…
Reference in New Issue
Block a user