mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-31 23:59:33 +01:00
Rework unsupported config options in AbstractViaConfig (#3986)
This commit is contained in:
parent
bca25d4744
commit
a987882132
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user