Module gomint.api

Class EntityTeleportEvent

    • Constructor Detail

      • EntityTeleportEvent

        public EntityTeleportEvent​(Entity entity,
                                   Location from,
                                   Location to,
                                   EntityTeleportEvent.Cause cause)
        Create a new entity based cancellable event
        Parameters:
        entity - for which this event is
        from - which location the entity will be teleported
        to - which location this entity will be transfered
        cause - of the teleport
    • Method Detail

      • getFrom

        public Location getFrom()
        Get the location from where the entity will be teleported
        Returns:
        the from location
      • getTo

        public Location getTo()
        Get the location to which the entity should be teleported
        Returns:
        the to location
      • getCause

        public EntityTeleportEvent.Cause getCause()
        Get the cause of this event
        Returns:
        the cause why this teleport happens