mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-02 09:09:55 +01:00
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
This commit is contained in:
parent
6ab2e2f0b2
commit
46577b4396
@ -33,16 +33,13 @@ public class EntityPositionHandler {
|
|||||||
int entityId = wrapper.get(Type.VAR_INT, 0);
|
int entityId = wrapper.get(Type.VAR_INT, 0);
|
||||||
EntityTracker.StoredEntity storedEntity = entityRewriter.getEntityTracker(wrapper.user()).getEntity(entityId);
|
EntityTracker.StoredEntity storedEntity = entityRewriter.getEntityTracker(wrapper.user()).getEntity(entityId);
|
||||||
if (storedEntity == null) {
|
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());
|
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) {
|
if (entityId == -1 && x == 0 && y == 0 && z == 0) {
|
||||||
ViaBackwards.getPlatform().getLogger().warning("DO NOT REPORT THIS TO VIA, THIS IS A PLUGIN ISSUE - "
|
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\"");
|
|
||||||
} else if (!warnedForMissingEntity) {
|
} else if (!warnedForMissingEntity) {
|
||||||
warnedForMissingEntity = true;
|
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("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;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user