修复了玩家离线时如果坐在椅子上下次上线可能会被卡在方块里的问题
All checks were successful
Java CI-CD with Maven / build (push) Successful in 4m16s

This commit is contained in:
zhangyuheng 2024-04-22 09:26:53 +08:00
parent 87dd2983f2
commit 75dbefb02a
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>EssentialsD</artifactId>
<version>1.17.1</version>
<version>1.17.2</version>
<packaging>jar</packaging>
<name>EssentialsD</name>

View File

@ -122,8 +122,10 @@ public class ChairEvent implements Listener {
}
Entity vehicle = event.getPlayer().getVehicle();
// Let players stand up when leaving the server.
if (vehicle instanceof ArmorStand)
if (vehicle instanceof ArmorStand) {
vehicle.remove();
event.getPlayer().teleportAsync(event.getPlayer().getLocation().add(0, EssentialsD.config.getChairSitHeight() * -1, 0));
}
}
private ArmorStand dropSeat(Block chair) {