Class MVPlayerTouchedPortalEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- com.onarandombox.MultiverseCore.event.MVPlayerTouchedPortalEvent
-
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class MVPlayerTouchedPortalEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
This event is thrown when a portal is touched.
-
-
Constructor Summary
Constructors Constructor Description MVPlayerTouchedPortalEvent(org.bukkit.entity.Player p, org.bukkit.Location l)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canUseThisPortal()
Gets whether or not the player in this event can use this portal.org.bukkit.Location
getBlockTouched()
Gets theLocation
of the portal-block that was touched.static org.bukkit.event.HandlerList
getHandlerList()
Gets the handler list.org.bukkit.event.HandlerList
getHandlers()
org.bukkit.entity.Player
getPlayer()
Gets thePlayer
that's touching the portal.boolean
isCancelled()
void
setCancelled(boolean b)
void
setCanUseThisPortal(boolean canUse)
Sets whether or not the player in this event can use this portal.
-
-
-
Method Detail
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()
- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
Gets the handler list. This is required by the event system.- Returns:
- A list of HANDLERS.
-
getBlockTouched
public org.bukkit.Location getBlockTouched()
Gets theLocation
of the portal-block that was touched.- Returns:
- The
Location
of the portal-block that was touched.
-
getPlayer
public org.bukkit.entity.Player getPlayer()
Gets thePlayer
that's touching the portal.- Returns:
- The
Player
that's touching the portal.
-
canUseThisPortal
public boolean canUseThisPortal()
Gets whether or not the player in this event can use this portal.- Returns:
- True if the player can use this portal.
-
setCanUseThisPortal
public void setCanUseThisPortal(boolean canUse)
Sets whether or not the player in this event can use this portal.Setting this to false will cause the player to bounce back!
- Parameters:
canUse
- Whether or not the user can go through this portal.
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean b)
- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
-