Rename suppress-warning config option

This commit is contained in:
KennyTV 2019-11-26 20:14:56 +01:00
parent bd9a1dda88
commit da704539f0
7 changed files with 23 additions and 23 deletions

View File

@ -38,7 +38,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
private Set<Integer> blockedProtocols;
private String blockedDisconnectMessage;
private String reloadDisconnectMessage;
private boolean suppress1_13ConversionErrors;
private boolean suppressConversionWarnings;
private boolean disable1_13TabComplete;
private boolean minimizeCooldown;
private boolean teamColourFix;
@ -95,7 +95,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
reloadDisconnectMessage = getString("reload-disconnect-msg", "Server reload, please rejoin!");
minimizeCooldown = getBoolean("minimize-cooldown", true);
teamColourFix = getBoolean("team-colour-fix", true);
suppress1_13ConversionErrors = getBoolean("suppress-1_13-conversion-errors", false);
suppressConversionWarnings = getBoolean("suppress-conversion-warnings", false);
disable1_13TabComplete = getBoolean("disable-1_13-auto-complete", false);
serversideBlockConnections = getBoolean("serverside-blockconnections", false);
reduceBlockStorageMemory = getBoolean("reduce-blockstorage-memory", false);
@ -276,8 +276,8 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
}
@Override
public boolean isSuppress1_13ConversionErrors() {
return suppress1_13ConversionErrors;
public boolean isSuppressConversionWarnings() {
return suppressConversionWarnings;
}
@Override

View File

@ -231,11 +231,11 @@ public interface ViaVersionConfig {
String getReloadDisconnectMsg();
/**
* Should we hide errors that occur when trying to converting to 1.13 data?
* Should we hide errors that occur when trying to convert block and item data over versions?
*
* @return True if enabled
*/
boolean isSuppress1_13ConversionErrors();
boolean isSuppressConversionWarnings();
/**
* Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)

View File

@ -31,7 +31,7 @@ public class MappingDataLoader {
for (Map.Entry<String, JsonElement> entry : oldIdentifiers.entrySet()) {
Map.Entry<String, JsonElement> value = findValue(newIdentifiers, entry.getValue().getAsString());
if (value == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
}
continue;
@ -53,7 +53,7 @@ public class MappingDataLoader {
value = findValue(newIdentifiers, diffIdentifiers.get(entry.getKey()).getAsString());
}
if (value == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
}
continue;
@ -68,7 +68,7 @@ public class MappingDataLoader {
JsonElement v = oldIdentifiers.get(i);
Integer index = findIndex(newIdentifiers, v.getAsString());
if (index == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("No key for " + v + " :( ");
}
continue;

View File

@ -100,7 +100,7 @@ public class InventoryPackets {
flags |= 1;
Optional<SoundSource> finalSource = SoundSource.findBySource(originalSource);
if (!finalSource.isPresent()) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().info("Could not handle unknown sound source " + originalSource + " falling back to default: master");
}
finalSource = Optional.of(SoundSource.MASTER);
@ -147,7 +147,7 @@ public class InventoryPackets {
String old = channel;
channel = getNewPluginChannelId(channel);
if (channel == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Ignoring outgoing plugin message with channel: " + old);
}
wrapper.cancel();
@ -159,7 +159,7 @@ public class InventoryPackets {
String rewritten = 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()) {
Via.getPlatform().getLogger().warning("Ignoring plugin channel in outgoing REGISTER: " + channels[i]);
}
}
@ -218,7 +218,7 @@ public class InventoryPackets {
String old = channel;
channel = getOldPluginChannelId(channel);
if (channel == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Ignoring incoming plugin message with channel: " + old);
}
wrapper.cancel();
@ -230,7 +230,7 @@ public class InventoryPackets {
String rewritten = 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()) {
Via.getPlatform().getLogger().warning("Ignoring plugin channel in incoming REGISTER: " + channels[i]);
}
}
@ -431,7 +431,7 @@ public class InventoryPackets {
} else if (MappingData.oldToNewItems.containsKey(rawId & ~0xF)) {
rawId &= ~0xF; // Remove data
} else {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Failed to get 1.13 item for " + item.getIdentifier());
}
rawId = 16; // Stone
@ -518,7 +518,7 @@ public class InventoryPackets {
}
if (rawId == null) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Failed to get 1.12 item for " + item.getIdentifier());
}
rawId = 0x10000; // Stone

View File

@ -73,7 +73,7 @@ public class WorldPackets {
Optional<Integer> id = provider.getIntByIdentifier(motive);
if (!id.isPresent() && (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug())) {
if (!id.isPresent() && (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug())) {
Via.getPlatform().getLogger().warning("Could not find painting motive: " + motive + " falling back to default (0)");
}
wrapper.write(Type.VAR_INT, id.orElse(0));
@ -374,7 +374,7 @@ public class WorldPackets {
if (!validBiomes.contains(biome)) {
if (biome != 255 // is it generated naturally? *shrug*
&& latestBiomeWarn != biome) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Received invalid biome id " + biome);
}
latestBiomeWarn = biome;
@ -502,12 +502,12 @@ public class WorldPackets {
}
newId = MappingData.blockMappings.getNewId(oldId & ~0xF); // Remove data
if (newId != -1) {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Missing block " + oldId);
}
return newId;
}
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Missing block completely " + oldId);
}
// Default stone

View File

@ -61,7 +61,7 @@ public class FlowerPotHandler implements BlockEntityProvider.BlockEntityHandler
} else if (flowersNumberId.containsKey(pair)) {
return flowersNumberId.get(pair);
} else {
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Could not find flowerpot content " + item + " for " + tag);
}
}

View File

@ -22,6 +22,8 @@ block-disconnect-msg: "You are using an unsupported Minecraft version!"
# (We don't suggest using reload either, use a plugin manager)
# You can customise the message we kick people with if you use ProtocolLib here.
reload-disconnect-msg: "Server reload, please rejoin!"
# We warn when there's a error converting item and block data over versions, should we suppress these? (Only suggested if spamming)
suppress-conversion-warnings: false
#
#----------------------------------------------------------#
# BUNGEE OPTIONS #
@ -110,8 +112,6 @@ chat-nbt-fix: true
quick-move-action-fix: false
# Should we use prefix for team colour on 1.13 and above clients
team-colour-fix: true
# We warn when there's a error converting from pre-1.13 to 1.13, should we suppress these? (Only suggested if spamming)
suppress-1_13-conversion-errors: false
# 1.13 introduced new auto complete which can trigger "Kicked for spamming" for servers older than 1.13, the following option will disable it completely.
disable-1_13-auto-complete: false
# The following option will delay the tab complete request in x ticks if greater than 0, if other tab-complete is received, the previous is cancelled