Maybe fix race condition with messages not sending
This commit is contained in:
parent
e79b7c7023
commit
31884ea59d
@ -34,8 +34,8 @@ import java.util.UUID;
|
|||||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class BukkitSenderFactory extends SenderFactory<CommandSender> {
|
public class BukkitSenderFactory extends SenderFactory<CommandSender> {
|
||||||
private static BukkitSenderFactory instance = null;
|
private static BukkitSenderFactory instance = null;
|
||||||
public static BukkitSenderFactory get() {
|
public static synchronized BukkitSenderFactory get() {
|
||||||
if (instance == null){
|
if (instance == null) {
|
||||||
instance = new BukkitSenderFactory();
|
instance = new BukkitSenderFactory();
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
|
@ -35,8 +35,8 @@ import java.util.UUID;
|
|||||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class BungeeSenderFactory extends SenderFactory<CommandSender> {
|
public class BungeeSenderFactory extends SenderFactory<CommandSender> {
|
||||||
private static BungeeSenderFactory instance = null;
|
private static BungeeSenderFactory instance = null;
|
||||||
public static BungeeSenderFactory get() {
|
public static synchronized BungeeSenderFactory get() {
|
||||||
if (instance == null){
|
if (instance == null) {
|
||||||
instance = new BungeeSenderFactory();
|
instance = new BungeeSenderFactory();
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
|
@ -35,8 +35,8 @@ import java.util.UUID;
|
|||||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
public class SpongeSenderFactory extends SenderFactory<CommandSource> {
|
public class SpongeSenderFactory extends SenderFactory<CommandSource> {
|
||||||
private static SpongeSenderFactory instance = null;
|
private static SpongeSenderFactory instance = null;
|
||||||
public static SpongeSenderFactory get() {
|
public static synchronized SpongeSenderFactory get() {
|
||||||
if (instance == null){
|
if (instance == null) {
|
||||||
instance = new SpongeSenderFactory();
|
instance = new SpongeSenderFactory();
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user