Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fix compile error caused by adventure changes
Dieser Commit ist enthalten in:
Ursprung
72ce5c86ba
Commit
2296a9d8dd
@ -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";
|
||||
}
|
||||
|
@ -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())
|
||||
|
@ -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())));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren