Class PlayerSetSpawnEvent


  • public class PlayerSetSpawnEvent
    extends PlayerEvent
    This event is fired when a player's spawn point is set or reset.
    The event can be canceled, which will prevent the spawn point from being changed.
    • Field Detail

      • forced

        private final boolean forced
      • newSpawn

        @Nullable
        private final BlockPos newSpawn
    • Method Detail

      • isForced

        public boolean isForced()
      • getNewSpawn

        @Nullable
        public BlockPos getNewSpawn()
        The new spawn position, or null if the spawn position is being reset.