13
0
geforkt von Mirrors/Velocity

Fix compile error caused by adventure changes

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-16 11:50:48 -04:00
Ursprung 72ce5c86ba
Commit 2296a9d8dd
3 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -108,7 +108,7 @@ public interface ResultedEvent<R extends ResultedEvent.Result> {
return "allowed"; return "allowed";
} }
if (reason != null) { if (reason != null) {
return "denied: " + PlainComponentSerializer.INSTANCE.serialize(reason); return "denied: " + PlainComponentSerializer.plain().serialize(reason);
} }
return "denied"; return "denied";
} }

Datei anzeigen

@ -72,7 +72,7 @@ public class GS4QueryHandler extends SimpleChannelInboundHandler<DatagramPacket>
private QueryResponse createInitialResponse() { private QueryResponse createInitialResponse() {
return QueryResponse.builder() return QueryResponse.builder()
.hostname(PlainComponentSerializer.INSTANCE.serialize(server.getConfiguration().getMotd())) .hostname(PlainComponentSerializer.plain().serialize(server.getConfiguration().getMotd()))
.gameVersion(ProtocolVersion.SUPPORTED_VERSION_STRING) .gameVersion(ProtocolVersion.SUPPORTED_VERSION_STRING)
.map(server.getConfiguration().getQueryMap()) .map(server.getConfiguration().getQueryMap())
.currentPlayers(server.getPlayerCount()) .currentPlayers(server.getPlayerCount())

Datei anzeigen

@ -12,7 +12,8 @@ public class LegacyDisconnect {
private static final ServerPing.Players FAKE_PLAYERS = new ServerPing.Players(0, 0, private static final ServerPing.Players FAKE_PLAYERS = new ServerPing.Players(0, 0,
ImmutableList.of()); ImmutableList.of());
private static final String LEGACY_COLOR_CODE = "\u00a7"; private static final String LEGACY_COLOR_CODE = Character
.toString(LegacyComponentSerializer.SECTION_CHAR);
private final String reason; private final String reason;
@ -36,7 +37,7 @@ public class LegacyDisconnect {
// remove all section symbols, along with fetching just the first line of an (unformatted) // remove all section symbols, along with fetching just the first line of an (unformatted)
// MOTD. // MOTD.
return new LegacyDisconnect(String.join(LEGACY_COLOR_CODE, return new LegacyDisconnect(String.join(LEGACY_COLOR_CODE,
cleanSectionSymbol(getFirstLine(PlainComponentSerializer.INSTANCE.serialize( cleanSectionSymbol(getFirstLine(PlainComponentSerializer.plain().serialize(
response.getDescriptionComponent()))), response.getDescriptionComponent()))),
Integer.toString(players.getOnline()), Integer.toString(players.getOnline()),
Integer.toString(players.getMax()))); Integer.toString(players.getMax())));