Class DataPackSyncEventHandler.ServerEvents

java.lang.Object
com.minecolonies.core.event.DataPackSyncEventHandler.ServerEvents
Enclosing class:
DataPackSyncEventHandler

public static class DataPackSyncEventHandler.ServerEvents extends Object
Events subscribed on both client and server (but mostly for server-side events).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    load(@NotNull net.minecraft.server.MinecraftServer server)
    Handle initial load.
    static void
    onDataPackSync(net.neoforged.neoforge.event.OnDatapackSyncEvent event)
    This event fires on server-side both at initial world load and whenever a new player joins the server (with getPlayer() != null), and also on datapack reload (with null).
    static void
    Reset on shutdown.
    static void
    sendOnLogin(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event)
    Sends compat manager data on login, has to be after datapack sync registries are loaded

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerEvents

      public ServerEvents()
  • Method Details

    • onDataPackSync

      public static void onDataPackSync(net.neoforged.neoforge.event.OnDatapackSyncEvent event)
      This event fires on server-side both at initial world load and whenever a new player joins the server (with getPlayer() != null), and also on datapack reload (with null). Note that at this point the client has not yet received the recipes/tags.
      Parameters:
      event - OnDatapackSyncEvent
    • sendOnLogin

      public static void sendOnLogin(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event)
      Sends compat manager data on login, has to be after datapack sync registries are loaded
      Parameters:
      event -
    • load

      public static void load(@NotNull @NotNull net.minecraft.server.MinecraftServer server)
      Handle initial load. But only once.
      Parameters:
      server - the server to load it for.
    • reset

      public static void reset()
      Reset on shutdown.