Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
Rename suppress-warning config option
Dieser Commit ist enthalten in:
Ursprung
bd9a1dda88
Commit
da704539f0
@ -38,7 +38,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
|
|||||||
private Set<Integer> blockedProtocols;
|
private Set<Integer> blockedProtocols;
|
||||||
private String blockedDisconnectMessage;
|
private String blockedDisconnectMessage;
|
||||||
private String reloadDisconnectMessage;
|
private String reloadDisconnectMessage;
|
||||||
private boolean suppress1_13ConversionErrors;
|
private boolean suppressConversionWarnings;
|
||||||
private boolean disable1_13TabComplete;
|
private boolean disable1_13TabComplete;
|
||||||
private boolean minimizeCooldown;
|
private boolean minimizeCooldown;
|
||||||
private boolean teamColourFix;
|
private boolean teamColourFix;
|
||||||
@ -95,7 +95,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
|
|||||||
reloadDisconnectMessage = getString("reload-disconnect-msg", "Server reload, please rejoin!");
|
reloadDisconnectMessage = getString("reload-disconnect-msg", "Server reload, please rejoin!");
|
||||||
minimizeCooldown = getBoolean("minimize-cooldown", true);
|
minimizeCooldown = getBoolean("minimize-cooldown", true);
|
||||||
teamColourFix = getBoolean("team-colour-fix", 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);
|
disable1_13TabComplete = getBoolean("disable-1_13-auto-complete", false);
|
||||||
serversideBlockConnections = getBoolean("serverside-blockconnections", false);
|
serversideBlockConnections = getBoolean("serverside-blockconnections", false);
|
||||||
reduceBlockStorageMemory = getBoolean("reduce-blockstorage-memory", false);
|
reduceBlockStorageMemory = getBoolean("reduce-blockstorage-memory", false);
|
||||||
@ -276,8 +276,8 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSuppress1_13ConversionErrors() {
|
public boolean isSuppressConversionWarnings() {
|
||||||
return suppress1_13ConversionErrors;
|
return suppressConversionWarnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -231,11 +231,11 @@ public interface ViaVersionConfig {
|
|||||||
String getReloadDisconnectMsg();
|
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
|
* @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)
|
* Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)
|
||||||
|
@ -31,7 +31,7 @@ public class MappingDataLoader {
|
|||||||
for (Map.Entry<String, JsonElement> entry : oldIdentifiers.entrySet()) {
|
for (Map.Entry<String, JsonElement> entry : oldIdentifiers.entrySet()) {
|
||||||
Map.Entry<String, JsonElement> value = findValue(newIdentifiers, entry.getValue().getAsString());
|
Map.Entry<String, JsonElement> value = findValue(newIdentifiers, entry.getValue().getAsString());
|
||||||
if (value == null) {
|
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() + " :( ");
|
Via.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -53,7 +53,7 @@ public class MappingDataLoader {
|
|||||||
value = findValue(newIdentifiers, diffIdentifiers.get(entry.getKey()).getAsString());
|
value = findValue(newIdentifiers, diffIdentifiers.get(entry.getKey()).getAsString());
|
||||||
}
|
}
|
||||||
if (value == null) {
|
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() + " :( ");
|
Via.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -68,7 +68,7 @@ public class MappingDataLoader {
|
|||||||
JsonElement v = oldIdentifiers.get(i);
|
JsonElement v = oldIdentifiers.get(i);
|
||||||
Integer index = findIndex(newIdentifiers, v.getAsString());
|
Integer index = findIndex(newIdentifiers, v.getAsString());
|
||||||
if (index == null) {
|
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 + " :( ");
|
Via.getPlatform().getLogger().warning("No key for " + v + " :( ");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
@ -100,7 +100,7 @@ public class InventoryPackets {
|
|||||||
flags |= 1;
|
flags |= 1;
|
||||||
Optional<SoundSource> finalSource = SoundSource.findBySource(originalSource);
|
Optional<SoundSource> finalSource = SoundSource.findBySource(originalSource);
|
||||||
if (!finalSource.isPresent()) {
|
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");
|
Via.getPlatform().getLogger().info("Could not handle unknown sound source " + originalSource + " falling back to default: master");
|
||||||
}
|
}
|
||||||
finalSource = Optional.of(SoundSource.MASTER);
|
finalSource = Optional.of(SoundSource.MASTER);
|
||||||
@ -147,7 +147,7 @@ public class InventoryPackets {
|
|||||||
String old = channel;
|
String old = channel;
|
||||||
channel = getNewPluginChannelId(channel);
|
channel = getNewPluginChannelId(channel);
|
||||||
if (channel == null) {
|
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);
|
Via.getPlatform().getLogger().warning("Ignoring outgoing plugin message with channel: " + old);
|
||||||
}
|
}
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
@ -159,7 +159,7 @@ public class InventoryPackets {
|
|||||||
String rewritten = getNewPluginChannelId(channels[i]);
|
String rewritten = getNewPluginChannelId(channels[i]);
|
||||||
if (rewritten != null) {
|
if (rewritten != null) {
|
||||||
rewrittenChannels.add(rewritten);
|
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]);
|
Via.getPlatform().getLogger().warning("Ignoring plugin channel in outgoing REGISTER: " + channels[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ public class InventoryPackets {
|
|||||||
String old = channel;
|
String old = channel;
|
||||||
channel = getOldPluginChannelId(channel);
|
channel = getOldPluginChannelId(channel);
|
||||||
if (channel == null) {
|
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);
|
Via.getPlatform().getLogger().warning("Ignoring incoming plugin message with channel: " + old);
|
||||||
}
|
}
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
@ -230,7 +230,7 @@ public class InventoryPackets {
|
|||||||
String rewritten = getOldPluginChannelId(channels[i]);
|
String rewritten = getOldPluginChannelId(channels[i]);
|
||||||
if (rewritten != null) {
|
if (rewritten != null) {
|
||||||
rewrittenChannels.add(rewritten);
|
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]);
|
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)) {
|
} else if (MappingData.oldToNewItems.containsKey(rawId & ~0xF)) {
|
||||||
rawId &= ~0xF; // Remove data
|
rawId &= ~0xF; // Remove data
|
||||||
} else {
|
} 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());
|
Via.getPlatform().getLogger().warning("Failed to get 1.13 item for " + item.getIdentifier());
|
||||||
}
|
}
|
||||||
rawId = 16; // Stone
|
rawId = 16; // Stone
|
||||||
@ -518,7 +518,7 @@ public class InventoryPackets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rawId == null) {
|
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());
|
Via.getPlatform().getLogger().warning("Failed to get 1.12 item for " + item.getIdentifier());
|
||||||
}
|
}
|
||||||
rawId = 0x10000; // Stone
|
rawId = 0x10000; // Stone
|
||||||
|
@ -73,7 +73,7 @@ public class WorldPackets {
|
|||||||
|
|
||||||
Optional<Integer> id = provider.getIntByIdentifier(motive);
|
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)");
|
Via.getPlatform().getLogger().warning("Could not find painting motive: " + motive + " falling back to default (0)");
|
||||||
}
|
}
|
||||||
wrapper.write(Type.VAR_INT, id.orElse(0));
|
wrapper.write(Type.VAR_INT, id.orElse(0));
|
||||||
@ -374,7 +374,7 @@ public class WorldPackets {
|
|||||||
if (!validBiomes.contains(biome)) {
|
if (!validBiomes.contains(biome)) {
|
||||||
if (biome != 255 // is it generated naturally? *shrug*
|
if (biome != 255 // is it generated naturally? *shrug*
|
||||||
&& latestBiomeWarn != biome) {
|
&& 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);
|
Via.getPlatform().getLogger().warning("Received invalid biome id " + biome);
|
||||||
}
|
}
|
||||||
latestBiomeWarn = biome;
|
latestBiomeWarn = biome;
|
||||||
@ -502,12 +502,12 @@ public class WorldPackets {
|
|||||||
}
|
}
|
||||||
newId = MappingData.blockMappings.getNewId(oldId & ~0xF); // Remove data
|
newId = MappingData.blockMappings.getNewId(oldId & ~0xF); // Remove data
|
||||||
if (newId != -1) {
|
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);
|
Via.getPlatform().getLogger().warning("Missing block " + oldId);
|
||||||
}
|
}
|
||||||
return newId;
|
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);
|
Via.getPlatform().getLogger().warning("Missing block completely " + oldId);
|
||||||
}
|
}
|
||||||
// Default stone
|
// Default stone
|
||||||
|
@ -61,7 +61,7 @@ public class FlowerPotHandler implements BlockEntityProvider.BlockEntityHandler
|
|||||||
} else if (flowersNumberId.containsKey(pair)) {
|
} else if (flowersNumberId.containsKey(pair)) {
|
||||||
return flowersNumberId.get(pair);
|
return flowersNumberId.get(pair);
|
||||||
} else {
|
} 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);
|
Via.getPlatform().getLogger().warning("Could not find flowerpot content " + item + " for " + tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
# (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.
|
# You can customise the message we kick people with if you use ProtocolLib here.
|
||||||
reload-disconnect-msg: "Server reload, please rejoin!"
|
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 #
|
# BUNGEE OPTIONS #
|
||||||
@ -110,8 +112,6 @@ chat-nbt-fix: true
|
|||||||
quick-move-action-fix: false
|
quick-move-action-fix: false
|
||||||
# Should we use prefix for team colour on 1.13 and above clients
|
# Should we use prefix for team colour on 1.13 and above clients
|
||||||
team-colour-fix: true
|
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.
|
# 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
|
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
|
# 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
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren