Skip to content

Commit

Permalink
fix: concurrent access crash for storage controller
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 12, 2023
1 parent 1ed075a commit f85c4fa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@

import javax.annotation.Nullable;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public abstract class StorageControllerContainerBase extends AbstractContainerMenu implements IStorageControllerContainer {

/**
* Hack to only allow one player to open a container at a time.
*/
public static Map<BlockPos, UUID> openContainers = new HashMap<>();
public static ConcurrentMap<BlockPos, UUID> openContainers = new ConcurrentHashMap<>();
public Inventory playerInventory;
public Player player;
protected ResultContainer result;
Expand Down

0 comments on commit f85c4fa

Please sign in to comment.