.

Discussion in 'Plugin Development' started by elementalgodz11, Dec 18, 2013.

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

    elementalgodz11

  2. Offline

    sgavster

    elementalgodz11 You should use a hashmap:

    Code:java
    1. private HashMap<String, String> mute = new HashMap<String, String>();
    2.  
    3.  


    Then, on the mute command do this:
    Code:java
    1. mute.put(sender.getName(), target.getName());


    Then, on the other commands

    Code:java
    1. if(mute.containsKey(target.getName() && mute.values().contains(sender.getName()) {
    2. sender.sendMessage("That person is ignoring you!");
    3. } else {
    4. //your code
    5. }


    elementalgodz11 Look at my edited post :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
    elementalgodz11 likes this.
Thread Status:
Not open for further replies.

Share This Page