Add configuration interface to expose certain config values (#12273)
This commit is contained in:
@ -14,6 +14,7 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Logger;
|
||||
import io.papermc.paper.configuration.ServerConfiguration;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
@ -1267,6 +1268,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
public boolean getOnlineMode();
|
||||
|
||||
/**
|
||||
* Retrieves the server configuration.
|
||||
*
|
||||
* @return the instance of ServerConfiguration containing the server's configuration details
|
||||
*/
|
||||
@NotNull ServerConfiguration getServerConfig();
|
||||
|
||||
/**
|
||||
* Gets whether this server allows flying or not.
|
||||
*
|
||||
@ -2319,6 +2327,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated Server config options may be renamed or removed without notice. Prefer using existing API
|
||||
* wherever possible, rather than directly reading from a server config.
|
||||
*
|
||||
* @see #getServerConfig()
|
||||
* @return The server's spigot config.
|
||||
*/
|
||||
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||
@ -2331,6 +2340,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated Server config options may be renamed or removed without notice. Prefer using existing API
|
||||
* wherever possible, rather than directly reading from a server config.
|
||||
*
|
||||
* @see #getServerConfig()
|
||||
* @return The server's bukkit config.
|
||||
*/
|
||||
// Paper start
|
||||
@ -2345,6 +2355,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated Server config options may be renamed or removed without notice. Prefer using existing API
|
||||
* wherever possible, rather than directly reading from a server config.
|
||||
*
|
||||
* @see #getServerConfig()
|
||||
* @return The server's spigot config.
|
||||
*/
|
||||
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||
@ -2358,6 +2369,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated Server config options may be renamed or removed without notice. Prefer using existing API
|
||||
* wherever possible, rather than directly reading from a server config.
|
||||
*
|
||||
* @see #getServerConfig()
|
||||
* @return The server's paper config.
|
||||
*/
|
||||
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||
|
||||
Reference in New Issue
Block a user