Add PlayerSetSpawnEvent

This commit is contained in:
Jake Potrebic
2021-05-19 18:59:10 -07:00
parent 2e42192ea2
commit 0e4e270396
5 changed files with 122 additions and 77 deletions

View File

@@ -730,7 +730,7 @@
+ // CraftBukkit end
if (teleporttransition.missingRespawnBlock()) {
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
+ entityplayer1.setRespawnPosition(null, null, 0f, false, false, PlayerSpawnChangeEvent.Cause.RESET); // CraftBukkit - SPIGOT-5988: Clear respawn location when obstructed
+ entityplayer1.setRespawnPosition(null, null, 0f, false, false, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.PLAYER_RESPAWN); // CraftBukkit - SPIGOT-5988: Clear respawn location when obstructed // Paper - PlayerSetSpawnEvent
}
- int i = alive ? 1 : 0;