diff options
author | Nassim Jahnke <[email protected]> | 2024-12-05 11:18:29 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-05 12:20:56 +0100 |
commit | e4e24f3335609b38f460ced71d18babcf11bf9cb (patch) | |
tree | 51880d664b3444ce26d6f8cdeb3b8219e5616fca /patches/server/0461-Fix-villager-boat-exploit.patch | |
parent | c54c062e6ff742445bf7749c84106ca67090172d (diff) | |
download | Paper-e4e24f3335609b38f460ced71d18babcf11bf9cb.tar.gz Paper-e4e24f3335609b38f460ced71d18babcf11bf9cb.zip |
Move around patches again
Diffstat (limited to 'patches/server/0461-Fix-villager-boat-exploit.patch')
-rw-r--r-- | patches/server/0461-Fix-villager-boat-exploit.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/0461-Fix-villager-boat-exploit.patch b/patches/server/0461-Fix-villager-boat-exploit.patch new file mode 100644 index 0000000000..8a06e563da --- /dev/null +++ b/patches/server/0461-Fix-villager-boat-exploit.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <[email protected]> +Date: Mon, 11 Jan 2021 12:43:51 -0800 +Subject: [PATCH] Fix villager boat exploit + + +diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java +index e734798640cc016d54c56b7870a1a653353ff709..4a86a15b009412208247edd7bb8e4655f92da5d1 100644 +--- a/src/main/java/net/minecraft/server/players/PlayerList.java ++++ b/src/main/java/net/minecraft/server/players/PlayerList.java +@@ -544,6 +544,14 @@ public abstract class PlayerList { + PlayerList.LOGGER.debug("Removing player mount"); + entityplayer.stopRiding(); + entity.getPassengersAndSelf().forEach((entity1) -> { ++ // Paper start - Fix villager boat exploit ++ if (entity1 instanceof net.minecraft.world.entity.npc.AbstractVillager villager) { ++ final net.minecraft.world.entity.player.Player human = villager.getTradingPlayer(); ++ if (human != null) { ++ villager.setTradingPlayer(null); ++ } ++ } ++ // Paper end - Fix villager boat exploit + entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause + }); + } |