9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 20:39:10 +00:00

fix(furniture): 修复玩家坐家具失败导致的问题

This commit is contained in:
jhqwqmc
2025-06-17 09:13:10 +08:00
parent f3c8d9c8c5
commit 57eade904b

View File

@@ -347,7 +347,10 @@ public class BukkitFurniture implements Furniture {
itemDisplay.getPersistentDataContainer().set(BukkitFurnitureManager.FURNITURE_SEAT_VECTOR_3F_KEY, PersistentDataType.STRING, seat.offset().x + ", " + seat.offset().y + ", " + seat.offset().z);
});
this.seats.add(new WeakReference<>(seatEntity));
seatEntity.addPassenger(player);
if (!seatEntity.addPassenger(player)) {
seatEntity.remove();
this.removeOccupiedSeat(seat.offset());
}
}
private Location calculateSeatLocation(Seat seat) {