Package net.minecraft.util
Enum Class Util.OperatingSystem
- All Implemented Interfaces:
Serializable
,Comparable<Util.OperatingSystem>
,Constable
- Enclosing class:
Util
An enum representing the operating system of the current platform.
This defines the behavior for opening links.
The current one can be obtained via
Util.getOperatingSystem()
.- Mappings:
Namespace Name official aa$b
intermediary net/minecraft/class_156$class_158
named net/minecraft/util/Util$OperatingSystem
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
protected String[]
getURLOpenCommand
(URL url) void
Opensfile
.void
Opensuri
.void
Opensuri
.void
Opensurl
.static Util.OperatingSystem
Returns the enum constant of this class with the specified name.static Util.OperatingSystem[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LINUX
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a:Laa$b;
intermediary field_1135
Lnet/minecraft/class_156$class_158;field_1135:Lnet/minecraft/class_156$class_158;
named LINUX
Lnet/minecraft/util/Util$OperatingSystem;LINUX:Lnet/minecraft/util/Util$OperatingSystem;
-
SOLARIS
- Mappings:
Namespace Name Mixin selector official b
Laa$b;b:Laa$b;
intermediary field_1134
Lnet/minecraft/class_156$class_158;field_1134:Lnet/minecraft/class_156$class_158;
named SOLARIS
Lnet/minecraft/util/Util$OperatingSystem;SOLARIS:Lnet/minecraft/util/Util$OperatingSystem;
-
WINDOWS
- Mappings:
Namespace Name Mixin selector official c
Laa$b;c:Laa$b;
intermediary field_1133
Lnet/minecraft/class_156$class_158;field_1133:Lnet/minecraft/class_156$class_158;
named WINDOWS
Lnet/minecraft/util/Util$OperatingSystem;WINDOWS:Lnet/minecraft/util/Util$OperatingSystem;
-
OSX
- Mappings:
Namespace Name Mixin selector official d
Laa$b;d:Laa$b;
intermediary field_1137
Lnet/minecraft/class_156$class_158;field_1137:Lnet/minecraft/class_156$class_158;
named OSX
Lnet/minecraft/util/Util$OperatingSystem;OSX:Lnet/minecraft/util/Util$OperatingSystem;
-
UNKNOWN
- Mappings:
Namespace Name Mixin selector official e
Laa$b;e:Laa$b;
intermediary field_1132
Lnet/minecraft/class_156$class_158;field_1132:Lnet/minecraft/class_156$class_158;
named UNKNOWN
Lnet/minecraft/util/Util$OperatingSystem;UNKNOWN:Lnet/minecraft/util/Util$OperatingSystem;
-
-
Field Details
-
name
- Mappings:
Namespace Name Mixin selector official f
Laa$b;f:Ljava/lang/String;
intermediary field_34894
Lnet/minecraft/class_156$class_158;field_34894:Ljava/lang/String;
named name
Lnet/minecraft/util/Util$OperatingSystem;name:Ljava/lang/String;
-
-
Constructor Details
-
OperatingSystem
- Mappings:
Namespace Name Mixin selector official <init>
Laa$b;<init>(Ljava/lang/String;ILjava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_156$class_158;<init>(Ljava/lang/String;ILjava/lang/String;)V
named <init>
Lnet/minecraft/util/Util$OperatingSystem;<init>(Ljava/lang/String;ILjava/lang/String;)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
open
Opensurl
. If this points to an HTTP(S) URL, it is usually opened using the system's default browser. Otherwise, it is opened directly.Always validate the passed URL's schema as some values can execute code.
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a(Ljava/net/URL;)V
intermediary method_669
Lnet/minecraft/class_156$class_158;method_669(Ljava/net/URL;)V
named open
Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/net/URL;)V
-
open
Opensuri
. If this points to an HTTP(S) URI, it is usually opened using the system's default browser. Otherwise, it is opened directly.Always validate the passed URI's schema as some values can execute code.
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a(Ljava/net/URI;)V
intermediary method_673
Lnet/minecraft/class_156$class_158;method_673(Ljava/net/URI;)V
named open
Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/net/URI;)V
-
open
Opensfile
.Do not pass untrusted file to this method as some values can execute code.
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a(Ljava/io/File;)V
intermediary method_672
Lnet/minecraft/class_156$class_158;method_672(Ljava/io/File;)V
named open
Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/io/File;)V
-
getURLOpenCommand
- Mappings:
Namespace Name Mixin selector official b
Laa$b;b(Ljava/net/URL;)[Ljava/lang/String;
intermediary method_674
Lnet/minecraft/class_156$class_158;method_674(Ljava/net/URL;)[Ljava/lang/String;
named getURLOpenCommand
Lnet/minecraft/util/Util$OperatingSystem;getURLOpenCommand(Ljava/net/URL;)[Ljava/lang/String;
-
open
Opensuri
. If this points to an HTTP(S) URI, it is usually opened using the system's default browser. Otherwise, it is opened directly.Always validate the passed URI's schema as some values can execute code.
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a(Ljava/lang/String;)V
intermediary method_670
Lnet/minecraft/class_156$class_158;method_670(Ljava/lang/String;)V
named open
Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/lang/String;)V
-
getName
- Mappings:
Namespace Name Mixin selector official a
Laa$b;a()Ljava/lang/String;
intermediary method_38649
Lnet/minecraft/class_156$class_158;method_38649()Ljava/lang/String;
named getName
Lnet/minecraft/util/Util$OperatingSystem;getName()Ljava/lang/String;
-