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.CancellableThis 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 booleancanUseThisPortal()Gets whether or not the player in this event can use this portal.org.bukkit.LocationgetBlockTouched()Gets theLocationof the portal-block that was touched.static org.bukkit.event.HandlerListgetHandlerList()Gets the handler list.org.bukkit.event.HandlerListgetHandlers()org.bukkit.entity.PlayergetPlayer()Gets thePlayerthat's touching the portal.booleanisCancelled()voidsetCancelled(boolean b)voidsetCanUseThisPortal(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:
getHandlersin 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 theLocationof the portal-block that was touched.- Returns:
- The
Locationof the portal-block that was touched.
-
getPlayer
public org.bukkit.entity.Player getPlayer()
Gets thePlayerthat's touching the portal.- Returns:
- The
Playerthat'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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean b)
- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
-