Class ServerMBean

java.lang.Object
net.minecraft.server.dedicated.ServerMBean
All Implemented Interfaces:
DynamicMBean

public final class ServerMBean extends Object implements DynamicMBean
A dynamic management object for a Minecraft Server.

It exposes the average tick time and the historical tick times of the Minecraft Server.

See Also:
Mappings:
Namespace Name
named net/minecraft/server/dedicated/ServerMBean
intermediary net/minecraft/class_5169
official bmf
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/server/dedicated/ServerMBean;LOGGER:Lorg/slf4j/Logger;
      intermediary field_23970 Lnet/minecraft/class_5169;field_23970:Lorg/slf4j/Logger;
      official a Lbmf;a:Lorg/slf4j/Logger;
    • server

      private final MinecraftServer server
      Mappings:
      Namespace Name Mixin selector
      named server Lnet/minecraft/server/dedicated/ServerMBean;server:Lnet/minecraft/server/MinecraftServer;
      intermediary field_23971 Lnet/minecraft/class_5169;field_23971:Lnet/minecraft/server/MinecraftServer;
      official b Lbmf;b:Lnet/minecraft/server/MinecraftServer;
    • mBeanInfo

      private final MBeanInfo mBeanInfo
      Mappings:
      Namespace Name Mixin selector
      named mBeanInfo Lnet/minecraft/server/dedicated/ServerMBean;mBeanInfo:Ljavax/management/MBeanInfo;
      intermediary field_23972 Lnet/minecraft/class_5169;field_23972:Ljavax/management/MBeanInfo;
      official c Lbmf;c:Ljavax/management/MBeanInfo;
    • entries

      private final Map<String,ServerMBean.Entry> entries
      Mappings:
      Namespace Name Mixin selector
      named entries Lnet/minecraft/server/dedicated/ServerMBean;entries:Ljava/util/Map;
      intermediary field_23973 Lnet/minecraft/class_5169;field_23973:Ljava/util/Map;
      official d Lbmf;d:Ljava/util/Map;
  • Constructor Details

    • ServerMBean

      private ServerMBean(MinecraftServer server)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/server/dedicated/ServerMBean;<init>(Lnet/minecraft/server/MinecraftServer;)V
      intermediary <init> Lnet/minecraft/class_5169;<init>(Lnet/minecraft/server/MinecraftServer;)V
      official <init> Lbmf;<init>(Lnet/minecraft/server/MinecraftServer;)V
  • Method Details

    • register

      public static void register(MinecraftServer server)
      Registers a dynamic MBean for a Minecraft Server.
      Parameters:
      server - the server to have the MBean
      Mappings:
      Namespace Name Mixin selector
      named register Lnet/minecraft/server/dedicated/ServerMBean;register(Lnet/minecraft/server/MinecraftServer;)V
      intermediary method_27181 Lnet/minecraft/class_5169;method_27181(Lnet/minecraft/server/MinecraftServer;)V
      official a Lbmf;a(Lnet/minecraft/server/MinecraftServer;)V
    • getAverageTickTime

      private float getAverageTickTime()
      Returns the server's current average tick time, in milliseconds.
      Mappings:
      Namespace Name Mixin selector
      named getAverageTickTime Lnet/minecraft/server/dedicated/ServerMBean;getAverageTickTime()F
      intermediary method_27177 Lnet/minecraft/class_5169;method_27177()F
      official a Lbmf;a()F
    • getTickTimes

      private long[] getTickTimes()
      Returns the server's historical tick times, in milliseconds.
      Mappings:
      Namespace Name Mixin selector
      named getTickTimes Lnet/minecraft/server/dedicated/ServerMBean;getTickTimes()[J
      intermediary method_27182 Lnet/minecraft/class_5169;method_27182()[J
      official b Lbmf;b()[J
    • getAttribute

      @Nullable public @Nullable Object getAttribute(String attribute)
      Specified by:
      getAttribute in interface DynamicMBean
      Mappings:
      Namespace Name Mixin selector
      named getAttribute Lnet/minecraft/server/dedicated/ServerMBean;getAttribute(Ljava/lang/String;)Ljava/lang/Object;
      intermediary getAttribute Lnet/minecraft/class_5169;getAttribute(Ljava/lang/String;)Ljava/lang/Object;
      official getAttribute Lbmf;getAttribute(Ljava/lang/String;)Ljava/lang/Object;
    • setAttribute

      public void setAttribute(Attribute attribute)
      Specified by:
      setAttribute in interface DynamicMBean
      Mappings:
      Namespace Name Mixin selector
      named setAttribute Lnet/minecraft/server/dedicated/ServerMBean;setAttribute(Ljavax/management/Attribute;)V
      intermediary setAttribute Lnet/minecraft/class_5169;setAttribute(Ljavax/management/Attribute;)V
      official setAttribute Lbmf;setAttribute(Ljavax/management/Attribute;)V
    • getAttributes

      public AttributeList getAttributes(String[] attributes)
      Specified by:
      getAttributes in interface DynamicMBean
      Mappings:
      Namespace Name Mixin selector
      named getAttributes Lnet/minecraft/server/dedicated/ServerMBean;getAttributes([Ljava/lang/String;)Ljavax/management/AttributeList;
      intermediary getAttributes Lnet/minecraft/class_5169;getAttributes([Ljava/lang/String;)Ljavax/management/AttributeList;
      official getAttributes Lbmf;getAttributes([Ljava/lang/String;)Ljavax/management/AttributeList;
    • setAttributes

      public AttributeList setAttributes(AttributeList attributes)
      Specified by:
      setAttributes in interface DynamicMBean
      Mappings:
      Namespace Name Mixin selector
      named setAttributes Lnet/minecraft/server/dedicated/ServerMBean;setAttributes(Ljavax/management/AttributeList;)Ljavax/management/AttributeList;
      intermediary setAttributes Lnet/minecraft/class_5169;setAttributes(Ljavax/management/AttributeList;)Ljavax/management/AttributeList;
      official setAttributes Lbmf;setAttributes(Ljavax/management/AttributeList;)Ljavax/management/AttributeList;
    • invoke

      @Nullable public @Nullable Object invoke(String actionName, Object[] params, String[] signature)
      Specified by:
      invoke in interface DynamicMBean
      Mappings:
      Namespace Name Mixin selector
      named invoke Lnet/minecraft/server/dedicated/ServerMBean;invoke(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;
      intermediary invoke Lnet/minecraft/class_5169;invoke(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;
      official invoke Lbmf;invoke(Ljava/lang/String;[Ljava/lang/Object;[Ljava/lang/String;)Ljava/lang/Object;
    • getMBeanInfo

      public MBeanInfo getMBeanInfo()
      Specified by:
      getMBeanInfo in interface DynamicMBean