1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-25 05:21:29 +02:00

Maybe fix race condition with messages not sending

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

View File

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

View File

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

View File

@@ -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;