mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
SPIGOT-997: Add restart API for server.
This commit is contained in:
parent
a5da72e7fa
commit
fc3e568b8d
25
Bukkit-Patches/0029-Add-restart-API.patch
Normal file
25
Bukkit-Patches/0029-Add-restart-API.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 13 Jul 2015 19:10:15 +1000
|
||||
Subject: [PATCH] Add restart API.
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
|
||||
public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Restart the server. If the server administrator has not configured restarting, the server will stop.
|
||||
+ */
|
||||
+ public void restart() {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
+ }
|
||||
}
|
||||
|
||||
Spigot spigot();
|
||||
--
|
@ -37,6 +37,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
||||
org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
return org.spigotmc.SpigotConfig.config;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void restart() {
|
||||
+ org.spigotmc.RestartCommand.restart();
|
||||
+ }
|
||||
};
|
||||
|
||||
public Spigot spigot()
|
||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
@ -68,8 +68,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public final class CraftServer implements Server {
|
||||
private static final Player[] EMPTY_PLAYER_ARRAY = new Player[0];
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
return org.spigotmc.SpigotConfig.config;
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
Loading…
Reference in New Issue
Block a user