Interface ServerLifecycleEvents.SyncDataPackContents

Enclosing class:
ServerLifecycleEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerLifecycleEvents.SyncDataPackContents
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onSyncDataPackContents(net.minecraft.server.network.ServerPlayerEntity player, boolean joined)
    Called right before tags and recipes are sent to a player, either because the player joined, or because the server reloaded resources.
  • Method Details

    • onSyncDataPackContents

      void onSyncDataPackContents(net.minecraft.server.network.ServerPlayerEntity player, boolean joined)
      Called right before tags and recipes are sent to a player, either because the player joined, or because the server reloaded resources. The server resource manager is up-to-date when this is called.

      For example, this event can be used to sync data loaded with custom resource reloaders.

      Parameters:
      player - Player to which the data is being sent.
      joined - True if the player is joining the server, false if the server finished a successful resource reload.