mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
[ci skip] Deprecate Server#setSpawnRadius (#12024)
This commit is contained in:
@@ -1373,7 +1373,11 @@ public final class Bukkit {
|
|||||||
* Sets the radius, in blocks, around each worlds spawn point to protect.
|
* Sets the radius, in blocks, around each worlds spawn point to protect.
|
||||||
*
|
*
|
||||||
* @param value new spawn radius, or 0 if none
|
* @param value new spawn radius, or 0 if none
|
||||||
|
* @deprecated has not functioned for a long time as the spawn radius is defined by the server.properties file.
|
||||||
|
* There is no API replacement for this method. It is generally recommended to implement "protection"-like behaviour
|
||||||
|
* via events or third-party plugin APIs.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
public static void setSpawnRadius(int value) {
|
public static void setSpawnRadius(int value) {
|
||||||
server.setSpawnRadius(value);
|
server.setSpawnRadius(value);
|
||||||
}
|
}
|
||||||
|
@@ -1219,7 +1219,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|||||||
* Sets the radius, in blocks, around each worlds spawn point to protect.
|
* Sets the radius, in blocks, around each worlds spawn point to protect.
|
||||||
*
|
*
|
||||||
* @param value new spawn radius, or 0 if none
|
* @param value new spawn radius, or 0 if none
|
||||||
|
* @deprecated has not functioned for a long time as the spawn radius is defined by the server.properties file.
|
||||||
|
* There is no API replacement for this method. It is generally recommended to implement "protection"-like behaviour
|
||||||
|
* via events or third-party plugin APIs.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||||
public void setSpawnRadius(int value);
|
public void setSpawnRadius(int value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1864,22 +1864,12 @@ public final class CraftServer implements Server {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeBukkitSpawnRadius() {
|
|
||||||
this.configuration.set("settings.spawn-radius", null);
|
|
||||||
this.saveConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getBukkitSpawnRadius() {
|
|
||||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paper start
|
|
||||||
@Override
|
@Override
|
||||||
public net.kyori.adventure.text.Component shutdownMessage() {
|
public net.kyori.adventure.text.Component shutdownMessage() {
|
||||||
String msg = getShutdownMessage();
|
String msg = getShutdownMessage();
|
||||||
return msg != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(msg) : null;
|
return msg != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(msg) : null;
|
||||||
}
|
}
|
||||||
// Paper end
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated // Paper
|
@Deprecated // Paper
|
||||||
public String getShutdownMessage() {
|
public String getShutdownMessage() {
|
||||||
|
Reference in New Issue
Block a user