Package org.moddingx.libx.util.game
Class ServerMessages
java.lang.Object
org.moddingx.libx.util.game.ServerMessages
Utilities to send messages to a set of
players
on the server
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
broadcast
(net.minecraft.world.level.Level level, net.minecraft.network.chat.Component message) Sends atext component
to everyplayer
on the server.static void
broadcastTo
(net.minecraft.world.level.Level level, Predicate<? super net.minecraft.server.level.ServerPlayer> condition, net.minecraft.network.chat.Component message) Sends atext component
to allplayer
matching a predicate.
-
Constructor Details
-
ServerMessages
public ServerMessages()
-
-
Method Details
-
broadcast
public static void broadcast(net.minecraft.world.level.Level level, net.minecraft.network.chat.Component message) Sends atext component
to everyplayer
on the server. -
broadcastTo
public static void broadcastTo(net.minecraft.world.level.Level level, Predicate<? super net.minecraft.server.level.ServerPlayer> condition, net.minecraft.network.chat.Component message) Sends atext component
to allplayer
matching a predicate.
-