Class SessionLoadResourcePacksEvent

java.lang.Object
org.geysermc.geyser.api.event.connection.ConnectionEvent
org.geysermc.geyser.api.event.bedrock.SessionLoadResourcePacksEvent
All Implemented Interfaces:
org.geysermc.event.Event

public abstract class SessionLoadResourcePacksEvent extends ConnectionEvent
Called when Geyser initializes a session for a new Bedrock client and is in the process of sending resource packs.
  • Constructor Details

    • SessionLoadResourcePacksEvent

      public SessionLoadResourcePacksEvent(@NonNull GeyserConnection connection)
  • Method Details

    • resourcePacks

      public abstract @NonNull List<ResourcePack> resourcePacks()
      Gets an unmodifiable list of ResourcePacks that will be sent to the client.
      Returns:
      an unmodifiable list of resource packs that will be sent to the client.
    • register

      public abstract boolean register(@NonNull ResourcePack resourcePack)
      Registers a ResourcePack to be sent to the client.
      Parameters:
      resourcePack - a resource pack that will be sent to the client.
      Returns:
      true if the resource pack was added successfully, or false if already present
    • unregister

      public abstract boolean unregister(@NonNull UUID uuid)
      Unregisters a resource pack from being sent to the client.
      Parameters:
      uuid - the UUID of the resource pack
      Returns:
      true whether the resource pack was removed from the list of resource packs.