Skip to content

Commit 1614726

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 233c95b + bd4427d commit 1614726

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/java/com/diamondfire/helpbot/bot/command/impl/other/fun/NbsCommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ public void run(CommandEvent event) {
6868
byte[] b64 = new NBSToTemplate(NBSDecoder.parse(file)).convert();
6969
File templateOutputfile = File.createTempFile("nbs_output", ".txt");
7070
BufferedWriter writer = new BufferedWriter(new FileWriter(templateOutputfile));
71-
writer.write(String.format("/give @p minecraft:ender_chest{display:{Name:'[{\"text\":\"» \",\"color\":\"gold\"},{\"text\":\"Code Template\",\"color\":\"yellow\",\"bold\":true}]'},PublicBukkitValues:{\"hypercube:codetemplatedata\":'{\"name\":\"&6» &e&lCode Template\",\"version\":1,\"code\":\"%s\",\"author\":\"helpbot\"}'}} 1", new String(b64)));
71+
writer.write(String.format("/give @p minecraft:ender_chest[minecraft:item_name=[{text:\"» \",color:gold},{text:\"Code Template\",color:yellow,bold:1}],custom_data={PublicBukkitValues:{\"hypercube:codetemplatedata\":'{\"name\":\"&6» &e&lCode Template\",\"version\":1,\"code\":\"%s\",\"author\":\"Help Bot\"}'}}]", new String(b64)));
7272

7373
writer.close();
74-
7574

7675
EmbedBuilder embed = new EmbedBuilder()
7776
.setColor(new Color(70,199,82))

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)