3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-25 15:50:10 +01:00

Allow disabling of auto-complete in 1.13 via disable-1_13-auto-complete in config #891

Dieser Commit ist enthalten in:
Myles 2018-09-01 07:53:36 +01:00
Ursprung 84aaec6bff
Commit 527b5e6f99
6 geänderte Dateien mit 30 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -209,4 +209,9 @@ public class BukkitConfigAPI extends Config implements ViaVersionConfig {
public boolean isSuppress1_13ConversionErrors() {
return getBoolean("suppress-1_13-conversion-errors", false);
}
@Override
public boolean isDisable1_13AutoComplete() {
return getBoolean("disable-1_13-auto-complete", false);
}
}

Datei anzeigen

@ -262,4 +262,9 @@ public class BungeeConfigAPI extends Config implements ViaVersionConfig {
public boolean isSuppress1_13ConversionErrors() {
return getBoolean("suppress-1_13-conversion-errors", false);
}
@Override
public boolean isDisable1_13AutoComplete() {
return getBoolean("disable-1_13-auto-complete", false);
}
}

Datei anzeigen

@ -216,14 +216,14 @@ public interface ViaVersionConfig {
* @return True if enabled
*/
boolean is1_13TeamColourFix();
/**
* Should we fix shift quick move action for 1.12 clients
*
* @return True if enabled
*/
boolean is1_12QuickMoveActionFix();
/**
* Get the blocked protocols
*
@ -252,4 +252,11 @@ public interface ViaVersionConfig {
* @return True if enabled
*/
boolean isSuppress1_13ConversionErrors();
/**
* Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)
*
* @return True if enabled
*/
boolean isDisable1_13AutoComplete();
}

Datei anzeigen

@ -536,6 +536,10 @@ public class Protocol1_13To1_12_2 extends Protocol {
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
// Disable auto-complete if configured
if (Via.getConfig().isDisable1_13AutoComplete()) {
wrapper.cancel();
}
int tid = wrapper.read(Type.VAR_INT);
// Save transaction id
wrapper.user().get(TabCompleteTracker.class).setTransactionId(tid);

Datei anzeigen

@ -90,6 +90,8 @@ quick-move-action-fix: false
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
#
#----------------------------------------------------------#
# 1.9 & 1.10 CLIENTS ON 1.8 SERVERS OPTIONS #

Datei anzeigen

@ -215,4 +215,9 @@ public class SpongeConfigAPI extends Config implements ViaVersionConfig {
public boolean isSuppress1_13ConversionErrors() {
return getBoolean("suppress-1_13-conversion-errors", false);
}
@Override
public boolean isDisable1_13AutoComplete() {
return getBoolean("disable-1_13-auto-complete", false);
}
}