chore: cleanup annotations in api adventure patch

This commit is contained in:
Riley Park
2023-03-23 09:49:24 -07:00
parent c4351787c6
commit 39255145b6
64 changed files with 1308 additions and 1246 deletions

View File

@@ -2322,13 +2322,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- @Deprecated
- public void disconnect(Component reason) {
- this.disconnect(CraftChatMessage.fromComponent(reason));
+ public void disconnect(String s) {
- }
- // CraftBukkit end
-
public void disconnect(String s) {
+ // Paper start
+ this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s));
}
- // CraftBukkit end
- public void disconnect(String s) {
+ }
+
+ public void disconnect(final Component reason) {
+ this.disconnect(PaperAdventure.asAdventure(reason));
+ }
@@ -2809,13 +2810,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start
+ @Override
@Override
+ public net.kyori.adventure.text.Component shutdownMessage() {
+ String msg = getShutdownMessage();
+ return msg != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(msg) : null;
+ }
+ // Paper end
@Override
+ @Override
+ @Deprecated // Paper
public String getShutdownMessage() {
return this.configuration.getString("settings.shutdown-message");
@@ -2892,12 +2893,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start
+ @Override
@Override
+ public Merchant createMerchant(net.kyori.adventure.text.Component title) {
+ return new org.bukkit.craftbukkit.inventory.CraftMerchantCustom(title == null ? InventoryType.MERCHANT.defaultTitle() : title);
+ }
+ // Paper end
@Override
+ @Override
+ @Deprecated // Paper
public Merchant createMerchant(String title) {
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);