Package de.eimmer.ereignis.spieler
Class SpielerPortalEreignis
java.lang.Object
de.eimmer.ereignis.Ereignis
de.eimmer.ereignis.spieler.SpielerEreignis
de.eimmer.ereignis.spieler.SpielerBewegEreignis
de.eimmer.ereignis.spieler.SpielerTeleportEreignis
de.eimmer.ereignis.spieler.SpielerPortalEreignis
- All Implemented Interfaces:
Abbrechbar
Called when a spieler is about to teleport because it is in contact with a
portal which will generate an exit portal.
For other entities see WesenPortalEreignis
-
Nested Class Summary
Nested classes/interfaces inherited from class de.eimmer.ereignis.spieler.SpielerTeleportEreignis
SpielerTeleportEreignis.TeleportCause
Nested classes/interfaces inherited from class de.eimmer.ereignis.Ereignis
Ereignis.Result
-
Field Summary
Fields inherited from class de.eimmer.ereignis.spieler.SpielerEreignis
spieler
-
Constructor Summary
ConstructorsConstructorDescriptionSpielerPortalEreignis
(Spieler spieler, Ort from, Ort to) SpielerPortalEreignis
(Spieler spieler, Ort from, Ort to, SpielerTeleportEreignis.TeleportCause cause) SpielerPortalEreignis
(Spieler spieler, Ort from, Ort to, SpielerTeleportEreignis.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the server will attempt to create a destination portal or not.int
Gets the maximum radius the welt is searched for a free space from the given location.static HandhaberListe
int
Gets the search radius value for finding an available portal.void
setCanCreatePortal
(boolean canCreatePortal) Sets whether the server should attempt to create a destination portal or not.void
setCreationRadius
(int creationRadius) Sets the maximum radius the welt is searched for a free space from the given location.void
setSearchRadius
(int searchRadius) Set the Block radius to search in for available portals.Methods inherited from class de.eimmer.ereignis.spieler.SpielerTeleportEreignis
getCause
Methods inherited from class de.eimmer.ereignis.spieler.SpielerBewegEreignis
getFrom, getTo, isCancelled, setCancelled, setFrom, setTo
Methods inherited from class de.eimmer.ereignis.spieler.SpielerEreignis
getPlayer
Methods inherited from class de.eimmer.ereignis.Ereignis
getEventName, isAsynchronous
-
Constructor Details
-
SpielerPortalEreignis
-
SpielerPortalEreignis
public SpielerPortalEreignis(@NotNull Spieler spieler, @NotNull Ort from, @Nullable Ort to, @NotNull SpielerTeleportEreignis.TeleportCause cause) -
SpielerPortalEreignis
public SpielerPortalEreignis(@NotNull Spieler spieler, @NotNull Ort from, @Nullable Ort to, @NotNull SpielerTeleportEreignis.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius)
-
-
Method Details
-
setSearchRadius
public void setSearchRadius(int searchRadius) Set the Block radius to search in for available portals.- Parameters:
searchRadius
- the radius in which to search for a portal from the location
-
getSearchRadius
public int getSearchRadius()Gets the search radius value for finding an available portal.- Returns:
- the currently set search radius
-
getCanCreatePortal
public boolean getCanCreatePortal()Returns whether the server will attempt to create a destination portal or not.- Returns:
- whether there should create be a destination portal created
-
setCanCreatePortal
public void setCanCreatePortal(boolean canCreatePortal) Sets whether the server should attempt to create a destination portal or not.- Parameters:
canCreatePortal
- Sets whether there should be a destination portal created
-
setCreationRadius
public void setCreationRadius(int creationRadius) Sets the maximum radius the welt is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.- Parameters:
creationRadius
- the radius in which to create a portal from the location
-
getCreationRadius
public int getCreationRadius()Gets the maximum radius the welt is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.- Returns:
- the currently set creation radius
-
getHandlers
- Overrides:
getHandlers
in classSpielerTeleportEreignis
-
getHandlerList
-