Class DiscoverInstanceEvent.Display

All Implemented Interfaces:
ICancellableEcsEvent
Enclosing class:
DiscoverInstanceEvent

public static class DiscoverInstanceEvent.Display extends DiscoverInstanceEvent implements ICancellableEcsEvent
An event that is fired when an instance discovery is displayed to the player.

If cancelled, the instance discovery title will not be displayed to the player, but the instance will still be marked as discovered.

  • Constructor Details

    • Display

      public Display(@Nonnull UUID instanceWorldUuid, @Nonnull InstanceDiscoveryConfig discoveryConfig)
      Default Constructor for a DiscoverInstanceEvent.Display instance.
      Parameters:
      instanceWorldUuid - The UUID of the instance world.
      discoveryConfig - The discovery configuration for the instance.
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Description copied from interface: ICancellableEcsEvent
      Returns whether this event has been cancelled.
      Specified by:
      isCancelled in interface ICancellableEcsEvent
      Returns:
      true if the event is cancelled, false otherwise.
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: ICancellableEcsEvent
      Changes whether this event has been cancelled or not.
      Specified by:
      setCancelled in interface ICancellableEcsEvent
      Parameters:
      cancelled - Whether the event should be cancelled.
    • shouldDisplay

      public boolean shouldDisplay()
      Returns:
      true if the discovery title should be displayed; false otherwise.
    • setDisplay

      public void setDisplay(boolean display)
      Sets whether the discovery title should be displayed.
      Parameters:
      display - Whether to display the discovery title.