From f22b6138b9a22eb6fc13f49d46f34bf83ae6e849 Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Mon, 9 Dec 2019 12:21:24 +0100 Subject: [PATCH] use isSuppressConversionWarnings --- .../matsv/viabackwards/api/data/VBMappingDataLoader.java | 8 ++++---- .../protocol1_12_2to1_13/data/BackwardsMappings.java | 2 +- .../packets/BlockItemPackets1_13.java | 4 ++-- .../protocol1_12_2to1_13/packets/PlayerPacket1_13.java | 8 ++++---- .../protocol1_12_2to1_13/packets/SoundPackets1_13.java | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/data/VBMappingDataLoader.java b/core/src/main/java/nl/matsv/viabackwards/api/data/VBMappingDataLoader.java index c08bb741..e4022e2d 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/data/VBMappingDataLoader.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/data/VBMappingDataLoader.java @@ -46,7 +46,7 @@ public class VBMappingDataLoader { diffValue = diffIdentifiers.getAsJsonPrimitive(key.substring(0, key.indexOf('['))); } if (diffValue == null) { - if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("No diff key for " + entry.getValue() + " :( "); } continue; @@ -54,7 +54,7 @@ public class VBMappingDataLoader { value = MappingDataLoader.findValue(newIdentifiers, diffValue.getAsString()); } if (value == null) { - if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( "); } continue; @@ -75,7 +75,7 @@ public class VBMappingDataLoader { if (diffIdentifiers != null) { JsonPrimitive diffValue = diffIdentifiers.getAsJsonPrimitive(key); if (diffValue == null) { - if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("No diff key for " + key + " :( "); } continue; @@ -86,7 +86,7 @@ public class VBMappingDataLoader { index = MappingDataLoader.findIndex(newIdentifiers, mappedName); } if (index == null) { - if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("No key for " + key + " :( "); } continue; diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java index bb9b5b99..f6544550 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java @@ -69,7 +69,7 @@ public class BackwardsMappings { } } if (value == null) { - if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { if (replacement != null) { ViaBackwards.getPlatform().getLogger().warning("No key for " + entry.getValue() + "/" + replacement.getAsString() + " :( "); } else { diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java index 47158701..1b5abe5c 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java @@ -651,7 +651,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter { } else { String oldChannel = InventoryPackets.getOldPluginChannelId(channel); if (oldChannel == null) { - if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("Ignoring outgoing plugin message with channel: " + channel); } wrapper.cancel(); @@ -100,7 +100,7 @@ public class PlayerPacket1_13 extends Rewriter { String rewritten = InventoryPackets.getOldPluginChannelId(channels[i]); if (rewritten != null) { rewrittenChannels.add(rewritten); - } else if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + } else if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("Ignoring plugin channel in outgoing REGISTER: " + channels[i]); } } @@ -449,7 +449,7 @@ public class PlayerPacket1_13 extends Rewriter { } else { String newChannel = InventoryPackets.getNewPluginChannelId(channel); if (newChannel == null) { - if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("Ignoring incoming plugin message with channel: " + channel); } wrapper.cancel(); @@ -464,7 +464,7 @@ public class PlayerPacket1_13 extends Rewriter { String rewritten = InventoryPackets.getNewPluginChannelId(channels[i]); if (rewritten != null) { rewrittenChannels.add(rewritten); - } else if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) { + } else if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) { ViaBackwards.getPlatform().getLogger().warning("Ignoring plugin channel in incoming REGISTER: " + channels[i]); } } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java index df31b642..eda87fe2 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java @@ -30,7 +30,7 @@ public class SoundPackets1_13 extends Rewriter { String oldSound = NamedSoundMapping.getOldId(newSound); if (oldSound != null) { wrapper.set(Type.STRING, 0, oldSound); - } else if (!Via.getConfig().isSuppress1_13ConversionErrors()) { + } else if (!Via.getConfig().isSuppressConversionWarnings()) { ViaBackwards.getPlatform().getLogger().warning("Unknown named sound in 1.13->1.12 protocol: " + newSound); } }