Inviting Players to Group! Please Help!

Discussion in 'Plugin Development' started by canemonster15, Sep 10, 2013.

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

    canemonster15

    So, I want to make a plugin where you can invite people to your group. Just like towny. You can invite someone and it will send them a message saying if you want to join type /accept. How do I make it so when someone type /accept, they join the group they were invited to?

    Bump!

    xBlackLightx I saw your help on other posts, you seemed pretty good.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  2. Offline

    xBlackLightx

    1) You're going to get in trouble if you continue to triple post.
    2) What code do you have so far?
    canemonster15
     
  3. Offline

    canemonster15

    xBlackLightx Nothing yet, I just wanna know how to find out the if the person who types /accept, has a pending invite a group.
     
  4. Offline

    bobacadodl

    canemonster15
    You can only bump once per 24 hours!

    Anyways.. add them to a hashmap/list when they get invited to the group, then to check if they have a pending request, check if they are in the hashmap/list.
     
  5. Offline

    canemonster15

    bobacadodl But, what if there are multiple different groups, and people can create their own groups, do I make a hashmap/list for every group?
     
  6. Offline

    bobacadodl

    public HashMap<String,String> invitations = new HashMap<String,String>(); //player name, group name

    public HashMap<String,List<String>> groups = new HashMap<String,List<String>>(); //group name, list of players in the group
     
  7. Offline

    canemonster15

    bobacadodl Sorry, I'm kinda new with hashmaps. How would these both work?
     
Thread Status:
Not open for further replies.

Share This Page