TFGuilds Second Release Candidate

- Fixed owner not being counted
- Updated regex to include hex colour codes
This commit is contained in:
Nathan Curran 2021-06-20 13:51:19 +10:00
parent 50058d2b76
commit 32afc7c1b2
No known key found for this signature in database
GPG key ID: B3A964B30C2E56B8
4 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/.idea/
target/
out/
TFGuilds.iml

View file

@ -6,7 +6,7 @@
<groupId>me.totalfreedom</groupId>
<artifactId>TFGuilds</artifactId>
<version>2021.06-RC1</version>
<version>2021.06-RC2</version>
<packaging>jar</packaging>
<name>TFGuilds</name>

View file

@ -858,7 +858,7 @@ public class Guild
ChatColor.GRAY + " Name: " + ChatColor.GOLD + name + "\n" +
ChatColor.GRAY + " Owner: " + ChatColor.GOLD + Bukkit.getOfflinePlayer(owner).getName() + "\n" +
ChatColor.GRAY + " Moderators: " + ChatColor.GOLD + moderators.size() + "\n" +
ChatColor.GRAY + " Members: " + ChatColor.GOLD + members.size() + "\n" +
ChatColor.GRAY + " Members: " + ChatColor.GOLD + (members.size() + 1) + "\n" +
ChatColor.GRAY + " Tag: " + ChatColor.GOLD + (tag != null ? GUtil.colorize(tag) : "None") + "\n" +
ChatColor.GRAY + " State: " + ChatColor.GOLD + state.name() + "\n" +
ChatColor.GRAY + " Ranks (" + ranks.size() + "): " + ChatColor.GOLD + StringUtils.join(getRankNames(), ", ") + "\n" +

View file

@ -20,7 +20,7 @@ public class GUtil
"admin", "owner", "moderator", "developer", "console", "dev", "staff",
"mod", "sra", "sta", "sa", "super admin", "telnet admin", "senior admin",
"trial mod", "trial moderator", "trialmod", "trialmoderator");
private static final Pattern CHAT_COLOR_FORMAT = Pattern.compile("&[a-fk-or0-9]", Pattern.CASE_INSENSITIVE);
private static final Pattern CHAT_COLOR_FORMAT = Pattern.compile("&([a-fk-or0-9]|#[a-f0-9]{6})", Pattern.CASE_INSENSITIVE);
public static String colorize(String string)
{