Class OnDatapackSyncEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.OnDatapackSyncEvent

public class OnDatapackSyncEvent extends net.minecraftforge.eventbus.api.Event
Fires when a player joins the server or when the reload command is ran, before tags and crafting recipes are sent to the client. Send datapack data to clients when this event fires.
  • Field Details

  • Constructor Details

  • Method Details

    • getPlayerList

      public PlayerList getPlayerList()
      Returns:
      The server's player list to get a view of all players.
    • getPlayer

      @Nullable public ServerPlayer getPlayer()
      Returns:
      The player to sync datapacks to. Null when syncing for all players, such as when the reload command runs.