mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Do not log throwable for duplicate entity adds
This commit is contained in:
parent
f044bd9e6c
commit
3acabf7aa9
1 changed files with 2 additions and 2 deletions
|
@ -2805,11 +2805,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.entityByLock.writeLock();
|
||||
+ try {
|
||||
+ if (this.entityById.containsKey(entity.getId())) {
|
||||
+ LOGGER.warn("Entity id already exists: " + entity.getId() + ", mapped to " + this.entityById.get(entity.getId()) + ", can't add " + entity, new Throwable());
|
||||
+ LOGGER.warn("Entity id already exists: " + entity.getId() + ", mapped to " + this.entityById.get(entity.getId()) + ", can't add " + entity);
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (this.entityByUUID.containsKey(entity.getUUID())) {
|
||||
+ LOGGER.warn("Entity uuid already exists: " + entity.getUUID() + ", mapped to " + this.entityByUUID.get(entity.getUUID()) + ", can't add " + entity, new Throwable());
|
||||
+ LOGGER.warn("Entity uuid already exists: " + entity.getUUID() + ", mapped to " + this.entityByUUID.get(entity.getUUID()) + ", can't add " + entity);
|
||||
+ return false;
|
||||
+ }
|
||||
+ this.entityById.put(entity.getId(), entity);
|
||||
|
|
Loading…
Reference in a new issue