Provide ComponentSerializer services (#7527)

This commit is contained in:
Jake Potrebic 2022-05-26 12:12:14 -07:00 committed by GitHub
parent 182a609b85
commit b6a6544ad1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 505 additions and 311 deletions

View file

@ -100,12 +100,12 @@ index 50797b32b71b2c8a73f34313021457b27fc90660..7ad1b8b836d692b1168609e96e4eb72e
public void disconnect(String s) {
// Paper start
- this.disconnect(PaperAdventure.LEGACY_SECTION_UXRC.deserialize(s));
+ this.disconnect(PaperAdventure.LEGACY_SECTION_UXRC.deserialize(s), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
- this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s));
+ this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
+ }
+
+ public void disconnect(String s, PlayerKickEvent.Cause cause) {
+ this.disconnect(PaperAdventure.LEGACY_SECTION_UXRC.deserialize(s), cause);
+ this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), cause);
}
public void disconnect(final Component reason) {