mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-31 23:59:33 +01:00
Allow disabling of auto-complete in 1.13 via disable-1_13-auto-complete in config #891
This commit is contained in:
parent
84aaec6bff
commit
527b5e6f99
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 #
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user