Added ability for players to create custom chat channels

This commit is contained in:
Waverunner
2015-07-08 13:30:56 -04:00
parent 1b94fe0f1a
commit 3816802551
7 changed files with 234 additions and 17 deletions
+14 -1
View File
@@ -45,6 +45,7 @@ import utilities.MathUtils;
import utilities.Encoder.StringType;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class PlayerObject extends IntangibleObject {
@@ -389,7 +390,19 @@ public class PlayerObject extends IntangibleObject {
}
public List<String> getJoinedChannels() {
return joinedChannels;
return Collections.unmodifiableList(joinedChannels);
}
public boolean addJoinedChannel(String path) {
synchronized (joinedChannels) {
return !joinedChannels.contains(path) && joinedChannels.add(path);
}
}
public boolean removeJoinedChannel(String path) {
synchronized (joinedChannels) {
return joinedChannels.remove(path);
}
}
private int getProfessionIcon() {