Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Commit 30ebd61

Browse files
authored
Merge pull request #14 from Titaniumtown/patch-1
nms repack & remove some commands
2 parents 049c836 + 7600449 commit 30ebd61

10 files changed

+9
-109
lines changed

config.json

-3
This file was deleted.

src/main/java/org/yatopiamc/bot/YatopiaBot.java

-4
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,10 @@ public void start() throws LoginException, InterruptedException, IOException {
133133
new CommandJDKSpecific(),
134134
new CommandDownloadSpecific(),
135135
new CommandYatopiaSpecific(),
136-
new CommandVanilla(),
137-
new CommandUpstream(),
138136
new CommandMappingSpecific(this),
139137
new CommandPing(),
140138
new CommandShutdown("252049584598024192"),
141-
new CommandShitspiller(),
142139
new CommandVroomVroom(),
143-
new CommandTias(),
144140
new CommandGiveRole());
145141

146142
executor.scheduleAtFixedRate(

src/main/java/org/yatopiamc/bot/commands/CommandDownloadSpecific.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@CommandAliases("download|1.15.2|1.16.1|1.16.2|1.16.3|1.16.4|1.16.5")
1414
@CommandDescription("Download specific commands.")
15-
@CommandUsage("download|?1.15.2|?1.16.1|?1.16.2|?1.16.3|?1.16.4|?1.16.5")
15+
@CommandUsage("?download|?1.15.2|?1.16.1|?1.16.2|?1.16.3|?1.16.4|?1.16.5")
1616
public class CommandDownloadSpecific extends Command {
1717

1818
@Override
@@ -22,12 +22,8 @@ public boolean execute(@NotNull CommandExecutionContext context, @NotNull Comman
2222
switch (alias) {
2323
case "download":
2424
channel
25-
.sendMessage(
26-
EmbedUtil.withAuthor(context.getAuthor())
27-
.setDescription(
28-
"Run `?1.15.2` or `?1.16.1` or `?1.16.2` or `?1.16.3` or `?1.16.4` or `?1.16.5`")
29-
.build())
30-
.queue();
25+
.sendMessage("<https://ci.codemc.io/job/YatopiaMC/job/Yatopia/job/ver%252F1.16.5/>")
26+
.queue();
3127
break;
3228
case "1.15.2":
3329
channel

src/main/java/org/yatopiamc/bot/commands/CommandShitspiller.java

-27
This file was deleted.

src/main/java/org/yatopiamc/bot/commands/CommandTias.java

-21
This file was deleted.

src/main/java/org/yatopiamc/bot/commands/CommandUpstream.java

-21
This file was deleted.

src/main/java/org/yatopiamc/bot/commands/CommandVanilla.java

-21
This file was deleted.

src/main/java/org/yatopiamc/bot/commands/CommandVroomVroom.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public boolean execute(@NotNull CommandExecutionContext context, @NotNull Comman
1818
context
1919
.getChannel()
2020
.sendMessage(
21-
"<:faster1:753671545670336558> <:faster2:753671545796427826> <:faster3:753671545615810671> achieved with <:yatopia:745656023871782993> made by <:tr7zw:753678069688172694> , <:duplex:801473415588216843> , and <:ishland:799701573970034719>")
21+
"<:faster1:753671545670336558> <:faster2:753671545796427826> <:faster3:753671545615810671> achieved with <:yatopia:745656023871782993> made by <:tr7zw:753678069688172694> , <:duplex:801473415588216843> , <:ishland:799701573970034719> , and <:jerry:834123977478635520>")
2222
.queue();
2323
return true;
2424
}

src/main/java/org/yatopiamc/bot/mappings/spigot/SpigotMappingParser.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static List<Mapping> parseClass(File classMappings, String mcVer, Mappin
3737
MappingType.CLASS,
3838
values[0],
3939
null,
40-
"net/minecraft/server/" + values[1],
40+
mcVer == "1.16.5" ? values[1] : "net/minecraft/server/" + values[1],
4141
mcVer,
4242
null,
4343
null));
@@ -62,8 +62,9 @@ private static List<Mapping> parseMember(
6262
}
6363
String description = values.length == 4 ? values[2] : null;
6464
Mapping parent = null;
65+
String mappingsPathPrefix = mcVer == "1.16.5" ? "" : "net/minecraft/server/";
6566
for (Mapping mapping : classMappings) {
66-
if (mapping.getName().equalsIgnoreCase("net/minecraft/server/" + owner)) {
67+
if (mapping.getName().equalsIgnoreCase(mappingsPathPrefix + owner)) {
6768
parent = mapping;
6869
break;
6970
}

src/main/java/org/yatopiamc/bot/mappings/spigot/SpigotMappingVersion.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public enum SpigotMappingVersion {
2121
),
2222
v1_16_5(
2323
"1.16.5",
24-
"https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/mappings/bukkit-1.16.5-cl.csrg?at=656df5e622bba97efb4e858e8cd3ec428a0b2d71",
25-
"https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/mappings/bukkit-1.16.5-members.csrg?at=656df5e622bba97efb4e858e8cd3ec428a0b2d71"
24+
"https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/mappings/bukkit-1.16.5-cl.csrg?at=80d35549ec67b87a0cdf0d897abbe826ba34ac27",
25+
"https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/raw/mappings/bukkit-1.16.5-members.csrg?at=80d35549ec67b87a0cdf0d897abbe826ba34ac27"
2626
);
2727
private final String mcVersion, classMappings, memberMappings;
2828

0 commit comments

Comments
 (0)