Why doesn't it error?

This commit is contained in:
destro174 2022-02-24 17:16:32 +01:00
parent e571ea446f
commit 5834ff2c97
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,9 @@ plugins {
}
dependencies {
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT")
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT") {
exclude("net.kyori.adventure.text.minimessag")
}
compileOnly("net.kyori", "adventure-text-minimessage", "4.10.0-20220122.015731-43") { // Minimessage
exclude("net.kyori")
exclude("net.kyori.examination")

View File

@ -21,7 +21,7 @@ import java.util.Optional;
public class Report {
private static final MiniMessage miniMessage = MiniMessage.get();
// private static final MiniMessage miniMessage = MiniMessage.get();
public Report(ProxyServer proxyServer) {
LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder
@ -31,7 +31,7 @@ public class Report {
.<CommandSource, String>argument("report", StringArgumentType.greedyString())
.executes(context -> {
if (!(context.getSource() instanceof Player player)) {
context.getSource().sendMessage(miniMessage.deserialize(Config.NO_CONSOLE));
context.getSource().sendMessage(Utility.parseMiniMessage(Config.NO_CONSOLE));
return 1;
}
Optional<ServerConnection> optionalServerConnection = player.getCurrentServer();