Allow getAsString()-ing non-persistent entities (#12424)

This commit is contained in:
Illia Bondar
2025-04-14 10:00:24 +03:00
committed by GitHub
parent 8f62e0fb31
commit 652cea57e8

View File

@@ -948,7 +948,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override
public String getAsString() {
CompoundTag tag = new CompoundTag();
if (!this.getHandle().saveAsPassenger(tag, false, false, false)) {
if (!this.getHandle().saveAsPassenger(tag, false, true, true)) {
return null;
}