Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.bukkit.event.Event

        org.bukkit.event.Event.Result
    • 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 the Location 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 the Player 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.
      • Methods inherited from class org.bukkit.event.Event

        getEventName, isAsynchronous
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MVPlayerTouchedPortalEvent

        public MVPlayerTouchedPortalEvent​(org.bukkit.entity.Player p,
                                          org.bukkit.Location l)
    • Method Detail

      • getHandlers

        public org.bukkit.event.HandlerList getHandlers()
        Specified by:
        getHandlers in class org.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 the Location 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 the Player 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 interface org.bukkit.event.Cancellable
      • setCancelled

        public void setCancelled​(boolean b)
        Specified by:
        setCancelled in interface org.bukkit.event.Cancellable