Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Allow disabling BungeeCord plugin message channel.
Dieser Commit ist enthalten in:
Ursprung
957c0dd307
Commit
37a1a49fda
@ -402,6 +402,10 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi
|
|||||||
return pingPassthrough;
|
return pingPassthrough;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBungeePluginChannelEnabled() {
|
||||||
|
return advanced.isBungeePluginMessageChannel();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MoreObjects.toStringHelper(this)
|
return MoreObjects.toStringHelper(this)
|
||||||
@ -654,6 +658,10 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi
|
|||||||
@ConfigKey("tcp-fast-open")
|
@ConfigKey("tcp-fast-open")
|
||||||
private boolean tcpFastOpen = false;
|
private boolean tcpFastOpen = false;
|
||||||
|
|
||||||
|
@Comment("Enables BungeeCord plugin messaging channel support on Velocity.")
|
||||||
|
@ConfigKey("bungee-plugin-message-channel")
|
||||||
|
private boolean bungeePluginMessageChannel = true;
|
||||||
|
|
||||||
private Advanced() {
|
private Advanced() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -666,6 +674,7 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi
|
|||||||
this.readTimeout = toml.getLong("read-timeout", 30000L).intValue();
|
this.readTimeout = toml.getLong("read-timeout", 30000L).intValue();
|
||||||
this.proxyProtocol = toml.getBoolean("proxy-protocol", false);
|
this.proxyProtocol = toml.getBoolean("proxy-protocol", false);
|
||||||
this.tcpFastOpen = toml.getBoolean("tcp-fast-open", false);
|
this.tcpFastOpen = toml.getBoolean("tcp-fast-open", false);
|
||||||
|
this.bungeePluginMessageChannel = toml.getBoolean("bungee-plugin-message-channel", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,6 +706,10 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi
|
|||||||
return tcpFastOpen;
|
return tcpFastOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBungeePluginMessageChannel() {
|
||||||
|
return bungeePluginMessageChannel;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Advanced{"
|
return "Advanced{"
|
||||||
@ -707,6 +720,7 @@ public class VelocityConfiguration extends AnnotatedConfig implements ProxyConfi
|
|||||||
+ ", readTimeout=" + readTimeout
|
+ ", readTimeout=" + readTimeout
|
||||||
+ ", proxyProtocol=" + proxyProtocol
|
+ ", proxyProtocol=" + proxyProtocol
|
||||||
+ ", tcpFastOpen=" + tcpFastOpen
|
+ ", tcpFastOpen=" + tcpFastOpen
|
||||||
|
+ ", bungeePluginMessageChannel=" + bungeePluginMessageChannel
|
||||||
+ '}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,6 +273,10 @@ class BungeeCordMessageResponder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean process(PluginMessage message) {
|
boolean process(PluginMessage message) {
|
||||||
|
if (!proxy.getConfiguration().isBungeePluginChannelEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!MODERN_CHANNEL.getId().equals(message.getChannel()) && !LEGACY_CHANNEL.getId()
|
if (!MODERN_CHANNEL.getId().equals(message.getChannel()) && !LEGACY_CHANNEL.getId()
|
||||||
.equals(message.getChannel())) {
|
.equals(message.getChannel())) {
|
||||||
return false;
|
return false;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren