From 5dd8dd78af452de1101e64b38677277d033f6e7a Mon Sep 17 00:00:00 2001 From: 17jiong <17jiong@gmail.com> Date: Mon, 29 Jan 2018 00:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E5=AE=89=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/maxgamer/QuickShop/Shop/ShopManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java b/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java index f193f50..62f2e94 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java @@ -18,10 +18,11 @@ import java.util.HashMap; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; public class ShopManager { - private final HashMap actions = new HashMap<>(); - + + private final Map actions = new ConcurrentHashMap(); private final QuickShop plugin; private final HashMap>> shops = new HashMap<>(); @@ -126,7 +127,7 @@ public class ShopManager { * @return Returns the HashMap. Info contains what * their last question etc was. */ - public HashMap getActions() { + public Map getActions() { return this.actions; } @@ -205,7 +206,7 @@ public class ShopManager { public void handleChat(final Player p, final String msgs) { final String message = ChatColor.stripColor(msgs); - final HashMap actions = getActions(); + final Map actions = getActions(); // They wanted to do something. final Info info = actions.remove(p.getName()); if (info == null) { return; // multithreaded means this can happen