Maybe fix race condition with messages not sending

This commit is contained in:
Luck
2016-09-10 14:31:42 +01:00
Unverified
parent e79b7c7023
commit 31884ea59d
3 changed files with 6 additions and 6 deletions
@@ -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;