Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +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.api.network.RemoteServer;
|
||||||
import org.geysermc.geyser.network.GameProtocol;
|
import org.geysermc.geyser.network.GameProtocol;
|
||||||
import org.geysermc.geyser.text.AsteriskSerializer;
|
import org.geysermc.geyser.text.AsteriskSerializer;
|
||||||
|
import org.geysermc.geyser.text.GeyserLocale;
|
||||||
import org.geysermc.geyser.util.CooldownUtils;
|
import org.geysermc.geyser.util.CooldownUtils;
|
||||||
import org.spongepowered.configurate.interfaces.meta.Exclude;
|
import org.spongepowered.configurate.interfaces.meta.Exclude;
|
||||||
import org.spongepowered.configurate.interfaces.meta.Field;
|
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.")
|
@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
|
@NonNull
|
||||||
@DefaultString("system")
|
@DefaultString(GeyserLocale.SYSTEM_LOCALE)
|
||||||
String defaultLocale();
|
String defaultLocale();
|
||||||
|
|
||||||
@Comment("Allows custom skulls to be displayed. Keeping them enabled may cause a performance decrease on older/weaker devices.")
|
@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;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class GeyserLocale {
|
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
|
* 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) {
|
public static void finalizeDefaultLocale(GeyserImpl geyser) {
|
||||||
String newDefaultLocale = geyser.config().defaultLocale();
|
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
|
// We want to use the system locale which is already loaded
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren