13
0
geforkt von Mirrors/Paper

SPIGOT-7947: addPassenger doesn't work if the vehicle is a player

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-11-06 20:27:44 +11:00
Ursprung 30af9c34dd
Commit 0df40ed8d9

Datei anzeigen

@ -620,6 +620,15 @@
leashable.setLeashedTo(entityhuman, true); leashable.setLeashedTo(entityhuman, true);
} }
@@ -2243,7 +2596,7 @@
return false;
} else if (!entity.couldAcceptPassenger()) {
return false;
- } else if (!this.level().isClientSide() && !entity.type.canSerialize()) {
+ } else if (!flag && !this.level().isClientSide() && !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities
return false;
} else {
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
@@ -2255,6 +2608,27 @@ @@ -2255,6 +2608,27 @@
if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) { if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
return false; return false;