From c762d416c546a91822d3e99848be6e24e431aad0 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 11 Jan 2021 13:23:11 -0800 Subject: [PATCH] Fix villager boat exploit (#5047) --- .../Fix-villager-boat-exploit.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-villager-boat-exploit.patch diff --git a/Spigot-Server-Patches/Fix-villager-boat-exploit.patch b/Spigot-Server-Patches/Fix-villager-boat-exploit.patch new file mode 100644 index 0000000000..b6a39f48d0 --- /dev/null +++ b/Spigot-Server-Patches/Fix-villager-boat-exploit.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> +Date: Mon, 11 Jan 2021 12:43:51 -0800 +Subject: [PATCH] Fix villager boat exploit + + +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -0,0 +0,0 @@ public abstract class PlayerList { + + for (Iterator iterator = entity.getAllPassengers().iterator(); iterator.hasNext(); entity1.dead = true) { + entity1 = (Entity) iterator.next(); ++ // Paper start ++ if (entity1 instanceof EntityVillagerAbstract) { ++ final EntityVillagerAbstract villager = (EntityVillagerAbstract) entity1; ++ final EntityHuman human = villager.getTrader(); ++ if (human != null) { ++ villager.setTradingPlayer(null); ++ } ++ } ++ // Paper end + worldserver.removeEntity(entity1); + } +