Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Renaming to PluginSpecific
Dieser Commit ist enthalten in:
Ursprung
a6c21b1f00
Commit
b71927840b
@ -87,7 +87,7 @@ public interface AdvancedConfig {
|
||||
If disabled, expect performance decrease and latency increase
|
||||
""")
|
||||
@DefaultBoolean(true)
|
||||
@PlatformTypeSpecific
|
||||
@PluginSpecific
|
||||
boolean useDirectConnection();
|
||||
|
||||
@Comment("""
|
||||
@ -96,7 +96,7 @@ public interface AdvancedConfig {
|
||||
This requires use-direct-connection to be true.
|
||||
""")
|
||||
@DefaultBoolean(true)
|
||||
@PlatformTypeSpecific
|
||||
@PluginSpecific
|
||||
boolean disableCompression();
|
||||
|
||||
@Comment("Do not touch!")
|
||||
|
@ -294,7 +294,7 @@ public final class ConfigLoader {
|
||||
.nodeStyle(NodeStyle.BLOCK)
|
||||
.defaultOptions(options -> InterfaceDefaultOptions.addTo(options, builder ->
|
||||
builder.addProcessor(ExcludePlatform.class, excludePlatform(bootstrap.platformType().platformName()))
|
||||
.addProcessor(PlatformTypeSpecific.class, platformTypeSpecific(bootstrap.platformType() != PlatformType.STANDALONE)))
|
||||
.addProcessor(PluginSpecific.class, integrationSpecific(bootstrap.platformType() != PlatformType.STANDALONE)))
|
||||
.shouldCopyDefaults(false) // If we use ConfigurationNode#get(type, default), do not write the default back to the node.
|
||||
.header(header)
|
||||
.serializers(builder -> builder.register(new LowercaseEnumSerializer())))
|
||||
@ -313,7 +313,7 @@ public final class ConfigLoader {
|
||||
};
|
||||
}
|
||||
|
||||
private static Processor.Factory<PlatformTypeSpecific, Object> platformTypeSpecific(boolean thisConfigPlugin) {
|
||||
private static Processor.Factory<PluginSpecific, Object> integrationSpecific(boolean thisConfigPlugin) {
|
||||
return (data, fieldType) -> (value, destination) -> {
|
||||
if (data.forPlugin() != thisConfigPlugin) {
|
||||
//noinspection DataFlowIssue
|
||||
|
@ -87,7 +87,7 @@ public interface GeyserConfig {
|
||||
Use server API methods to determine the Java server's MOTD and ping passthrough.
|
||||
There is no need to disable this unless your MOTD or player count does not appear properly.""")
|
||||
@DefaultBoolean(true)
|
||||
@PlatformTypeSpecific
|
||||
@PluginSpecific
|
||||
boolean integratedPingPassthrough();
|
||||
|
||||
@Comment("How often to ping the Java server to refresh MOTD and player count, in seconds.")
|
||||
@ -219,7 +219,7 @@ public interface GeyserConfig {
|
||||
Some hosting services change your Java port everytime you start the server and require the same port to be used for Bedrock.
|
||||
This option makes the Bedrock port the same as the Java port every time you start the server.""")
|
||||
@DefaultBoolean
|
||||
@PlatformTypeSpecific
|
||||
@PluginSpecific
|
||||
boolean cloneRemotePort();
|
||||
|
||||
void address(String address);
|
||||
|
@ -30,8 +30,12 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Add to a config value to indicate this field is only for plugin versions of Geyser,
|
||||
* or vice-versa.
|
||||
*/
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface PlatformTypeSpecific {
|
||||
public @interface PluginSpecific {
|
||||
boolean forPlugin() default true;
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren