mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-28 18:54:48 +01:00
Fix villager boat exploit (#5047)
This commit is contained in:
parent
630fa37394
commit
c762d416c5
1 changed files with 26 additions and 0 deletions
26
Spigot-Server-Patches/Fix-villager-boat-exploit.patch
Normal file
26
Spigot-Server-Patches/Fix-villager-boat-exploit.patch
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue