Class AsyncPlayerConfigurationEvent

java.lang.Object
net.minestom.server.event.player.AsyncPlayerConfigurationEvent
All Implemented Interfaces:
Event, EntityEvent, PlayerEvent

public class AsyncPlayerConfigurationEvent extends Object implements PlayerEvent
Called when a player enters the configuration state (either on first connection, or if they are sent back to configuration later). The player is moved to the play state as soon as all event handles finish processing this event.

The spawning instance must be set for the player to join.

The event is called off the tick threads, so it is safe to block here

  • Constructor Details

    • AsyncPlayerConfigurationEvent

      public AsyncPlayerConfigurationEvent(@NotNull @NotNull Player player, boolean isFirstConfig, @NotNull @NotNull Set<FeatureFlag> enabledFeatures)
  • Method Details

    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player
    • isFirstConfig

      public boolean isFirstConfig()
      Returns true if this is the first time the player is in the configuration phase (they are joining), false otherwise.
    • isHardcore

      public boolean isHardcore()
    • setHardcore

      public void setHardcore(boolean hardcore)
    • willSendRegistryData

      public boolean willSendRegistryData()
    • setSendRegistryData

      public void setSendRegistryData(boolean sendRegistryData)
    • getSpawningInstance

      @Nullable public @Nullable Instance getSpawningInstance()
    • setSpawningInstance

      public void setSpawningInstance(@Nullable @Nullable Instance spawningInstance)
    • setEnabledFeatures

      public void setEnabledFeatures(Set<FeatureFlag> enabledFeatures)
    • getEnabledFeatures

      public Set<FeatureFlag> getEnabledFeatures()