Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-28 00:50:20 +01:00
Constant for 'system' locale
Dieser Commit ist enthalten in:
Ursprung
0a625627c9
Commit
c4bed6509c
@ -32,6 +32,7 @@ import org.geysermc.geyser.api.network.BedrockListener;
|
||||
import org.geysermc.geyser.api.network.RemoteServer;
|
||||
import org.geysermc.geyser.network.GameProtocol;
|
||||
import org.geysermc.geyser.text.AsteriskSerializer;
|
||||
import org.geysermc.geyser.text.GeyserLocale;
|
||||
import org.geysermc.geyser.util.CooldownUtils;
|
||||
import org.spongepowered.configurate.interfaces.meta.Exclude;
|
||||
import org.spongepowered.configurate.interfaces.meta.Field;
|
||||
@ -128,7 +129,7 @@ public interface GeyserConfig {
|
||||
|
||||
@Comment("The default locale if we don't have the one the client requested. If set to \"system\", the system's language will be used.")
|
||||
@NonNull
|
||||
@DefaultString("system")
|
||||
@DefaultString(GeyserLocale.SYSTEM_LOCALE)
|
||||
String defaultLocale();
|
||||
|
||||
@Comment("Allows custom skulls to be displayed. Keeping them enabled may cause a performance decrease on older/weaker devices.")
|
||||
|
@ -41,6 +41,7 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
public class GeyserLocale {
|
||||
public static final String SYSTEM_LOCALE = "system";
|
||||
|
||||
/**
|
||||
* If we determine the default locale that the user wishes to use, use that locale
|
||||
@ -81,7 +82,7 @@ public class GeyserLocale {
|
||||
*/
|
||||
public static void finalizeDefaultLocale(GeyserImpl geyser) {
|
||||
String newDefaultLocale = geyser.config().defaultLocale();
|
||||
if ("system".equals(newDefaultLocale)) {
|
||||
if (SYSTEM_LOCALE.equals(newDefaultLocale)) {
|
||||
// We want to use the system locale which is already loaded
|
||||
return;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren