diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 22219056b..6d1ff9a47 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -183,7 +183,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation private IPacketHandler _resourcePacketHandler; private String _resourcePackUrl; private boolean _resourcePackRequired; - private NautHashMap _resourcePackUsers = new NautHashMap(); + private NautHashMap _resourcePackUsers = new NautHashMap(); private NautHashMap _resourcePackNoResponse = new NautHashMap(); // Observers @@ -360,7 +360,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation if (response == EnumResourcePackStatus.ACCEPTED || response == EnumResourcePackStatus.LOADED) { - _resourcePackUsers.put(player.getName(), response); + _resourcePackUsers.put(player.getName(), true); } else { @@ -1341,14 +1341,10 @@ public class ArcadeManager extends MiniPlugin implements IRelation @EventHandler public void ResourcePackQuit(PlayerQuitEvent event) { - Player player = event.getPlayer(); - EnumResourcePackStatus status = _resourcePackUsers.get(player.getName()); - - if (status == EnumResourcePackStatus.ACCEPTED || status == EnumResourcePackStatus.LOADED) + if (_resourcePackUsers.containsKey(player.getName()) && _resourcePackUsers.get(player.getName())) { - new RedisUnloadResPack(player.getName()).publish(); _resourcePackUsers.remove(player.getName()); @@ -1397,7 +1393,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _resourcePackNoResponse.put(player.getName(), System.currentTimeMillis()); } - _resourcePackUsers.put(player.getName(), null); + _resourcePackUsers.put(player.getName(), false); player.setResourcePack(_resourcePackUrl); } } @@ -1429,7 +1425,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _resourcePackNoResponse.put(player.getName(), System.currentTimeMillis()); } - _resourcePackUsers.put(player.getName(), null); + _resourcePackUsers.put(player.getName(), false); player.setResourcePack(_resourcePackUrl); } }