diff options
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r-- | patches/server/0010-Adventure.patch | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 9d84d97b3c..fff8643fbd 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2699,7 +2699,7 @@ index 9eb987f9d86396d6b7e9d4f3834bea3326640ac7..25d6be308be03815301cfbefdc4199c8 public boolean logIPs() { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d02e958d74fe4bb97ce36ca04a36bcf7e73de016..dc92e1cd0a10ec4e6b4ad6145d5fc0a4ef199365 100644 +index 684dfbcdd4d000ac918c0f77a60c9abf9b30d3a4..200993e8c482442a2c7ae4d9551d04708178bb24 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -171,6 +171,7 @@ import net.minecraft.world.item.trading.MerchantOffers; @@ -2974,7 +2974,7 @@ index 8e715261b99bcc19b6f4b9787987c59aa19ba70e..851e4bdf1739736fd193786a6541ffb3 } } diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java -index 2c555c5ad05992b19f67b883c3c0ec7018180747..71540687b4212702cdaaad5fd4815fb3eb97ddd6 100644 +index 3848cc836785829c5aa82bdb5d37d36a97f94a04..f08700abb005f487aca95c0457c09cefa9a81be2 100644 --- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java @@ -58,7 +58,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene @@ -3627,7 +3627,7 @@ index a59eebb89d11788b999d1e5cb4fd2f4e55e023ab..1e8d93d81b7a391bbd1e9926ff35a68d // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 9ec50bbb262b25fea157ae48e8395f5cd38f8906..985b77911d03bc60a0210b796e901f31e2676268 100644 +index 7e3c4c8a4d87e0c616a9fb98f09d89c93597bb23..0736cf0b5ea327e73a457b55c9c0c4bb82d4c6e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,12 @@ public class Main { @@ -4015,10 +4015,10 @@ index 1e82312c24cb752d63b165926861fc178cd7849b..7f22950ae61436e91a59cd29a345809c + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index ed6944418382dbd02e5ddbf50c6ac4bb26415807..97a7dc31fe7a2defed2202ccc518c66b7ff4b0da 100644 +index 2d0c82ca240e371a756d71f28e2e04d1aa8e6ad2..f73017bff613bd62b86c974b29576e241c24c927 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -166,6 +166,12 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine +@@ -145,6 +145,12 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine CraftEnchantment ench = (CraftEnchantment) other; return !net.minecraft.world.item.enchantment.Enchantment.areCompatible(this.handle, ench.handle); } @@ -4095,7 +4095,7 @@ index d09102fe44dffa61dff883488f47715effaa8211..269326e7689eba91bcfd3475006e8cbf @Override public boolean isPermissionSet(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 8ba24b389a16a7f4ec4dcac87f2acfd560d65c34..1010ac55d91559bcb6ebadeea447f32c6aa89226 100644 +index 59107e11f29e2c6dd213966b3000c79eabdbd39b..0c94a1094a3af0232bb2957708fa997933db621b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -321,9 +321,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -4113,7 +4113,7 @@ index 8ba24b389a16a7f4ec4dcac87f2acfd560d65c34..1010ac55d91559bcb6ebadeea447f32c player.containerMenu = container; player.initMenu(container); } -@@ -392,8 +395,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -393,8 +396,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); @@ -4147,7 +4147,7 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917 public boolean isOp() { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf114b939bec 100644 +index 45108559bb2e4ae9d33aed5d92b72cbe5c17f553..859f3eb2d616156b0efaa70ee03e357e6f0760f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -388,14 +388,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -4252,7 +4252,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 } @@ -481,6 +508,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message)); + this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message, true)); } + // Paper start @@ -4313,7 +4313,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState()); SignText text = sign.getFrontText(); text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData())); -@@ -1815,7 +1883,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1816,7 +1884,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url) { @@ -4322,7 +4322,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 } @Override -@@ -1830,7 +1898,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1831,7 +1899,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url, byte[] hash, boolean force) { @@ -4331,7 +4331,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 } @Override -@@ -1867,6 +1935,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1868,6 +1936,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.handlePushResourcePack(new ClientboundResourcePackPushPacket(id, url, hashStr, force, CraftChatMessage.fromStringOrOptional(prompt, true)), false); } @@ -4391,7 +4391,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 @Override public void removeResourcePack(UUID id) { Preconditions.checkArgument(id != null, "Resource pack id cannot be null"); -@@ -2287,6 +2408,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2288,6 +2409,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance(); } @@ -4404,7 +4404,7 @@ index c025542b1073ce7e6e30a43744276fd1fa1ca484..03c70d45941822239a0894f910cbaf11 @Override public int getPing() { return this.getHandle().connection.latency(); -@@ -2337,6 +2464,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2338,6 +2465,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().allowsListing(); } @@ -4676,10 +4676,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364 @Override public int getLineWidth() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 889af27e3fe5ce98b68b3177639c338ca287b024..a29dfbe7aa06113358a2078d927fc53662a5f91f 100644 +index ae357fc3cabd9235488665ef74a3f7c703d64980..3595ff3db5eb0b1da100692702e514cb870220ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -907,7 +907,7 @@ public class CraftEventFactory { +@@ -908,7 +908,7 @@ public class CraftEventFactory { return event; } @@ -4886,7 +4886,7 @@ index 9e05a8515c5f6f340182e91150fcad8bbf80a22b..adf22ce4f0bcd3bd57dc2030c6c92d3d @Override public CraftMerchant getCraftMerchant() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 61ad00c38cfef8a1de61b4597ec1042428feccf4..4da38ebb7fdbdb0f8fa422ebcd2e3eec2b2be846 100644 +index 3ab6b212001c2b92cac42c0ff97e59c3d08b3e49..552ebe67f87b48734adf0da8ef78dcac9dd670a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -2,8 +2,9 @@ package org.bukkit.craftbukkit.inventory; @@ -5041,24 +5041,15 @@ index 61ad00c38cfef8a1de61b4597ec1042428feccf4..4da38ebb7fdbdb0f8fa422ebcd2e3eec if (this.pages != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -index 2e6f0a0f4bbe4ae3c7c85e679f6187e89d1298ff..c7360e2b2d6e50abc371c21b09cdadd63892f439 100644 +index c71a4971f127fdfc753306019313ce1a31201120..162997fc80dfe2df1f13c802c1b610f04cb9d05a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; - - import com.google.common.base.Preconditions; - import com.google.common.collect.ImmutableList; --import com.google.common.collect.ImmutableMap.Builder; -+import com.google.common.collect.ImmutableMap; // Paper - import java.util.ArrayList; - import java.util.Arrays; - import java.util.List; @@ -346,7 +346,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta { } @Override - Builder<String, Object> serialize(Builder<String, Object> builder) { -+ ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) { ++ com.google.common.collect.ImmutableMap.Builder<String, Object> serialize(com.google.common.collect.ImmutableMap.Builder<String, Object> builder) { // Paper - adventure - fqn as it conflicts with adventure book builder super.serialize(builder); if (this.hasTitle()) { @@ -5177,7 +5168,7 @@ index 2e6f0a0f4bbe4ae3c7c85e679f6187e89d1298ff..c7360e2b2d6e50abc371c21b09cdadd6 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 607456854e6bce3f7b58469af4ce42b8bacb72fc..9ecbdd50aa2eb7851ce1716946fa31e5db8765b4 100644 +index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -952,6 +952,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -5589,10 +5580,10 @@ index 4d586e1375ed8782939c9d480479e0dd981f8cbc..7900adb0b158bc17dd792dd082c33854 + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index 28038c3a531680201dcc8f2716b8f46f3886e769..5a9ddf71dc186c537a23083ac59434fb446a2140 100644 +index ff040613083c015d9c52c0995591b64305fd5018..1b552b3f05ac7fc44450de4b1ec78907a0f62424 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -@@ -308,6 +308,7 @@ public final class CraftChatMessage { +@@ -264,6 +264,7 @@ public final class CraftChatMessage { public static String fromComponent(Component component) { if (component == null) return ""; @@ -5601,10 +5592,10 @@ index 28038c3a531680201dcc8f2716b8f46f3886e769..5a9ddf71dc186c537a23083ac59434fb boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 2fc68d129e2fdfd51e310ea5bdfb83322666c87b..fb22e04a4a9f039f0e942ff837124b00ca1b12be 100644 +index 65b92a787b131984ad3e48d8dd6812e1b433c77f..1bf1f10f8691922a69cd13c6a4e643b863801b4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -81,6 +81,43 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues { private CraftMagicNumbers() {} |