Package net.minecraftforge.event
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.
-
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
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
playerList
-
player
-
-
Constructor Details
-
OnDatapackSyncEvent
-
-
Method Details
-
getPlayerList
- Returns:
- The server's player list to get a view of all players.
-
getPlayer
- Returns:
- The player to sync datapacks to. Null when syncing for all players, such as when the reload command runs.
-
getPlayers
- Returns:
- A list of players that should receive data during this event, which is the specified player (if not null) or all players otherwise.
-