mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-11 08:27:29 -04:00
forbid removing local player entity by id
This commit is contained in:
parent
ba1affae6b
commit
d83dac4f93
@ -112,8 +112,11 @@ class WorldEntities : Iterable<Entity> {
|
|||||||
lock.unlock()
|
lock.unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (entity !is LocalPlayerEntity) {
|
if (entity is LocalPlayerEntity) {
|
||||||
entities -= entity
|
idEntityMap.put(entityId, entity)
|
||||||
|
lock.unlock()
|
||||||
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
entityIdMap.removeInt(entity)
|
entityIdMap.removeInt(entity)
|
||||||
val uuid = entityUUIDMap.remove(entity)
|
val uuid = entityUUIDMap.remove(entity)
|
||||||
|
@ -50,6 +50,6 @@ class EntityDestroyS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
|||||||
if (reducedLog) {
|
if (reducedLog) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Log.log(LogMessageType.NETWORK_IN, level = LogLevels.VERBOSE) { "Entity destroy (entityIds=$entityIds)" }
|
Log.log(LogMessageType.NETWORK_IN, level = LogLevels.VERBOSE) { "Entity destroy (entityIds=${entityIds.contentToString()})" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user