generated from LabyMod/addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with everyone beeing displayed as Tag
- Loading branch information
Showing
5 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
core/src/main/java/com/funkeln/pronouns/utils/Pridetags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
package com.funkeln.pronouns.utils; | ||
|
||
import java.util.Set; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
import java.util.concurrent.CopyOnWriteArraySet; | ||
|
||
public final class Pridetags { | ||
|
||
public static Set<Profile> profiles = ConcurrentHashMap.newKeySet(); | ||
public static Set<Profile> profiles = new CopyOnWriteArraySet<>(); | ||
|
||
|
||
|
||
public static Set<Profile> getProfiles() { | ||
// return all profiles from the HashMap | ||
StringBuilder sb = new StringBuilder(); | ||
for (Profile profile : profiles) { | ||
// put them into a big string | ||
sb.append(profile.getUsername() + " : " + profile.getPronoun() + "\n"); | ||
} | ||
return profiles; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters