3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 19:02:36 +01:00

Mitigate logger spam introduced in 256d7c4e5d

Touches #1122, #1166
Dieser Commit ist enthalten in:
NotMyFault 2021-07-04 00:43:57 +02:00
Ursprung 4f4f3ea0aa
Commit 35b1202951
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -79,6 +79,9 @@ public class Settings extends Config {
"Only disables/enables the hook with v4. For v6, see PlotSquared settings.yml" "Only disables/enables the hook with v4. For v6, see PlotSquared settings.yml"
}) })
public boolean PLOTSQUARED_v4_HOOK = true; 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") @Comment("Paths for various directories")

Datei anzeigen

@ -19,6 +19,7 @@
package com.sk89q.worldedit.extent.transform; package com.sk89q.worldedit.extent.transform;
import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.object.extent.ResettableExtent; import com.fastasyncworldedit.core.object.extent.ResettableExtent;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.sk89q.jnbt.ByteTag; import com.sk89q.jnbt.ByteTag;
@ -402,7 +403,9 @@ public class BlockTransformExtent extends ResettableExtent {
if (directions != null) { if (directions != null) {
int oldIndex = property.getIndex(newMaskedId); int oldIndex = property.getIndex(newMaskedId);
if (oldIndex >= directions.length) { 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; continue;
} }
Integer newIndex = getNewStateIndex(transform, directions, oldIndex); Integer newIndex = getNewStateIndex(transform, directions, oldIndex);