Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Add friendly display names for DeviceOS (#477)
Dieser Commit ist enthalten in:
Ursprung
d0a2f6ac27
Commit
da02989967
@ -30,24 +30,38 @@ import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
|
||||
public enum DeviceOS {
|
||||
|
||||
@JsonEnumDefaultValue
|
||||
UNKNOWN,
|
||||
ANDROID,
|
||||
IOS,
|
||||
OSX,
|
||||
FIREOS,
|
||||
GEARVR,
|
||||
HOLOLENS,
|
||||
WIN10,
|
||||
WIN32,
|
||||
DEDICATED,
|
||||
ORBIS,
|
||||
NX,
|
||||
SWITCH,
|
||||
XBOX_ONE;
|
||||
UNKNOWN("Unknown"),
|
||||
ANDROID("Android"),
|
||||
IOS("iOS"),
|
||||
OSX("macOS"),
|
||||
FIREOS("FireOS"),
|
||||
GEARVR("Gear VR"),
|
||||
HOLOLENS("Hololens"),
|
||||
WIN10("Windows 10"),
|
||||
WIN32("Windows"),
|
||||
DEDICATED("Dedicated"),
|
||||
ORBIS("PS4"),
|
||||
NX("Switch"),
|
||||
SWITCH("Switch"),
|
||||
XBOX_ONE("Xbox One");
|
||||
|
||||
private static final DeviceOS[] VALUES = values();
|
||||
|
||||
private final String displayName;
|
||||
|
||||
DeviceOS(final String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public static DeviceOS getById(int id) {
|
||||
return id < VALUES.length ? VALUES[id] : VALUES[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return friendly display name of platform.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return displayName;
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren