Module gomint.api

Class PlayerMoveEvent

    • Constructor Detail

      • PlayerMoveEvent

        public PlayerMoveEvent​(EntityPlayer player,
                               Location from,
                               Location to)
        Construct a new player movement event for the given player. The from location can't be changed. If you change the to location the player gets teleported to where you set it.
        player - The player which wants to move
        from - The location from where it wants to move
        to - The location to which it wants to move
    • Method Detail

      • getFrom

        public Location getFrom()
        Get the from location of this event
        the from location
      • getTo

        public Location getTo()
        The location where the player wants to travel to
        the to location
      • setTo

        public void setTo​(Location to)
        You can set the to location to teleport the player. If you cancel the event this will be overwritten by the from value.
        to - the new to location