Skip to content

Commit f4c50e5

Browse files
authored
Merge pull request #108 from GeorgeRNG/7.0-plot-command
2 parents 2c744a3 + cb609f3 commit f4c50e5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/diamondfire/helpbot/bot/command/impl/stats/plot/AbstractPlotCommand.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.diamondfire.helpbot.util.*;
88
import net.dv8tion.jda.api.EmbedBuilder;
99
import net.dv8tion.jda.api.utils.FileUpload;
10+
import org.jetbrains.annotations.Nullable;
1011

1112
import java.io.File;
1213
import java.sql.*;
@@ -50,9 +51,12 @@ public void run(CommandEvent event) {
5051
new InformativeReply(InformativeReplyType.INFO, String.format("Plot Information (%s)", plotID), null)
5152
);
5253

54+
@Nullable String handle = resultTablePlot.getString("handle");
55+
@Nullable String description = resultTablePlot.getString("description");
5356
PlotSize size = PlotSize.fromID(resultTablePlot.getInt("plotsize") - 1);
5457

55-
embed.setTitle(String.format("Plot Information (%s)", plotID));
58+
embed.setTitle(handle == null ? String.format("Plot Information (%s)", plotID) : String.format("Plot Information (%s) (%s)", handle, plotID));
59+
embed.setDescription(description);
5660
embed.addField("Name", StringUtil.fromMiniMessage(resultTablePlot.getString("name")), true);
5761
embed.addField("Owner", resultTablePlot.getString("owner_name"), true);
5862
embed.addField("Node", "Node " + resultTablePlot.getInt("node"), true);
@@ -110,7 +114,8 @@ public void run(CommandEvent event) {
110114
private enum PlotSize {
111115
BASIC(51),
112116
LARGE(101),
113-
MASSIVE(301);
117+
MASSIVE(301),
118+
MEGA(1001);
114119

115120
private final int size;
116121

0 commit comments

Comments
 (0)