mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-13 11:01:57 +01:00
Synchronized config values to be used in new Async chat event.
This commit is contained in:
parent
f57468126a
commit
7b99130bfa
@ -38,6 +38,8 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
||||
return instance;
|
||||
}
|
||||
|
||||
private final Object propertyLock = new Object();
|
||||
|
||||
@Property
|
||||
private boolean enforceaccess;
|
||||
@Property
|
||||
@ -76,7 +78,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
||||
public void setDefaults() {
|
||||
// BEGIN CHECKSTYLE-SUPPRESSION: MagicNumberCheck
|
||||
enforceaccess = false;
|
||||
prefixchat = true;
|
||||
setPrefixChat(true);
|
||||
teleportintercept = true;
|
||||
firstspawnoverride = true;
|
||||
displaypermerrors = true;
|
||||
@ -122,7 +124,9 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
||||
*/
|
||||
@Override
|
||||
public boolean getPrefixChat() {
|
||||
return this.prefixchat;
|
||||
synchronized (propertyLock) {
|
||||
return this.prefixchat;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,7 +134,9 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
||||
*/
|
||||
@Override
|
||||
public void setPrefixChat(boolean prefixChat) {
|
||||
this.prefixchat = prefixChat;
|
||||
synchronized (propertyLock) {
|
||||
this.prefixchat = prefixChat;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user