Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Move use-direct-adapters to system property
Dieser Commit ist enthalten in:
Ursprung
002be32bb3
Commit
a197f60446
@ -183,7 +183,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
|
|||||||
this.geyserInjector = new GeyserSpigotInjector(isViaVersion);
|
this.geyserInjector = new GeyserSpigotInjector(isViaVersion);
|
||||||
this.geyserInjector.initializeLocalChannel(this);
|
this.geyserInjector.initializeLocalChannel(this);
|
||||||
|
|
||||||
if (connector.getConfig().isUseAdapters()) {
|
if (Boolean.parseBoolean(System.getProperty("Geyser.UseDirectAdapters", "true"))) {
|
||||||
try {
|
try {
|
||||||
String name = Bukkit.getServer().getClass().getPackage().getName();
|
String name = Bukkit.getServer().getClass().getPackage().getName();
|
||||||
String nmsVersion = name.substring(name.lastIndexOf('.') + 1);
|
String nmsVersion = name.substring(name.lastIndexOf('.') + 1);
|
||||||
@ -208,7 +208,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
geyserLogger.debug("Not using NMS adapter as it is disabled in the config.");
|
geyserLogger.debug("Not using NMS adapter as it is disabled via system property.");
|
||||||
}
|
}
|
||||||
if (this.geyserWorldManager == null) {
|
if (this.geyserWorldManager == null) {
|
||||||
// No NMS adapter
|
// No NMS adapter
|
||||||
|
@ -171,8 +171,6 @@ public interface GeyserConfiguration {
|
|||||||
|
|
||||||
int getMtu();
|
int getMtu();
|
||||||
|
|
||||||
boolean isUseAdapters();
|
|
||||||
|
|
||||||
boolean isUseDirectConnection();
|
boolean isUseDirectConnection();
|
||||||
|
|
||||||
int getConfigVersion();
|
int getConfigVersion();
|
||||||
|
@ -247,9 +247,6 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
|||||||
@JsonProperty("mtu")
|
@JsonProperty("mtu")
|
||||||
private int mtu = 1400;
|
private int mtu = 1400;
|
||||||
|
|
||||||
@JsonProperty("use-adapters")
|
|
||||||
private boolean useAdapters = true;
|
|
||||||
|
|
||||||
@JsonProperty("use-direct-connection")
|
@JsonProperty("use-direct-connection")
|
||||||
private boolean useDirectConnection = true;
|
private boolean useDirectConnection = true;
|
||||||
|
|
||||||
|
@ -195,10 +195,6 @@ enable-proxy-connections: false
|
|||||||
# 1400 is the default.
|
# 1400 is the default.
|
||||||
# mtu: 1400
|
# mtu: 1400
|
||||||
|
|
||||||
# Whether to use direct server methods to retrieve information such as block states.
|
|
||||||
# Turning this off for Spigot will stop NMS from being used but will have a performance impact.
|
|
||||||
use-adapters: true
|
|
||||||
|
|
||||||
# Whether to connect directly into the Java server without creating a TCP connection.
|
# Whether to connect directly into the Java server without creating a TCP connection.
|
||||||
# This should only be disabled if a plugin that interfaces with packets or the network does not work correctly with Geyser.
|
# This should only be disabled if a plugin that interfaces with packets or the network does not work correctly with Geyser.
|
||||||
# If enabled on plugin versions, the remote address and port sections are ignored
|
# If enabled on plugin versions, the remote address and port sections are ignored
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren