mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
SPIGOT-997: Add restart API for server.
This commit is contained in:
parent
a457345b27
commit
8fecf733fe
27
Bukkit-Patches/0029-Add-restart-API.patch
Normal file
27
Bukkit-Patches/0029-Add-restart-API.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From c4395cc09f91e55af6791c7f9490237ba393c73c 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 20edb77..d9ad0ca 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -937,6 +937,13 @@ 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();
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ec5de67e61a8b00e25a06fec87285bf3de72205b Mon Sep 17 00:00:00 2001
|
||||
From c60248d34e0b1c1be08b92ba7fe3fa30392b9605 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 5 Aug 2014 17:20:19 +0100
|
||||
Subject: [PATCH] Watchdog Thread.
|
||||
@ -37,6 +37,22 @@ index ed66d5e..6cef666 100644
|
||||
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 d07b3b8..18ab1ff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1681,6 +1681,11 @@ 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 0000000..429c258
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b0334050c2f90e96c0fb3716ef9e0cef8cade7ad Mon Sep 17 00:00:00 2001
|
||||
From 5c2836e4d9ce3e83b38d3fc0f89b28f65d6706a0 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sat, 13 Dec 2014 13:06:05 +1100
|
||||
Subject: [PATCH] BungeeCord Chat API
|
||||
@ -56,7 +56,7 @@ index 0000000..6cd5df2
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 050c188..fd41124 100644
|
||||
index 0438755..cd9ca4d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -121,6 +121,7 @@ import io.netty.buffer.ByteBufOutputStream;
|
||||
@ -67,9 +67,9 @@ index 050c188..fd41124 100644
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
private static final Player[] EMPTY_PLAYER_ARRAY = new Player[0];
|
||||
@@ -1701,6 +1702,20 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
return org.spigotmc.SpigotConfig.config;
|
||||
@@ -1706,6 +1707,20 @@ public final class CraftServer implements Server {
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
Loading…
Reference in New Issue
Block a user