Fix Codacy isues

This commit is contained in:
Nathan Curran 2021-06-15 23:33:22 +10:00
parent b0f4017cde
commit cc4d005d5f
No known key found for this signature in database
GPG key ID: B3A964B30C2E56B8
3 changed files with 9 additions and 3 deletions

View file

@ -138,6 +138,11 @@ public class GuildCommand extends Common implements CommandExecutor, TabComplete
return guild.getMemberNames(); return guild.getMemberNames();
} }
} }
default:
{
return Collections.emptyList();
}
} }
} }
return Collections.emptyList(); return Collections.emptyList();

View file

@ -825,7 +825,7 @@ public class Guild
if (Common.GUILD_CHAT_SPY.contains(p) && player != p && !isMember(p)) if (Common.GUILD_CHAT_SPY.contains(p) && player != p && !isMember(p))
{ {
p.sendMessage(GUtil.colorize("&7[&bGuild Chat Spy &7| &b" + name + "&7] " + player.getName() + " &8\u00BB &6") + message); p.sendMessage(GUtil.colorize("&7[&bGuild " + (modChat ? "Mod " : "") + "Chat Spy &7| &b" + name + "&7] " + player.getName() + " &8\u00BB &6") + message);
} }
} }
} }

View file

@ -40,15 +40,16 @@ public class GUtil
public static String removeColorCodes(String string) public static String removeColorCodes(String string)
{ {
String s = null;
if (string != null) if (string != null)
{ {
Matcher matcher = CHAT_COLOR_FORMAT.matcher(string); Matcher matcher = CHAT_COLOR_FORMAT.matcher(string);
while (matcher.find()) while (matcher.find())
{ {
string = string.replaceAll(matcher.group(), ""); s = string.replaceAll(matcher.group(), "");
} }
} }
return string; return s;
} }
public static boolean containsBlacklistedWord(String string) public static boolean containsBlacklistedWord(String string)