3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Move bukkit-only settings into BukkitViaConfig (#3985)

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

Datei anzeigen

@ -30,6 +30,9 @@ public class BukkitViaConfig extends AbstractViaConfig {
private String blockConnectionMethod; private String blockConnectionMethod;
private boolean armorToggleFix; private boolean armorToggleFix;
private boolean registerUserConnectionOnJoin; private boolean registerUserConnectionOnJoin;
private boolean useNewDeathMessages;
private boolean itemCache;
private boolean nmsPlayerTicking;
public BukkitViaConfig(final File folder, final Logger logger) { public BukkitViaConfig(final File folder, final Logger logger) {
super(new File(folder, "config.yml"), logger); super(new File(folder, "config.yml"), logger);
@ -44,6 +47,9 @@ public class BukkitViaConfig extends AbstractViaConfig {
hitboxFix1_14 = getBoolean("change-1_14-hitbox", false); hitboxFix1_14 = getBoolean("change-1_14-hitbox", false);
blockConnectionMethod = getString("blockconnection-method", "packet"); blockConnectionMethod = getString("blockconnection-method", "packet");
armorToggleFix = getBoolean("armor-toggle-fix", true); armorToggleFix = getBoolean("armor-toggle-fix", true);
useNewDeathMessages = getBoolean("use-new-deathmessages", true);
itemCache = getBoolean("item-cache", true);
nmsPlayerTicking = getBoolean("nms-player-ticking", true);
} }
@Override @Override
@ -80,6 +86,21 @@ public class BukkitViaConfig extends AbstractViaConfig {
return armorToggleFix; return armorToggleFix;
} }
@Override
public boolean isShowNewDeathMessages() {
return useNewDeathMessages;
}
@Override
public boolean isItemCache() {
return itemCache;
}
@Override
public boolean isNMSPlayerTicking() {
return nmsPlayerTicking;
}
@Override @Override
public List<String> getUnsupportedOptions() { public List<String> getUnsupportedOptions() {
return VELOCITY_ONLY_OPTIONS; return VELOCITY_ONLY_OPTIONS;

Datei anzeigen

@ -45,7 +45,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
private boolean checkForUpdates; private boolean checkForUpdates;
private boolean preventCollision; private boolean preventCollision;
private boolean useNewEffectIndicator; private boolean useNewEffectIndicator;
private boolean useNewDeathmessages;
private boolean suppressMetadataErrors; private boolean suppressMetadataErrors;
private boolean shieldBlocking; private boolean shieldBlocking;
private boolean noDelayShieldBlocking; private boolean noDelayShieldBlocking;
@ -63,8 +62,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
private String maxPPSWarningsKickMessage; private String maxPPSWarningsKickMessage;
private boolean sendSupportedVersions; private boolean sendSupportedVersions;
private boolean simulatePlayerTick; private boolean simulatePlayerTick;
private boolean itemCache;
private boolean nmsPlayerTicking;
private boolean replacePistons; private boolean replacePistons;
private int pistonReplacementId; private int pistonReplacementId;
private boolean chunkBorderFix; private boolean chunkBorderFix;
@ -112,7 +109,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
checkForUpdates = getBoolean("check-for-updates", true); checkForUpdates = getBoolean("check-for-updates", true);
preventCollision = getBoolean("prevent-collision", true); preventCollision = getBoolean("prevent-collision", true);
useNewEffectIndicator = getBoolean("use-new-effect-indicator", true); useNewEffectIndicator = getBoolean("use-new-effect-indicator", true);
useNewDeathmessages = getBoolean("use-new-deathmessages", true);
suppressMetadataErrors = getBoolean("suppress-metadata-errors", false); suppressMetadataErrors = getBoolean("suppress-metadata-errors", false);
shieldBlocking = getBoolean("shield-blocking", true); shieldBlocking = getBoolean("shield-blocking", true);
noDelayShieldBlocking = getBoolean("no-delay-shield-blocking", false); noDelayShieldBlocking = getBoolean("no-delay-shield-blocking", false);
@ -130,8 +126,6 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
maxPPSWarningsKickMessage = getString("tracking-max-kick-msg", "You are sending too many packets, :("); maxPPSWarningsKickMessage = getString("tracking-max-kick-msg", "You are sending too many packets, :(");
sendSupportedVersions = getBoolean("send-supported-versions", false); sendSupportedVersions = getBoolean("send-supported-versions", false);
simulatePlayerTick = getBoolean("simulate-pt", true); simulatePlayerTick = getBoolean("simulate-pt", true);
itemCache = getBoolean("item-cache", true);
nmsPlayerTicking = getBoolean("nms-player-ticking", true);
replacePistons = getBoolean("replace-pistons", false); replacePistons = getBoolean("replace-pistons", false);
pistonReplacementId = getInt("replacement-piston-id", 0); pistonReplacementId = getInt("replacement-piston-id", 0);
chunkBorderFix = getBoolean("chunk-border-fix", false); chunkBorderFix = getBoolean("chunk-border-fix", false);
@ -260,7 +254,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
@Override @Override
public boolean isShowNewDeathMessages() { public boolean isShowNewDeathMessages() {
return useNewDeathmessages; return false;
} }
@Override @Override
@ -350,12 +344,12 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
@Override @Override
public boolean isItemCache() { public boolean isItemCache() {
return itemCache; return false;
} }
@Override @Override
public boolean isNMSPlayerTicking() { public boolean isNMSPlayerTicking() {
return nmsPlayerTicking; return false;
} }
@Override @Override

Datei anzeigen

@ -86,16 +86,6 @@ public class VelocityViaConfig extends AbstractViaConfig {
return BUKKIT_ONLY_OPTIONS; return BUKKIT_ONLY_OPTIONS;
} }
@Override
public boolean isItemCache() {
return false;
}
@Override
public boolean isNMSPlayerTicking() {
return false;
}
/** /**
* What is the interval for checking servers via ping * What is the interval for checking servers via ping
* -1 for disabled * -1 for disabled