diff --git a/src/main/java/com/diamondfire/helpbot/bot/command/impl/other/SamQuotesCommand.java b/src/main/java/com/diamondfire/helpbot/bot/command/impl/other/SamQuotesCommand.java index 86d0c570..2dfd60f6 100644 --- a/src/main/java/com/diamondfire/helpbot/bot/command/impl/other/SamQuotesCommand.java +++ b/src/main/java/com/diamondfire/helpbot/bot/command/impl/other/SamQuotesCommand.java @@ -440,4 +440,4 @@ public ArgumentSet compileArguments() { new SingleArgumentContainer<>(new DefinedObjectArgument<>("submit", "generate", "get")).optional(null)); } -} \ No newline at end of file +} diff --git a/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/individualized/CpCommand.java b/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/individualized/CpCommand.java index 5d13105a..b91b5166 100644 --- a/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/individualized/CpCommand.java +++ b/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/individualized/CpCommand.java @@ -91,8 +91,14 @@ protected void execute(CommandEvent event, String player) { .query(new BasicQuery("SELECT * FROM owen.creator_rankings_log WHERE uuid = ? ORDER BY points DESC LIMIT 1", (statement) -> statement.setString(1, uuid))) .compile() .run((tableSet) -> { + if (!tableSet.isEmpty()) { - embed.addField("Highest Point Count", FormatUtil.formatNumber(tableSet.getResult().getInt("points")), false); + int maxPoints = tableSet.getResult().getInt("points"); + if (maxPoints > points) { + embed.addField("Highest Point Count", FormatUtil.formatNumber(maxPoints), false); + } else { + embed.addField("Highest Point Count", FormatUtil.formatNumber(points), false); + } } });