Class RemoteModList

java.lang.Object
org.moddingx.libx.network.RemoteModList

public class RemoteModList extends Object
Allows to query information about mods, players have installed on the server side.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasMod(net.minecraft.server.level.ServerPlayer player, String modid)
    Gets whether a player has installed a certain mod.
    static net.minecraft.network.chat.MutableComponent
    translate(net.minecraft.server.level.ServerPlayer player, String modid, String translationKey, Object... args)
    Creates a MutableComponent from a translation key.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RemoteModList

      public RemoteModList()
  • Method Details

    • hasMod

      public static boolean hasMod(net.minecraft.server.level.ServerPlayer player, String modid)
      Gets whether a player has installed a certain mod.
    • translate

      public static net.minecraft.network.chat.MutableComponent translate(net.minecraft.server.level.ServerPlayer player, String modid, String translationKey, Object... args)
      Creates a MutableComponent from a translation key. If the given player has the given mod installed, it will result in a translatable component. If the player does not have the mod installed, the key is translated on the server and the result is a literal component with the translated text in english.