Thread: Previous teleport

Results 1 to 2 of 2
  1. #1 Previous teleport 
    Registered Member
    Join Date
    Apr 2018
    Posts
    62
    Thanks given
    9
    Thanks received
    0
    Rep Power
    38
    hey guys any 1 know how i would go about adding a previous teleport

    http://prntscr.com/jf8hma

    i have added it client sided but any 1 help me add it server sided
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2017
    Posts
    85
    Thanks given
    1
    Thanks received
    6
    Rep Power
    28
    In player.java:
    Code:
     
    private Position lastTeleport;
    public Position getLastTeleport() {
    return lastTeleport;
    } 
    
    public void setLastTeleport(Position Pos) {
    this.lastTeleport = pos
    }
    In the method where you call a teleport:
    Code:
    player.setLastTeleport(position);
    In ButtonClickPacketListener.java
    Code:
     
    if(button == XXXX) {
    player.getTeleportHandler().startTeleport(player.getLastTeleport();
    }
    Change according to your variable names accordingly.

    Typed on my phone, excuse any typos
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Method] Easier Teleports!
    By Runite in forum Configuration
    Replies: 7
    Last Post: 12-04-2007, 10:36 PM
  2. Changing Were Teleport stuff
    By reece844 in forum Tutorials
    Replies: 0
    Last Post: 08-21-2007, 08:10 AM
  3. Teleport Commands explained
    By Frost in forum Tutorials
    Replies: 3
    Last Post: 08-11-2007, 06:46 AM
  4. Teleport handler *little tut*
    By Laxika in forum Tutorials
    Replies: 6
    Last Post: 07-31-2007, 09:47 PM
  5. Fixing Teleport
    By Shiver in forum Tutorials
    Replies: 2
    Last Post: 05-12-2007, 05:00 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •