From ea2f603cf7b3475d9d9942e56d2962a2a2523a45 Mon Sep 17 00:00:00 2001 From: Matsv Date: Tue, 4 Jul 2017 21:12:09 +0200 Subject: [PATCH] Possibility to hide warning using suppressMetadataErrors fixes #14 --- .../nl/matsv/viabackwards/api/rewriters/EntityRewriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/EntityRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/EntityRewriter.java index 6a314ac9..c846e0ab 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/EntityRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/EntityRewriter.java @@ -101,7 +101,8 @@ public abstract class EntityRewriter extends Rewrit protected MetaStorage handleMeta(UserConnection user, int entityId, MetaStorage storage) throws Exception { Optional optEntity = getEntityTracker(user).getEntity(entityId); if (!optEntity.isPresent()) { - ViaBackwards.getPlatform().getLogger().warning("Metadata for entity id: " + entityId + " not sent because the entity doesn't exist. " + storage); + if (!Via.getConfig().isSuppressMetadataErrors()) + ViaBackwards.getPlatform().getLogger().warning("Metadata for entity id: " + entityId + " not sent because the entity doesn't exist. " + storage); throw new CancelException(); }