Making a Tpa command and Tpaccept command

Discussion in 'Plugin Development' started by gamemster2468, Sep 24, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    gamemster2468

    Hello,

    Recently I've been working on a survival server and I ran into the error of needing a tpa and tpaccept command. However, I do not know where I would start with the code.

    Any help / explains would be great!
    Thanks <3
     
  2. Offline

    Gerov

  3. Offline

    Skionz

    gamemster2468 There are a lot of threads on this. I have even seen youtube videos on writing tpa commands.
     
  4. Offline

    gamemster2468

  5. Offline

    dsouzamatt

    gamemster2468 If you don't mind not actually coding it yourself, Essentials already has tpa and tpaccept
     
  6. Offline

    gamemster2468

    Yes I know, but I'd rather code it myself =/ dsouzamatt
     
  7. Offline

    Gerov

    gamemster2468 I was thinking since you said you didn't know how to start, you had just started with the Bukkit API.
     
  8. Offline

    gamemster2468

    Oh Gerov , but do you know how I would do it?
     
  9. Offline

    Gerov

    gamemster2468 Make your TPA command, if someone does it take the player's name from the request, and put it in a hashmap with the sender's name, if a player does /tpaccept check if their name is in the hashmap, if it is, teleport them to the person they were in the hashmap with and remove them from it.
     
  10. Offline

    MineStein

    Use maps.
     
  11. Offline

    Skionz

    gamemster2468 It took one google search. About 5-10 seconds to get this:
     
  12. Offline

    EnchantedMiners

    gamemster2468 if you know about making plugins already you might know about hashmaps/maps you them to make tpa requests like when player type tpa <player> save the player sender and the player invited to the hashmap then when /tpa accept check if the player have any resent invitation if not just send a message if yes you might want to check if the player invitation is online or just do a playerquitevent and if the player who leaves is on the hashmap then remove him from it simple :D
     
    stanlehx likes this.
Thread Status:
Not open for further replies.

Share This Page