From b5b9b2c876ad64aa96cb7517b8b83067f8f4bb9c Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Sun, 28 Feb 2021 13:21:35 +0100 Subject: [PATCH] Remove non-null check for world of Player entity --- .../src/main/kotlin/space/uranos/entity/UranosEntity.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt b/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt index 79b9acd..0eb2acd 100644 --- a/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt +++ b/uranos-server/src/main/kotlin/space/uranos/entity/UranosEntity.kt @@ -34,9 +34,6 @@ sealed class UranosEntity(server: UranosServer) : Entity { final override var world: World? = null; private set override suspend fun setWorld(world: World?) { - if (world == null && this is PlayerEntity) - throw IllegalArgumentException("You cannot set the world of a PlayerEntity to null") - if (world == this.world) return worldMutex.withLock {