Fixed bug where badges would show up as "null

This commit is contained in:
Ghoti 2020-01-19 19:47:26 -06:00
parent cefba8b2ae
commit c61941dfef
3 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>FPChatX</groupId> <groupId>FPChatX</groupId>
<artifactId>FPChatX</artifactId> <artifactId>FPChatX</artifactId>
<version>1.0.1-BETA</version> <version>1.0.2-BETA</version>
<repositories> <repositories>
<repository> <repository>
<id>spigot-repo</id> <id>spigot-repo</id>

View File

@ -78,7 +78,7 @@ public class HelpCommand extends Commands {
FPlayer.plainMsg(p,ctype); FPlayer.plainMsg(p,ctype);
FPlayer.plainMsg(p,online); FPlayer.plainMsg(p,online);
FPlayer.plainMsg(p,ChatColor.GRAY + "Use " + ChatColor.WHITE + "/fpc who " + ChatColor.GRAY + "to see who is in this channel."); FPlayer.plainMsg(p,ChatColor.GRAY + "Use " + ChatColor.WHITE + "/fpc who " + ChatColor.GRAY + "to see who is in this channel.");
FPlayer.plainMsg(p, ChatColor.GRAY + "Use " + ChatColor.WHITE + "/fpc help page# " + ChatColor.GRAY + "for a list of commands."); FPlayer.plainMsg(p, ChatColor.GRAY + "Use " + ChatColor.WHITE + "/fpc help <page number> " + ChatColor.GRAY + "for a list of commands.");
return; return;
} }
FPlayer.plainMsg(p, ChatColor.GOLD + "[" + Integer.toString(pg) + "/" + Integer.toString(pageCount) + "] " + ChatColor.YELLOW + "FPChatX Commands:"); FPlayer.plainMsg(p, ChatColor.GOLD + "[" + Integer.toString(pg) + "/" + Integer.toString(pageCount) + "] " + ChatColor.YELLOW + "FPChatX Commands:");

View File

@ -286,6 +286,9 @@ public class FPlayer {
} }
public Integer[] getBadges() { public Integer[] getBadges() {
if(badges[0] == null || badges[1] == null || badges[2] == null) {
badges = BadgeGetter.getBadges(this);
}
return this.badges; return this.badges;
} }