Mitigate logger spam introduced in 256d7c4e5d

Touches #1122, #1166
This commit is contained in:
NotMyFault 2021-07-04 00:43:57 +02:00
parent 4f4f3ea0aa
commit 35b1202951
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 7 additions and 1 deletions

View File

@ -79,6 +79,9 @@ public class Settings extends Config {
"Only disables/enables the hook with v4. For v6, see PlotSquared settings.yml"
})
public boolean PLOTSQUARED_v4_HOOK = true;
@Comment({"Show additional information in console. It helps us at IntellectualSites to find out more about an issue.",
"Leave it off if you don't need it, it can spam your console."})
public boolean DEBUG = false;
}
@Comment("Paths for various directories")

View File

@ -19,6 +19,7 @@
package com.sk89q.worldedit.extent.transform;
import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.object.extent.ResettableExtent;
import com.google.common.collect.ImmutableMap;
import com.sk89q.jnbt.ByteTag;
@ -402,7 +403,9 @@ public class BlockTransformExtent extends ResettableExtent {
if (directions != null) {
int oldIndex = property.getIndex(newMaskedId);
if (oldIndex >= directions.length) {
LOGGER.warn(String.format("Index outside direction array length found for block:{%s} property:{%s}", state.getBlockType().getId(), property.getName()));
if (Settings.IMP.ENABLED_COMPONENTS.DEBUG) {
LOGGER.warn(String.format("Index outside direction array length found for block:{%s} property:{%s}", state.getBlockType().getId(), property.getName()));
}
continue;
}
Integer newIndex = getNewStateIndex(transform, directions, oldIndex);