Maybe fix race condition with messages not sending

This commit is contained in:
Luck committed 2016-09-10 14:31:42 +01:00
1 parent e79b7c7023
commit 31884ea59d
3 files changed
+6 -6

No files matched your search

@@ -35,8 +35,8 @@ import java.util.UUID;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class SpongeSenderFactory extends SenderFactory<CommandSource> {
private static SpongeSenderFactory instance = null;
public static SpongeSenderFactory get() {
if (instance == null){
public static synchronized SpongeSenderFactory get() {
if (instance == null) {
instance = new SpongeSenderFactory();
}
return instance;