Skip to content

Commit

Permalink
Banned : to fix bugs with storage
Browse files Browse the repository at this point in the history
Issue Reference: #185
  • Loading branch information
booksaw committed Jul 17, 2021
1 parent afd3509 commit 23c6753
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ Bug Fixes:
- Fixed bug causing echest changes to not save (#181)
- Fixed bug causing teams to disband incorrectly (#178 #190 #182 #187 #176 #177)
- Fixed bug causing /teama reload to crash the plugin (#189)
- Fixed bug with team names with the symbol `:` in (#185)

TODO (any TODO which is not specifically code), mainly used for reminders to update documentation

Expand Down
2 changes: 1 addition & 1 deletion src/com/booksaw/betterTeams/Team.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static boolean isValidTeamName(String name) {
}

// stop players inputting color codes
if (name.contains("&")) {
if (name.contains("&") || name.contains(":")) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ protected void convert() {
configManager.config.set(key, get);
}

teamLookup.add(configManager.config.getString(StoredTeamValue.NAME.getReference()) + ":" + teamUUID);
String name = configManager.config.getString(StoredTeamValue.NAME.getReference());
if (name.contains(":")) {
name = name.replace(":", "");
configManager.config.set(StoredTeamValue.NAME.getReference(), name);
}

teamLookup.add(name + ":" + teamUUID);

for (String playerUUID : configManager.config.getStringList("players")) {
String[] split = playerUUID.split(",");
Expand Down

0 comments on commit 23c6753

Please sign in to comment.