Enum Class Util.OperatingSystem

java.lang.Object
java.lang.Enum<Util.OperatingSystem>
net.minecraft.util.Util.OperatingSystem
All Implemented Interfaces:
Serializable, Comparable<Util.OperatingSystem>, Constable
Enclosing class:
Util

public static enum Util.OperatingSystem extends Enum<Util.OperatingSystem>
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
named net/minecraft/util/Util$OperatingSystem
intermediary net/minecraft/class_156$class_158
official ae$a
  • Enum Constant Details

    • LINUX

      public static final Util.OperatingSystem LINUX
      Mappings:
      Namespace Name Mixin selector
      named LINUX Lnet/minecraft/util/Util$OperatingSystem;LINUX:Lnet/minecraft/util/Util$OperatingSystem;
      intermediary field_1135 Lnet/minecraft/class_156$class_158;field_1135:Lnet/minecraft/class_156$class_158;
      official a Lae$a;a:Lae$a;
    • SOLARIS

      public static final Util.OperatingSystem SOLARIS
      Mappings:
      Namespace Name Mixin selector
      named SOLARIS Lnet/minecraft/util/Util$OperatingSystem;SOLARIS:Lnet/minecraft/util/Util$OperatingSystem;
      intermediary field_1134 Lnet/minecraft/class_156$class_158;field_1134:Lnet/minecraft/class_156$class_158;
      official b Lae$a;b:Lae$a;
    • WINDOWS

      public static final Util.OperatingSystem WINDOWS
      Mappings:
      Namespace Name Mixin selector
      named WINDOWS Lnet/minecraft/util/Util$OperatingSystem;WINDOWS:Lnet/minecraft/util/Util$OperatingSystem;
      intermediary field_1133 Lnet/minecraft/class_156$class_158;field_1133:Lnet/minecraft/class_156$class_158;
      official c Lae$a;c:Lae$a;
    • OSX

      public static final Util.OperatingSystem OSX
      Mappings:
      Namespace Name Mixin selector
      named OSX Lnet/minecraft/util/Util$OperatingSystem;OSX:Lnet/minecraft/util/Util$OperatingSystem;
      intermediary field_1137 Lnet/minecraft/class_156$class_158;field_1137:Lnet/minecraft/class_156$class_158;
      official d Lae$a;d:Lae$a;
    • UNKNOWN

      public static final Util.OperatingSystem UNKNOWN
      Mappings:
      Namespace Name Mixin selector
      named UNKNOWN Lnet/minecraft/util/Util$OperatingSystem;UNKNOWN:Lnet/minecraft/util/Util$OperatingSystem;
      intermediary field_1132 Lnet/minecraft/class_156$class_158;field_1132:Lnet/minecraft/class_156$class_158;
      official e Lae$a;e:Lae$a;
  • Field Details

    • name

      private final String name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/util/Util$OperatingSystem;name:Ljava/lang/String;
      intermediary field_34894 Lnet/minecraft/class_156$class_158;field_34894:Ljava/lang/String;
      official f Lae$a;f:Ljava/lang/String;
  • Constructor Details

    • OperatingSystem

      private OperatingSystem(String name)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/Util$OperatingSystem;<init>(Ljava/lang/String;ILjava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_156$class_158;<init>(Ljava/lang/String;ILjava/lang/String;)V
      official <init> Lae$a;<init>(Ljava/lang/String;ILjava/lang/String;)V
  • Method Details

    • values

      public static Util.OperatingSystem[] 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

      public static Util.OperatingSystem valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • open

      public void open(URI uri)
      Opens uri. 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
      named open Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/net/URI;)V
      intermediary method_673 Lnet/minecraft/class_156$class_158;method_673(Ljava/net/URI;)V
      official a Lae$a;a(Ljava/net/URI;)V
    • open

      public void open(File file)
      Opens file.

      Do not pass untrusted file to this method as some values can execute code.

      Mappings:
      Namespace Name Mixin selector
      named open Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/io/File;)V
      intermediary method_672 Lnet/minecraft/class_156$class_158;method_672(Ljava/io/File;)V
      official a Lae$a;a(Ljava/io/File;)V
    • open

      public void open(Path path)
      Mappings:
      Namespace Name Mixin selector
      named open Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/nio/file/Path;)V
      intermediary method_60932 Lnet/minecraft/class_156$class_158;method_60932(Ljava/nio/file/Path;)V
      official a Lae$a;a(Ljava/nio/file/Path;)V
    • getURIOpenCommand

      protected String[] getURIOpenCommand(URI uri)
      Mappings:
      Namespace Name Mixin selector
      named getURIOpenCommand Lnet/minecraft/util/Util$OperatingSystem;getURIOpenCommand(Ljava/net/URI;)[Ljava/lang/String;
      intermediary method_674 Lnet/minecraft/class_156$class_158;method_674(Ljava/net/URI;)[Ljava/lang/String;
      official b Lae$a;b(Ljava/net/URI;)[Ljava/lang/String;
    • open

      public void open(String uri)
      Opens uri. 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
      named open Lnet/minecraft/util/Util$OperatingSystem;open(Ljava/lang/String;)V
      intermediary method_670 Lnet/minecraft/class_156$class_158;method_670(Ljava/lang/String;)V
      official a Lae$a;a(Ljava/lang/String;)V
    • getName

      public String getName()
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/util/Util$OperatingSystem;getName()Ljava/lang/String;
      intermediary method_38649 Lnet/minecraft/class_156$class_158;method_38649()Ljava/lang/String;
      official a Lae$a;a()Ljava/lang/String;