From cb609f3567a8fe5ffb4694c64b82894013804574 Mon Sep 17 00:00:00 2001 From: GeorgeRNG <81434111+GeorgeRNG@users.noreply.github.com> Date: Tue, 24 Dec 2024 16:11:42 +0000 Subject: [PATCH] update the plot command for stuff added up to 7.0 --- .../bot/command/impl/stats/plot/AbstractPlotCommand.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/plot/AbstractPlotCommand.java b/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/plot/AbstractPlotCommand.java index 4ded2fe1..6028ca25 100644 --- a/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/plot/AbstractPlotCommand.java +++ b/src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/plot/AbstractPlotCommand.java @@ -7,6 +7,7 @@ import com.diamondfire.helpbot.util.*; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.utils.FileUpload; +import org.jetbrains.annotations.Nullable; import java.io.File; import java.sql.*; @@ -50,9 +51,12 @@ public void run(CommandEvent event) { new InformativeReply(InformativeReplyType.INFO, String.format("Plot Information (%s)", plotID), null) ); + @Nullable String handle = resultTablePlot.getString("handle"); + @Nullable String description = resultTablePlot.getString("description"); PlotSize size = PlotSize.fromID(resultTablePlot.getInt("plotsize") - 1); - embed.setTitle(String.format("Plot Information (%s)", plotID)); + embed.setTitle(handle == null ? String.format("Plot Information (%s)", plotID) : String.format("Plot Information (%s) (%s)", handle, plotID)); + embed.setDescription(description); embed.addField("Name", StringUtil.fromMiniMessage(resultTablePlot.getString("name")), true); embed.addField("Owner", resultTablePlot.getString("owner_name"), true); embed.addField("Node", "Node " + resultTablePlot.getInt("node"), true); @@ -110,7 +114,8 @@ public void run(CommandEvent event) { private enum PlotSize { BASIC(51), LARGE(101), - MASSIVE(301); + MASSIVE(301), + MEGA(1001); private final int size;