Class SpectatorFirstPersonEnterEvent
java.lang.Object
org.bukkit.event.Event
com.andrei1058.bedwars.api.events.spectator.SpectatorFirstPersonEnterEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class SpectatorFirstPersonEnterEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionSpectatorFirstPersonEnterEvent
(@NotNull org.bukkit.entity.Player spectator, @NotNull org.bukkit.entity.Player target, IArena arena, Function<org.bukkit.entity.Player, String> title, Function<org.bukkit.entity.Player, String> subtitle) Called when a spectator enters the first person spectating system. -
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Get the arenaint
int
static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.entity.Player
Get the spectatorint
getStay()
org.bukkit.entity.Player
Get the target playergetTitle()
Get first person enter subtitleboolean
Check if it is cancelledvoid
setCancelled
(boolean cancelled) Change valuevoid
setFadeIn
(int fadeIn) void
setFadeOut
(int fadeOut) void
setStay
(int stay) void
setSubTitle
(Function<org.bukkit.entity.Player, String> subTitle) Set first person enter title and subtitle.void
Get first person enter titleMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SpectatorFirstPersonEnterEvent
public SpectatorFirstPersonEnterEvent(@NotNull @NotNull org.bukkit.entity.Player spectator, @NotNull @NotNull org.bukkit.entity.Player target, IArena arena, Function<org.bukkit.entity.Player, String> title, Function<org.bukkit.entity.Player, String> subtitle) Called when a spectator enters the first person spectating system.
-
-
Method Details
-
getSpectator
public org.bukkit.entity.Player getSpectator()Get the spectator -
getArena
Get the arena -
getTarget
public org.bukkit.entity.Player getTarget()Get the target player -
isCancelled
public boolean isCancelled()Check if it is cancelled- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) Change value- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getSubTitle
-
getTitle
Get first person enter subtitle -
setTitle
Get first person enter title -
setSubTitle
Set first person enter title and subtitle. Leave "" for empty msg -
getStay
public int getStay() -
getFadeOut
public int getFadeOut() -
getFadeIn
public int getFadeIn() -
setStay
public void setStay(int stay) -
setFadeOut
public void setFadeOut(int fadeOut) -
setFadeIn
public void setFadeIn(int fadeIn) -
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-