Archived
1
0
Fork 0

Remove non-null check for world of Player entity

This commit is contained in:
Moritz Ruth 2021-02-28 13:21:35 +01:00
parent 8bfe0141bf
commit b5b9b2c876
No known key found for this signature in database
GPG key ID: AFD57E23E753841B

View file

@ -34,9 +34,6 @@ sealed class UranosEntity(server: UranosServer) : Entity {
final override var world: World? = null; private set final override var world: World? = null; private set
override suspend fun setWorld(world: World?) { 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 if (world == this.world) return
worldMutex.withLock { worldMutex.withLock {