From 97bc12d44ff7d900c0db0fffe8b8937dd517125a Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Sun, 17 Sep 2023 09:14:05 +0800 Subject: [PATCH] Add missing respawn method (#1095) --- .../common/mixin/core/server/management/PlayerListMixin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/server/management/PlayerListMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/server/management/PlayerListMixin.java index 461befe2..08e46181 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/server/management/PlayerListMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/server/management/PlayerListMixin.java @@ -253,6 +253,10 @@ public abstract class PlayerListMixin implements PlayerListBridge { return entity; } + public ServerPlayer respawn(ServerPlayer entityplayer, boolean flag, PlayerRespawnEvent.RespawnReason reason) { + return this.respawn(entityplayer, this.server.getLevel(entityplayer.getRespawnDimension()), flag, null, true, reason); + } + public ServerPlayer respawn(ServerPlayer playerIn, ServerLevel worldIn, boolean flag, Location location, boolean avoidSuffocation, PlayerRespawnEvent.RespawnReason respawnReason) { playerIn.stopRiding(); this.players.remove(playerIn);