Contents
Class DiscoverInstanceEvent.Display
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.builtin.instances.event.DiscoverInstanceEvent
com.hypixel.hytale.builtin.instances.event.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.
-
Nested Class Summary
Nested classes/interfaces inherited from class DiscoverInstanceEvent
DiscoverInstanceEvent.Display -
Constructor Summary
ConstructorsConstructorDescriptionDisplay(UUID instanceWorldUuid, InstanceDiscoveryConfig discoveryConfig) Default Constructor for aDiscoverInstanceEvent.Displayinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this event has been cancelled.voidsetCancelled(boolean cancelled) Changes whether this event has been cancelled or not.voidsetDisplay(boolean display) Sets whether the discovery title should be displayed.booleanMethods inherited from class DiscoverInstanceEvent
getDiscoveryConfig, getInstanceWorldUuid
-
Constructor Details
-
Display
Default Constructor for aDiscoverInstanceEvent.Displayinstance.- 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:ICancellableEcsEventReturns whether this event has been cancelled.- Specified by:
isCancelledin interfaceICancellableEcsEvent- Returns:
trueif the event is cancelled,falseotherwise.
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:ICancellableEcsEventChanges whether this event has been cancelled or not.- Specified by:
setCancelledin interfaceICancellableEcsEvent- Parameters:
cancelled- Whether the event should be cancelled.
-
shouldDisplay
public boolean shouldDisplay()- Returns:
trueif the discovery title should be displayed;falseotherwise.
-
setDisplay
public void setDisplay(boolean display) Sets whether the discovery title should be displayed.- Parameters:
display- Whether to display the discovery title.
-