From 46577b4396366ae6b8d220a944fda92c8597437f Mon Sep 17 00:00:00 2001 From: KennyTV Date: Sat, 11 Apr 2020 18:57:56 +0200 Subject: [PATCH] Only send missing entity warning when debug is enabled Too prominent plugins fail at respecting the tracking range of the player for packet entities, and people have shown not to be able to find the first appearance of the warning with its explanation --- .../api/entities/storage/EntityPositionHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/entities/storage/EntityPositionHandler.java b/core/src/main/java/nl/matsv/viabackwards/api/entities/storage/EntityPositionHandler.java index c5b66c3c..fd900533 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/entities/storage/EntityPositionHandler.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/entities/storage/EntityPositionHandler.java @@ -33,16 +33,13 @@ public class EntityPositionHandler { int entityId = wrapper.get(Type.VAR_INT, 0); EntityTracker.StoredEntity storedEntity = entityRewriter.getEntityTracker(wrapper.user()).getEntity(entityId); if (storedEntity == null) { - if (!Via.getConfig().isSuppressMetadataErrors()) { + if (Via.getManager().isDebug()) { // There is too many plugins violating this out there, and reading seems to be hard! :> ViaBackwards.getPlatform().getLogger().warning("Stored entity with id " + entityId + " missing at position: " + x + " - " + y + " - " + z + " in " + storageClass.getSimpleName()); - // Reports were getting too much :> if (entityId == -1 && x == 0 && y == 0 && z == 0) { - ViaBackwards.getPlatform().getLogger().warning("DO NOT REPORT THIS TO VIA, THIS IS A PLUGIN ISSUE - " - + "You can disable this warning in the ViaVersion config under \"suppress-metadata-errors\""); + ViaBackwards.getPlatform().getLogger().warning("DO NOT REPORT THIS TO VIA, THIS IS A PLUGIN ISSUE"); } else if (!warnedForMissingEntity) { warnedForMissingEntity = true; ViaBackwards.getPlatform().getLogger().warning("This is very likely caused by a plugin sending a teleport packet for an entity outside of the player's range."); - ViaBackwards.getPlatform().getLogger().warning("You can disable this warning in the ViaVersion config under \"suppress-metadata-errors\""); } } return;