diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/async/PlayerSendingHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/async/PlayerSendingHandler.java index 2854814a..cb234d88 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/async/PlayerSendingHandler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/async/PlayerSendingHandler.java @@ -99,10 +99,14 @@ class PlayerSendingHandler { // Safe concurrent initialization if (queues == null && createNew) { - QueueContainer previous = playerSendingQueues.putIfAbsent(name, new QueueContainer()); + final QueueContainer newContainer = new QueueContainer(); + + // Attempt to map the queue + queues = playerSendingQueues.putIfAbsent(name, newContainer); - if (previous != null) - queues = previous; + if (queues == null) { + queues = newContainer; + } } // Check for NULL again