From c61941dfef0d8becf87e31797a489cb320c6536c Mon Sep 17 00:00:00 2001 From: thmsdy Date: Sun, 19 Jan 2020 19:47:26 -0600 Subject: [PATCH] Fixed bug where badges would show up as "null --- pom.xml | 2 +- .../java/com/fpghoti/fpchatx/command/commands/HelpCommand.java | 2 +- src/main/java/com/fpghoti/fpchatx/player/FPlayer.java | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5f6c68e..b29b001 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 FPChatX FPChatX - 1.0.1-BETA + 1.0.2-BETA spigot-repo diff --git a/src/main/java/com/fpghoti/fpchatx/command/commands/HelpCommand.java b/src/main/java/com/fpghoti/fpchatx/command/commands/HelpCommand.java index 7c855ed..8d0d4ef 100644 --- a/src/main/java/com/fpghoti/fpchatx/command/commands/HelpCommand.java +++ b/src/main/java/com/fpghoti/fpchatx/command/commands/HelpCommand.java @@ -78,7 +78,7 @@ public class HelpCommand extends Commands { FPlayer.plainMsg(p,ctype); 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 help page# " + ChatColor.GRAY + "for a list of commands."); + FPlayer.plainMsg(p, ChatColor.GRAY + "Use " + ChatColor.WHITE + "/fpc help " + ChatColor.GRAY + "for a list of commands."); return; } FPlayer.plainMsg(p, ChatColor.GOLD + "[" + Integer.toString(pg) + "/" + Integer.toString(pageCount) + "] " + ChatColor.YELLOW + "FPChatX Commands:"); diff --git a/src/main/java/com/fpghoti/fpchatx/player/FPlayer.java b/src/main/java/com/fpghoti/fpchatx/player/FPlayer.java index d180db8..c6114f6 100644 --- a/src/main/java/com/fpghoti/fpchatx/player/FPlayer.java +++ b/src/main/java/com/fpghoti/fpchatx/player/FPlayer.java @@ -286,6 +286,9 @@ public class FPlayer { } public Integer[] getBadges() { + if(badges[0] == null || badges[1] == null || badges[2] == null) { + badges = BadgeGetter.getBadges(this); + } return this.badges; }