Class SslSettings
java.lang.Object
eu.mrapik.minecraftservermcp.config.SslSettings
Optional TLS (HTTPS) listener for the embedded MCP server. When
enabled() is false, no SSL connector is
started and clients use plain HTTP on PluginSettings.port().-
Method Summary
Modifier and TypeMethodDescriptionstatic SslSettingsdisabled()Returns settings withenabled()false(no connector created).booleanenabled()Whether the MCP plugin should open an HTTPS connector.@Nullable StringKey password when it differs from the keystore password; may be null to use the keystore password.Password for the keystore file.Absolute path to the keystore file (JKS or PKCS12).JavaKeyStoretype (e.g.static SslSettingsload(JavaPlugin plugin, FileConfiguration c, int httpPort) Parses thesslsection.intport()TLS listen port (separate fromPluginSettings.port()).
-
Method Details
-
load
Parses thesslsection. RelativekeystorePathvalues are resolved under the plugin data folder.- Parameters:
plugin- owning plugin (data folder for relative keystore paths)c- root plugin configuration (readssslsection)httpPort- plain HTTP port; must differ from SSL port when SSL is enabled- Returns:
- disabled settings when the section is absent or
enabledis false; otherwise validated TLS settings
-
disabled
Returns settings withenabled()false(no connector created).- Returns:
- disabled SSL configuration
-
enabled
public boolean enabled()Whether the MCP plugin should open an HTTPS connector.- Returns:
truewhenssl.enabledwas set in config
-
port
public int port()TLS listen port (separate fromPluginSettings.port()).- Returns:
- TCP port for HTTPS when
enabled()is true
-
keystorePath
Absolute path to the keystore file (JKS or PKCS12).- Returns:
- filesystem path when
enabled()is true
-
keystoreType
- Returns:
- keystore type string
-
keystorePassword
Password for the keystore file.- Returns:
- keystore password string
-
keyPassword
Key password when it differs from the keystore password; may be null to use the keystore password.- Returns:
- optional key password
-