Class PlayerPortalEvent

    • Field Detail

      • useTravelAgent

        protected boolean useTravelAgent
    • Method Detail

      • useTravelAgent

        public void useTravelAgent​(boolean useTravelAgent)
        Sets whether or not the Travel Agent will be used.

        If this is set to true, the TravelAgent will try to find a Portal at the PlayerMoveEvent.getTo() Location, and will try to create one if there is none.

        If this is set to false, the PlayerEvent.getPlayer() will only be teleported to the PlayerMoveEvent.getTo() Location.

        Parameters:
        useTravelAgent - whether to use the Travel Agent
      • useTravelAgent

        public boolean useTravelAgent()
        Gets whether or not the Travel Agent will be used.

        If this is set to true, the TravelAgent will try to find a Portal at the PlayerMoveEvent.getTo() Location, and will try to create one if there is none.

        If this is set to false, the PlayerEvent.getPlayer()} will only be teleported to the PlayerMoveEvent.getTo() Location.

        Returns:
        whether to use the Travel Agent
      • getPortalTravelAgent

        public TravelAgent getPortalTravelAgent()
        Gets the Travel Agent used (or not) in this event.
        Returns:
        the Travel Agent used (or not) in this event
      • setPortalTravelAgent

        public void setPortalTravelAgent​(TravelAgent travelAgent)
        Sets the Travel Agent used (or not) in this event.
        Parameters:
        travelAgent - the Travel Agent used (or not) in this event
      • getHandlerList

        public static HandlerList getHandlerList()