mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 19:22:50 +01:00
6d41af029c
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3e2858f6 SPIGOT-4352: MoistureChangeEvent 5466e281 Add BlockDispenseArmorEvent CraftBukkit Changes:3123a069
SPIGOT-4352: MoistureChangeEvent226db0ea
Add BlockDispenseArmorEventcd367fa4
Fix bad thread safety in ChunkRegionLoader3f5ca5f2
SPIGOT-4355: Improve cancelling VehicleEnterEvent Spigot Changes: 145a37ae Rebuild patches 3f2423cc Rebuild patches
21 lines
936 B
Diff
21 lines
936 B
Diff
From 94def123ad430b43c241982b2aa937372df72db3 Mon Sep 17 00:00:00 2001
|
|
From: Alfie Cleveland <alfeh@me.com>
|
|
Date: Sun, 8 Jan 2017 04:31:36 +0000
|
|
Subject: [PATCH] Don't allow entities to ride themselves - #572
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 653bc6cd69..f3422a097b 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2073,6 +2073,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
|
|
protected boolean o(Entity entity) { // CraftBukkit
|
|
+ if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572
|
|
if (entity.getVehicle() != this) {
|
|
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
|
} else {
|
|
--
|
|
2.18.0
|
|
|