3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-19 14:30:16 +01:00

Rework unsupported config options in AbstractViaConfig (#3986)

Dieser Commit ist enthalten in:
EnZaXD 2024-06-27 09:54:44 +02:00 committet von GitHub
Ursprung bca25d4744
Commit a987882132
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -19,13 +19,11 @@ package com.viaversion.viaversion.bukkit.platform;
import com.viaversion.viaversion.configuration.AbstractViaConfig; import com.viaversion.viaversion.configuration.AbstractViaConfig;
import java.io.File; import java.io.File;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.logging.Logger; import java.util.logging.Logger;
public class BukkitViaConfig extends AbstractViaConfig { public class BukkitViaConfig extends AbstractViaConfig {
private static final List<String> UNSUPPORTED = Arrays.asList("velocity-ping-interval", "velocity-ping-save", "velocity-servers");
private boolean quickMoveActionFix; private boolean quickMoveActionFix;
private boolean hitboxFix1_9; private boolean hitboxFix1_9;
private boolean hitboxFix1_14; private boolean hitboxFix1_14;
@ -84,6 +82,6 @@ public class BukkitViaConfig extends AbstractViaConfig {
@Override @Override
public List<String> getUnsupportedOptions() { public List<String> getUnsupportedOptions() {
return UNSUPPORTED; return VELOCITY_ONLY_OPTIONS;
} }
} }

Datei anzeigen

@ -26,6 +26,7 @@ import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.protocol.BlockedProtocolVersionsImpl; import com.viaversion.viaversion.protocol.BlockedProtocolVersionsImpl;
import com.viaversion.viaversion.util.Config; import com.viaversion.viaversion.util.Config;
import java.io.File; import java.io.File;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -35,6 +36,11 @@ import it.unimi.dsi.fastutil.objects.ObjectSet;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
public abstract class AbstractViaConfig extends Config implements ViaVersionConfig { public abstract class AbstractViaConfig extends Config implements ViaVersionConfig {
public static final List<String> BUKKIT_ONLY_OPTIONS = Arrays.asList("register-userconnections-on-join", "quick-move-action-fix",
"change-1_9-hitbox", "change-1_14-hitbox", "blockconnection-method", "armor-toggle-fix", "use-new-deathmessages",
"item-cache", "nms-player-ticking");
public static final List<String> VELOCITY_ONLY_OPTIONS = Arrays.asList("velocity-ping-interval", "velocity-ping-save", "velocity-servers");
private boolean checkForUpdates; private boolean checkForUpdates;
private boolean preventCollision; private boolean preventCollision;

Datei anzeigen

@ -20,7 +20,6 @@ package com.viaversion.viaversion.velocity.platform;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.configuration.AbstractViaConfig; import com.viaversion.viaversion.configuration.AbstractViaConfig;
import java.io.File; import java.io.File;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@ -28,7 +27,6 @@ import java.util.Map;
import java.util.logging.Logger; import java.util.logging.Logger;
public class VelocityViaConfig extends AbstractViaConfig { public class VelocityViaConfig extends AbstractViaConfig {
private static final List<String> UNSUPPORTED = Arrays.asList("nms-player-ticking", "item-cache", "quick-move-action-fix", "blockconnection-method", "change-1_9-hitbox", "change-1_14-hitbox");
private int velocityPingInterval; private int velocityPingInterval;
private boolean velocityPingSave; private boolean velocityPingSave;
private Map<String, Integer> velocityServerProtocols; private Map<String, Integer> velocityServerProtocols;
@ -85,7 +83,7 @@ public class VelocityViaConfig extends AbstractViaConfig {
@Override @Override
public List<String> getUnsupportedOptions() { public List<String> getUnsupportedOptions() {
return UNSUPPORTED; return BUKKIT_ONLY_OPTIONS;
} }
@Override @Override