diff --git a/Spigot-Server-Patches/Improve-autosave-mechanism.patch b/Spigot-Server-Patches/Improve-autosave-mechanism.patch deleted file mode 100644 index 2475fda588..0000000000 --- a/Spigot-Server-Patches/Improve-autosave-mechanism.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 28 Nov 2014 13:47:24 -0600 -Subject: [PATCH] Improve autosave mechanism - -Only save modified chunks, or chunks with entities after 4 auto save passes - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -0,0 +0,0 @@ public class Chunk { - if (this.r && this.world.getTime() != this.lastSaved || this.q) { - return true; - } -- } else if (this.r && this.world.getTime() >= this.lastSaved + 600L) { -+ } else if (this.r && this.world.getTime() >= + MinecraftServer.getServer().autosavePeriod * 4) { // PaperSpigot - Only save if we've passed 2 auto save intervals without modification - return true; - } - -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs - // Spigot Start - // We replace this with saving each individual world as this.saveChunks(...) is broken, - // and causes the main thread to sleep for random amounts of time depending on chunk activity -+ // Also pass flag to only save modified chunks -- PaperSpigot - server.playerCommandState = true; - for (World world : worlds) { -- world.getWorld().save(); -+ world.getWorld().save(true); - } - server.playerCommandState = false; - // this.saveChunks(true); -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -0,0 +0,0 @@ public class CraftWorld implements World { - } - - public void save() { -+ // PaperSpigot start - Improved autosave -+ save(true); -+ } -+ -+ public void save(boolean forceSave) { -+ // PaperSpigot end - this.server.checkSaveState(); - try { - boolean oldSave = world.savingDisabled; - - world.savingDisabled = false; -- world.save(true, null); -+ world.save(forceSave, null); - - world.savingDisabled = oldSave; - } catch (ExceptionWorldConflict ex) { --- \ No newline at end of file diff --git a/Spigot-Server-Patches/POM-changes.patch b/Spigot-Server-Patches/POM-changes.patch index dd5fdeed1f..14fba30a64 100644 --- a/Spigot-Server-Patches/POM-changes.patch +++ b/Spigot-Server-Patches/POM-changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Tue, 2 Dec 2014 00:35:01 -0600 +Date: Fri, 5 Dec 2014 22:04:50 -0600 Subject: [PATCH] POM changes @@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 jar compile @@ -0,0 +0,0 @@ - + - ex-spigot diff --git a/Spigot-Server-Patches/Player-lookup-improvements.patch b/Spigot-Server-Patches/Player-lookup-improvements.patch index 823887b14e..4835da0cac 100644 --- a/Spigot-Server-Patches/Player-lookup-improvements.patch +++ b/Spigot-Server-Patches/Player-lookup-improvements.patch @@ -87,8 +87,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 while (iterator.hasNext()) { entityplayer = (EntityPlayer) iterator.next(); -+ */ ++ */ + if ((entityplayer = uuidMap.get(uuid)) != null) { ++ // PaperSpigot end entityplayer.playerConnection.disconnect("You logged in from another location"); } @@ -157,22 +158,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // PaperSpigot start - Improved player lookup, replace whole method + EntityPlayer player = playerList.playerMap.get(name); + return player != null ? player.getBukkitEntity() : null; -+ // PaperSpigot end - } - - // TODO: In 1.8+ this should use the server's UUID->EntityPlayer map - @Override - public Player getPlayer(UUID id) { -- for (Player player : getOnlinePlayers()) { -- if (player.getUniqueId().equals(id)) { -- return player; -- } -- } -- -- return null; -+ // PaperSpigot start - Improved player lookup, replace whole method -+ EntityPlayer player = playerList.uuidMap.get(id); -+ return player != null ? player.getBukkitEntity() : null; + // PaperSpigot end }