Package org.moddingx.libx.network
Class RemoteModList
java.lang.Object
org.moddingx.libx.network.RemoteModList
Allows to query information about mods, players have installed on the server side.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
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 aMutableComponent
from a translation key.
-
Constructor Details
-
RemoteModList
public RemoteModList()
-
-
Method Details
-
hasMod
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 aMutableComponent
from a translation key. If the given player has the given mod installed, it will result in atranslatable component
. If the player does not have the mod installed, the key is translated on the server and the result is aliteral component
with the translated text in english.
-