Skip to content

Commit 5cec19a

Browse files
committed
修复取消合成导致刷物
1 parent 5087eeb commit 5cec19a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/me/ddggdd135/slimeae/api/autocraft/AutoCraftingTask.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public class AutoCraftingTask implements IDisposable {
5353
private final Set<CraftingRecipe> craftingPath = new HashSet<>();
5454
private ItemStorage storage;
5555
private int failTimes;
56+
private boolean disposed;
5657

5758
public AutoCraftingTask(@Nonnull NetworkInfo info, @Nonnull CraftingRecipe recipe, long count) {
5859
this.info = info;
@@ -436,6 +437,9 @@ public AEMenu getMenu() {
436437

437438
@Override
438439
public void dispose() {
440+
if (disposed) return;
441+
disposed = true;
442+
439443
AutoCraftingTaskDisposingEvent e = new AutoCraftingTaskDisposingEvent(this);
440444
Bukkit.getPluginManager().callEvent(e);
441445

0 commit comments

Comments
 (0)