summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-02 06:33:41 +1100
committermd_5 <git@md-5.net>2016-03-02 06:33:41 +1100
commit1d80ac2a7bd4d2651d139f444de70e30158672f9 (patch)
tree06f3832ab88cca7f834c5457eff9d4c6ca5fa06e /nms-patches
parent7c2b0ab69e7a88555ca612ef64dfeb867548a66b (diff)
downloadcraftbukkit-1d80ac2a7bd4d2651d139f444de70e30158672f9.tar
craftbukkit-1d80ac2a7bd4d2651d139f444de70e30158672f9.tar.gz
craftbukkit-1d80ac2a7bd4d2651d139f444de70e30158672f9.tar.lz
craftbukkit-1d80ac2a7bd4d2651d139f444de70e30158672f9.tar.xz
craftbukkit-1d80ac2a7bd4d2651d139f444de70e30158672f9.zip
SPIGOT-1590: Ensure plugins are disabled.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/MinecraftServer.patch62
1 files changed, 34 insertions, 28 deletions
diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch
index c0edea57..fe8c79c5 100644
--- a/nms-patches/MinecraftServer.patch
+++ b/nms-patches/MinecraftServer.patch
@@ -315,7 +315,7 @@
} catch (ExceptionWorldConflict exceptionworldconflict) {
MinecraftServer.LOGGER.warn(exceptionworldconflict.getMessage());
}
-@@ -289,7 +428,18 @@
+@@ -289,8 +428,24 @@
}
@@ -333,9 +333,15 @@
+ }
+ // CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
++ // CraftBukkit start
++ if (this.server != null) {
++ this.server.disablePlugins();
++ }
++ // CraftBukkit end
if (this.am() != null) {
this.am().b();
-@@ -299,6 +449,7 @@
+ }
+@@ -299,6 +454,7 @@
MinecraftServer.LOGGER.info("Saving players");
this.v.savePlayers();
this.v.u();
@@ -343,7 +349,7 @@
}
if (this.worldServer != null) {
-@@ -314,11 +465,13 @@
+@@ -314,11 +470,13 @@
this.saveChunks(false);
@@ -357,7 +363,7 @@
}
if (this.m.d()) {
-@@ -358,6 +511,7 @@
+@@ -358,6 +516,7 @@
long k = j - this.aa;
if (k > 2000L && this.aa - this.Q >= 15000L) {
@@ -365,7 +371,7 @@
MinecraftServer.LOGGER.warn("Can\'t keep up! Did the system time change, or is the server overloaded? Running {}ms behind, skipping {} tick(s)", new Object[] { Long.valueOf(k), Long.valueOf(k / 50L)});
k = 2000L;
this.Q = this.aa;
-@@ -370,11 +524,12 @@
+@@ -370,11 +529,12 @@
i += k;
this.aa = j;
@@ -379,7 +385,7 @@
i -= 50L;
this.C();
}
-@@ -412,6 +567,12 @@
+@@ -412,6 +572,12 @@
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@@ -392,7 +398,7 @@
this.B();
}
-@@ -455,7 +616,7 @@
+@@ -455,7 +621,7 @@
protected void B() {}
@@ -401,7 +407,7 @@
long i = System.nanoTime();
++this.ticks;
-@@ -481,7 +642,7 @@
+@@ -481,7 +647,7 @@
this.q.b().a(agameprofile);
}
@@ -410,7 +416,7 @@
this.methodProfiler.a("save");
this.v.savePlayers();
this.saveChunks(true);
-@@ -516,20 +677,40 @@
+@@ -516,20 +682,40 @@
this.methodProfiler.c("levels");
@@ -454,7 +460,7 @@
this.methodProfiler.a("tick");
-@@ -556,9 +737,9 @@
+@@ -556,9 +742,9 @@
worldserver.getTracker().updatePlayers();
this.methodProfiler.b();
this.methodProfiler.b();
@@ -466,7 +472,7 @@
}
this.methodProfiler.c("connection");
-@@ -582,10 +763,11 @@
+@@ -582,10 +768,11 @@
this.o.add(itickable);
}
@@ -479,7 +485,7 @@
boolean flag = true;
String s = null;
String s1 = ".";
-@@ -630,13 +812,16 @@
+@@ -630,13 +817,16 @@
++j;
}
}
@@ -497,7 +503,7 @@
if (s != null) {
dedicatedserver.i(s);
}
-@@ -667,6 +852,25 @@
+@@ -667,6 +857,25 @@
dedicatedserver.stop();
}
});
@@ -523,7 +529,7 @@
} catch (Exception exception) {
MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception);
}
-@@ -674,8 +878,10 @@
+@@ -674,8 +883,10 @@
}
public void F() {
@@ -534,7 +540,7 @@
}
public File d(String s) {
-@@ -691,7 +897,14 @@
+@@ -691,7 +902,14 @@
}
public WorldServer getWorldServer(int i) {
@@ -550,7 +556,7 @@
}
public String getVersion() {
-@@ -715,7 +928,7 @@
+@@ -715,7 +933,7 @@
}
public boolean isDebugging() {
@@ -559,7 +565,7 @@
}
public void g(String s) {
-@@ -730,7 +943,7 @@
+@@ -730,7 +948,7 @@
}
public String getServerModName() {
@@ -568,7 +574,7 @@
}
public CrashReport b(CrashReport crashreport) {
-@@ -759,6 +972,7 @@
+@@ -759,6 +977,7 @@
}
public List<String> tabCompleteCommand(ICommandListener icommandlistener, String s, BlockPosition blockposition, boolean flag) {
@@ -576,7 +582,7 @@
ArrayList arraylist = Lists.newArrayList();
boolean flag1 = s.startsWith("/");
-@@ -801,10 +1015,13 @@
+@@ -801,10 +1020,13 @@
return arraylist;
}
@@ -591,7 +597,7 @@
}
public String getName() {
-@@ -860,8 +1077,10 @@
+@@ -860,8 +1082,10 @@
}
public void a(EnumDifficulty enumdifficulty) {
@@ -604,7 +610,7 @@
if (worldserver != null) {
if (worldserver.getWorldData().isHardcore()) {
-@@ -928,9 +1147,11 @@
+@@ -928,9 +1152,11 @@
int i = 0;
if (this.worldServer != null) {
@@ -619,7 +625,7 @@
WorldData worlddata = worldserver.getWorldData();
mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimensionManager().getDimensionID()));
-@@ -963,7 +1184,7 @@
+@@ -963,7 +1189,7 @@
public abstract boolean aa();
public boolean getOnlineMode() {
@@ -628,7 +634,7 @@
}
public void setOnlineMode(boolean flag) {
-@@ -1035,8 +1256,9 @@
+@@ -1035,8 +1261,9 @@
}
public void setGamemode(WorldSettings.EnumGamemode worldsettings_enumgamemode) {
@@ -640,7 +646,7 @@
}
}
-@@ -1068,7 +1290,7 @@
+@@ -1068,7 +1295,7 @@
}
public World getWorld() {
@@ -649,7 +655,7 @@
}
public Entity f() {
-@@ -1139,8 +1361,10 @@
+@@ -1139,8 +1366,10 @@
WorldServer[] aworldserver = this.worldServer;
int i = aworldserver.length;
@@ -662,7 +668,7 @@
if (worldserver != null) {
Entity entity = worldserver.getEntity(uuid);
-@@ -1155,7 +1379,7 @@
+@@ -1155,7 +1384,7 @@
}
public boolean getSendCommandFeedback() {
@@ -671,7 +677,7 @@
}
public void a(CommandObjectiveExecutor.EnumCommandResult commandobjectiveexecutor_enumcommandresult, int i) {}
-@@ -1170,7 +1394,7 @@
+@@ -1170,7 +1399,7 @@
public <V> ListenableFuture<V> a(Callable<V> callable) {
Validate.notNull(callable);
@@ -680,7 +686,7 @@
ListenableFutureTask listenablefuturetask = ListenableFutureTask.create(callable);
Queue queue = this.j;
-@@ -1215,4 +1439,11 @@
+@@ -1215,4 +1444,11 @@
public int a(WorldServer worldserver) {
return worldserver != null ? worldserver.getGameRules().c("spawnRadius") : 10;
}