mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Deprecate server config getters (#12189)
This commit is contained in:
@@ -2980,8 +2980,19 @@ public final class Bukkit {
|
|||||||
}
|
}
|
||||||
// Paper end - Folia region threading API
|
// Paper end - Folia region threading API
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated All methods on this class have been deprecated, see the individual methods for replacements.
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Server.Spigot spigot() {
|
public static Server.Spigot spigot() {
|
||||||
return server.spigot();
|
return server.spigot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restarts the server. If the server administrator has not configured restarting, the server will stop.
|
||||||
|
*/
|
||||||
|
public static void restart() {
|
||||||
|
server.restart();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2309,24 +2309,52 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
public class Spigot {
|
public class Spigot {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
* @return The server's spigot config.
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
public org.bukkit.configuration.file.YamlConfiguration getConfig() {
|
public org.bukkit.configuration.file.YamlConfiguration getConfig() {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
* @return The server's bukkit config.
|
||||||
|
*/
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
public org.bukkit.configuration.file.YamlConfiguration getBukkitConfig()
|
public org.bukkit.configuration.file.YamlConfiguration getBukkitConfig()
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException( "Not supported yet." );
|
throw new UnsupportedOperationException( "Not supported yet." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
* @return The server's spigot config.
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
public org.bukkit.configuration.file.YamlConfiguration getSpigotConfig()
|
public org.bukkit.configuration.file.YamlConfiguration getSpigotConfig()
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
* @return The server's paper config.
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
public org.bukkit.configuration.file.YamlConfiguration getPaperConfig()
|
public org.bukkit.configuration.file.YamlConfiguration getPaperConfig()
|
||||||
{
|
{
|
||||||
@@ -2358,16 +2386,28 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Restart the server. If the server administrator has not configured restarting, the server will stop.
|
* Restart the server. If the server administrator has not configured restarting, the server will stop.
|
||||||
|
*
|
||||||
|
* @deprecated Use {@link Server#restart()} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
public void restart() {
|
public void restart() {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated All methods on this class have been deprecated, see the individual methods for replacements.
|
||||||
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
Spigot spigot();
|
Spigot spigot();
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restarts the server. If the server administrator has not configured restarting, the server will stop.
|
||||||
|
*/
|
||||||
|
void restart();
|
||||||
|
|
||||||
void reloadPermissions(); // Paper
|
void reloadPermissions(); // Paper
|
||||||
|
|
||||||
boolean reloadCommandAliases(); // Paper
|
boolean reloadCommandAliases(); // Paper
|
||||||
|
@@ -3053,7 +3053,7 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restart() {
|
public void restart() {
|
||||||
org.spigotmc.RestartCommand.restart();
|
CraftServer.this.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -3077,6 +3077,11 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restart() {
|
||||||
|
org.spigotmc.RestartCommand.restart();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double[] getTPS() {
|
public double[] getTPS() {
|
||||||
return new double[] {
|
return new double[] {
|
||||||
|
Reference in New Issue
Block a user