plugin wait

Discussion in 'Plugin Development' started by kamakarzy, May 11, 2013.

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

    kamakarzy

    hi how do i make a plugin so it has to get a reply for example tpa and tpaccept
     
  2. Offline

    Avery246813579

    You will have to use three commands. Tpa, Tpaccept, Tpdeny.
    Tpa will use hashmaps to store the command senders name and the target player. Here is an example hashmap:
    Code:
        public HashMap<String, String> teleport = new HashMap<String, String>();         
            teleport.put(player.getName(), target.getName());
    Tpaccept will get the name of the targetplayer from the hashmap and teleports the player to the target player location. This is how you get the targetplayer name from the hashmap:
    Code:
            String target = teleport.get(player.getName());
    Tpdeny will reset the hashmap and send the player a deny message.

    Hope this helped.
     
  3. Offline

    kamakarzy

Thread Status:
Not open for further replies.

Share This Page