Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

        net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ServerPlayerEntity getPlayer()  
      PlayerList getPlayerList()  
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPlayerList

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

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