Class ClientInformationUpdatedEvent


public class ClientInformationUpdatedEvent extends PlayerEvent
ClientInformationUpdatedEvent is fired when a player changes server-synced client options, specifically those in ClientInformation.

This event is fired on the NeoForge.EVENT_BUS.

  • Field Details

  • Constructor Details

  • Method Details

    • getEntity

      public ServerPlayer getEntity()
      Overrides:
      getEntity in class PlayerEvent
    • getUpdatedInformation

      public ClientInformation getUpdatedInformation()
      Returns the new client info to be applied to the player. Sometimes the client resends unchanged options, so if that matters for your use case, check equality with getOldInformation().
      Returns:
      updated information
    • getOldInformation

      public ClientInformation getOldInformation()
      Returns the existing client info from to the player.

      May be blank or defaulted initial data on first event call for a player instance.

      Returns:
      updated information