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()
|
||||
return
|
||||
}
|
||||
if (entity !is LocalPlayerEntity) {
|
||||
entities -= entity
|
||||
if (entity is LocalPlayerEntity) {
|
||||
idEntityMap.put(entityId, entity)
|
||||
lock.unlock()
|
||||
return
|
||||
|
||||
}
|
||||
entityIdMap.removeInt(entity)
|
||||
val uuid = entityUUIDMap.remove(entity)
|
||||
|
@ -50,6 +50,6 @@ class EntityDestroyS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||
if (reducedLog) {
|
||||
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