Class ServerMessages

java.lang.Object
org.moddingx.libx.util.game.ServerMessages

public class ServerMessages extends Object
Utilities to send messages to a set of players on the server.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    broadcast(net.minecraft.world.level.Level level, net.minecraft.network.chat.Component message)
    Sends a text component to every player 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 a text component to all player matching a predicate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a text component to every player 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 a text component to all player matching a predicate.