Fix compile error caused by adventure changes

This commit is contained in:
Andrew Steinborn 2020-07-16 11:50:48 -04:00
parent 72ce5c86ba
commit 2296a9d8dd
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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