Skip to content

Commit

Permalink
Fixed spy chat and banned list
Browse files Browse the repository at this point in the history
- The remaining chat codes (k, m, n, o, r) are now stripped from the Spy
Chat messages. Closes marcelo-mason#550
- The banned players list is now saved to the config. Closes marcelo-mason#546
  • Loading branch information
RoinujNosde committed Feb 7, 2020
1 parent eedc743 commit 2727203
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/target/
/.idea/
SimpleClans.iml
SimpleClans.iml
/bin/
/.classpath
/.project
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
<artifactId>SimpleClans</artifactId>
<version>2.8.0</version>
<version>2.8.1</version>
<name>SimpleClans</name>
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,9 @@ public static String parseColors(String msg) {
* @return
*/
public static String stripColors(String msg) {
String out = msg.replaceAll("[&][0-9a-f]", "");
String out = msg.replaceAll("[&][0-9a-fk-or]", "");
out = out.replaceAll(String.valueOf((char) 194), "");
return out.replaceAll("[\u00a7][0-9a-f]", "");
return out.replaceAll("[\u00a7][0-9a-fk-or]", "");
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@ public void addBanned(UUID playerUniqueId) {
if (!bannedPlayers.contains(playerUniqueId.toString())) {
bannedPlayers.add(playerUniqueId.toString());
}


getConfig().set("settings.banned-players", bannedPlayers);
save();
}

Expand All @@ -703,7 +704,8 @@ public void removeBanned(UUID playerUniqueId) {
if (bannedPlayers.contains(playerUniqueId.toString())) {
bannedPlayers.remove(playerUniqueId.toString());
}


getConfig().set("settings.banned-players", bannedPlayers);
save();
}

Expand Down

0 comments on commit 2727203

Please sign in to comment.