Prepare for restart / crash detection rewrite.

This commit is contained in:
md_5 2013-02-23 11:50:29 +11:00
parent 24c14b8aef
commit 421ce6cf7d
24 changed files with 95 additions and 500 deletions

View File

@ -1,6 +1,6 @@
From a07bdb7064b9f0e6408d06ee7e827711d198ddd6 Mon Sep 17 00:00:00 2001
From 39ee91305fceb9c3c57cfb73471b0e760af3af80 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 12:21:52 +1100
Date: Sat, 23 Feb 2013 11:47:02 +1100
Subject: [PATCH] Spigot changes.
---
@ -14,36 +14,27 @@ Subject: [PATCH] Spigot changes.
src/main/java/net/minecraft/server/BlockReed.java | 2 +-
.../java/net/minecraft/server/BlockSapling.java | 2 +-
src/main/java/net/minecraft/server/BlockStem.java | 2 +-
.../net/minecraft/server/ChunkRegionLoader.java | 35 +++-
.../net/minecraft/server/ChunkRegionLoader.java | 35 +++--
.../java/net/minecraft/server/ChunkSection.java | 31 +++-
src/main/java/net/minecraft/server/EntityItem.java | 3 +-
.../java/net/minecraft/server/EntitySquid.java | 4 -
.../java/net/minecraft/server/MinecraftServer.java | 3 +
.../net/minecraft/server/PlayerConnection.java | 18 +-
.../net/minecraft/server/PlayerConnection.java | 18 ++-
src/main/java/net/minecraft/server/PlayerList.java | 10 +-
.../net/minecraft/server/ThreadLoginVerifier.java | 23 +++
src/main/java/net/minecraft/server/World.java | 200 ++++++++++++++++++---
.../java/net/minecraft/server/WorldServer.java | 121 ++++++++++---
.../java/org/bukkit/craftbukkit/CraftServer.java | 93 +++++++---
.../java/org/bukkit/craftbukkit/CraftWorld.java | 76 +++++++-
src/main/java/org/bukkit/craftbukkit/Spigot.java | 23 +++
src/main/java/net/minecraft/server/World.java | 161 ++++++++++++++++++---
.../java/net/minecraft/server/WorldServer.java | 121 +++++++++++++---
.../java/org/bukkit/craftbukkit/CraftServer.java | 45 +++---
.../java/org/bukkit/craftbukkit/CraftWorld.java | 76 +++++++++-
src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 +++
.../craftbukkit/chunkio/ChunkIOProvider.java | 2 +-
.../bukkit/craftbukkit/command/RestartCommand.java | 24 +++
.../org/bukkit/craftbukkit/entity/CraftPlayer.java | 7 +
.../bukkit/craftbukkit/util/ExceptionHandler.java | 31 ++++
.../bukkit/craftbukkit/util/ExceptionReporter.java | 26 +++
.../java/org/bukkit/craftbukkit/util/FlatMap.java | 34 ++++
.../java/org/bukkit/craftbukkit/util/FlatMap.java | 34 +++++
.../org/bukkit/craftbukkit/util/LongHashSet.java | 11 +-
.../bukkit/craftbukkit/util/LongObjectHashMap.java | 5 +
.../bukkit/craftbukkit/util/WatchdogThread.java | 88 +++++++++
src/main/resources/configurations/bukkit.yml | 30 ++++
33 files changed, 828 insertions(+), 100 deletions(-)
src/main/resources/configurations/bukkit.yml | 27 ++++
28 files changed, 564 insertions(+), 99 deletions(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
create mode 100644 src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java
create mode 100644 src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java
create mode 100644 src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java
create mode 100644 src/main/java/org/bukkit/craftbukkit/util/FlatMap.java
create mode 100644 src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java
diff --git a/.gitignore b/.gitignore
index a689360..b97a549 100644
@ -370,34 +361,6 @@ index 961d83a..188d477 100644
public void c() {
super.c();
this.e = this.d;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4bdf8aa..955a3ac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -454,6 +454,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.a(crashreport);
} finally {
+ org.bukkit.craftbukkit.util.WatchdogThread.stopping(); // Spigot
try {
this.stop();
this.isStopped = true;
@@ -605,6 +606,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
this.methodProfiler.b();
+ org.bukkit.craftbukkit.util.WatchdogThread.tick(); // Spigot
}
public boolean getAllowNether() {
@@ -708,6 +710,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
dedicatedserver.an();
}
*/
+ dedicatedserver.primaryThread.setUncaughtExceptionHandler(new org.bukkit.craftbukkit.util.ExceptionHandler()); // Spigot
dedicatedserver.primaryThread.start();
// Runtime.getRuntime().addShutdownHook(new ThreadShutdown(dedicatedserver));
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fac9ea5..43a24f5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
@ -506,7 +469,7 @@ index 0686ba0..58d30eb 100644
URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c3dc4a4..9906b9e 100644
index c3dc4a4..6c9857b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -65,7 +65,7 @@ public abstract class World implements IBlockAccess {
@ -671,46 +634,7 @@ index c3dc4a4..9906b9e 100644
double d0 = 0.25D;
List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0));
@@ -1313,7 +1409,37 @@ public abstract class World implements IBlockAccess {
this.entityJoinedWorld(entity, true);
}
- public void entityJoinedWorld(Entity entity, boolean flag) {
+ // Spigot start
+ public int tickEntityExceptions = 0;
+ public void entityJoinedWorld(final Entity entity, final boolean flag) {
+ if (entity == null) {
+ return;
+ }
+ try {
+ tickEntity(entity, flag);
+ } catch (Exception e) {
+ try {
+ tickEntityExceptions++;
+ List<String> report = new ArrayList<String>();
+ report.add("Spigot has detected an unexpected exception while handling");
+ if (!(entity instanceof EntityPlayer)) {
+ report.add("entity " + entity.toString() + " (id: " + entity.id + ")");
+ report.add("Spigot will kill the entity from the game instead of crashing your server.");
+ entity.die();
+ } else {
+ report.add("player '" + ((EntityPlayer) entity).name + "'. They will be kicked instead of crashing your server.");
+ ((EntityPlayer) entity).getBukkitEntity().kickPlayer("The server experienced and error and was forced to kick you. Please re-login.");
+ }
+ org.bukkit.craftbukkit.util.ExceptionReporter.handle(e, report.toArray(new String[0]));
+ } catch (Throwable t) {
+ org.bukkit.craftbukkit.util.ExceptionReporter.handle(t, "Spigot has detected an unexpected exception while attempting to handle an exception (yes you read that correctly).");
+ Bukkit.shutdown();
+ }
+ }
+ }
+
+ public void tickEntity(Entity entity, boolean flag) {
+ // Spigot end
int i = MathHelper.floor(entity.locX);
int j = MathHelper.floor(entity.locZ);
byte b0 = 32;
@@ -1894,6 +2020,11 @@ public abstract class World implements IBlockAccess {
@@ -1894,6 +1990,11 @@ public abstract class World implements IBlockAccess {
this.worldData.setWeatherDuration(1);
}
@ -722,7 +646,7 @@ index c3dc4a4..9906b9e 100644
protected void z() {
// this.chunkTickList.clear(); // CraftBukkit - removed
this.methodProfiler.a("buildList");
@@ -1903,25 +2034,42 @@ public abstract class World implements IBlockAccess {
@@ -1903,25 +2004,42 @@ public abstract class World implements IBlockAccess {
int j;
int k;
@ -779,7 +703,7 @@ index c3dc4a4..9906b9e 100644
this.methodProfiler.b();
if (this.N > 0) {
@@ -1929,7 +2077,7 @@ public abstract class World implements IBlockAccess {
@@ -1929,7 +2047,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.a("playerCheckLight");
@ -788,24 +712,7 @@ index c3dc4a4..9906b9e 100644
i = this.random.nextInt(this.players.size());
entityhuman = (EntityHuman) this.players.get(i);
j = MathHelper.floor(entityhuman.locX) + this.random.nextInt(11) - 5;
@@ -1968,9 +2116,16 @@ public abstract class World implements IBlockAccess {
chunk.o();
}
+ // Spigot start
protected void g() {
+ try {
this.z();
}
+ catch (Exception e) {
+ org.bukkit.craftbukkit.util.ExceptionReporter.handle(e, "Spigot has detected an unexpected exception while ticking chunks");
+ }
+ }
+ // Spigot end
public boolean w(int i, int j, int k) {
return this.c(i, j, k, false);
@@ -2308,7 +2463,10 @@ public abstract class World implements IBlockAccess {
@@ -2308,7 +2426,10 @@ public abstract class World implements IBlockAccess {
}
public List getEntities(Entity entity, AxisAlignedBB axisalignedbb) {
@ -817,7 +724,7 @@ index c3dc4a4..9906b9e 100644
int i = MathHelper.floor((axisalignedbb.a - 2.0D) / 16.0D);
int j = MathHelper.floor((axisalignedbb.d + 2.0D) / 16.0D);
int k = MathHelper.floor((axisalignedbb.c - 2.0D) / 16.0D);
@@ -2317,12 +2475,12 @@ public abstract class World implements IBlockAccess {
@@ -2317,12 +2438,12 @@ public abstract class World implements IBlockAccess {
for (int i1 = i; i1 <= j; ++i1) {
for (int j1 = k; j1 <= l; ++j1) {
if (this.isChunkLoaded(i1, j1)) {
@ -1061,7 +968,7 @@ index 3f73ef9..7032c61 100644
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e7c0760..2b3c60a 100644
index e7c0760..257497e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -146,7 +146,7 @@ public final class CraftServer implements Server {
@ -1185,59 +1092,6 @@ index e7c0760..2b3c60a 100644
} catch (CommandException ex) {
player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command");
getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
@@ -1341,4 +1346,52 @@ public final class CraftServer implements Server {
public CraftItemFactory getItemFactory() {
return CraftItemFactory.instance();
}
+
+ // Spigot start
+ public void restart() {
+ try {
+ String startupScript = configuration.getString("settings.restart-script-location", "");
+ File file = new File(startupScript);
+ if (file.isFile()) {
+ System.out.println("Attempting to restart with " + startupScript);
+
+ // Kick all players
+ for (Player p : this.getOnlinePlayers()) {
+ ((org.bukkit.craftbukkit.entity.CraftPlayer) p).kickPlayer("Server is restarting", true);
+ }
+ // Give the socket a chance to send the packets
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException ex) {
+ }
+ // Close the socket so we can rebind with the new process
+ this.getServer().ae().a();
+
+ // Give time for it to kick in
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException ex) {
+ }
+
+ // Actually shutdown
+ try {
+ this.getServer().stop();
+ } catch (Throwable t) {
+ }
+
+ String os = System.getProperty("os.name").toLowerCase();
+ if (os.contains("win")) {
+ Runtime.getRuntime().exec("cmd /c start " + file.getPath());
+ } else {
+ Runtime.getRuntime().exec(file.getPath());
+ }
+ System.exit(0);
+ } else {
+ System.out.println("Startup script '" + startupScript + "' does not exist!");
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 6e364b1..45217cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@ -1327,21 +1181,18 @@ index 6e364b1..45217cd 100644
return getChunkAt(x >> 4, z >> 4).getBlock(x & 0xF, y & 0xFF, z & 0xF);
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
new file mode 100644
index 0000000..eab9abe
index 0000000..4a4f949
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -0,0 +1,23 @@
@@ -0,0 +1,20 @@
+package org.bukkit.craftbukkit;
+
+import org.bukkit.command.SimpleCommandMap;
+import org.bukkit.configuration.file.YamlConfiguration;
+
+public class Spigot {
+
+ public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
+ commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
+
+ org.bukkit.craftbukkit.util.WatchdogThread.startThread(configuration.getInt("settings.timeout-time", 180), configuration.getBoolean("settings.restart-on-crash", false));
+
+ server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage);
+ server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage);
+ server.logCommands = configuration.getBoolean("settings.log-commands", true);
@ -1367,37 +1218,6 @@ index 48cf5ba..1d4764c 100644
return;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java b/src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java
new file mode 100644
index 0000000..fba4b4a
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java
@@ -0,0 +1,24 @@
+package org.bukkit.craftbukkit.command;
+
+import org.bukkit.Bukkit;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.craftbukkit.CraftServer;
+
+public class RestartCommand extends Command {
+ public RestartCommand(String name) {
+ super(name);
+ this.description = "Restarts the server";
+ this.usageMessage = "/restart";
+ this.setPermission("bukkit.command.restart");
+ }
+
+ @Override
+ public boolean execute(CommandSender sender, String currentAlias, String[] args) {
+ if (!testPermission(sender)) return true;
+
+ ((CraftServer)Bukkit.getServer()).restart();
+
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f8dbbee..c79f352 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@ -1420,75 +1240,6 @@ index f8dbbee..c79f352 100644
public void setCompassTarget(Location loc) {
if (getHandle().playerConnection == null) return;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java b/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java
new file mode 100644
index 0000000..7ee3665
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java
@@ -0,0 +1,31 @@
+package org.bukkit.craftbukkit.util;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.CraftServer;
+
+public class ExceptionHandler implements UncaughtExceptionHandler {
+
+ public void uncaughtException(Thread t, Throwable e) {
+ Logger log = ((CraftServer) Bukkit.getServer()).getLogger();
+ log.log(Level.SEVERE, "The server has crashed!");
+ log.log(Level.SEVERE, "Please report this to http://www.spigotmc.org/!");
+ log.log(Level.SEVERE, "Begin Exception Trace:");
+ log.log(Level.SEVERE, "");
+ StackTraceElement[] stack = e.getStackTrace();
+ for (int line = 0; line < stack.length; line++) {
+ log.log(Level.SEVERE, " " + stack[line].toString());
+ }
+ log.log(Level.SEVERE, "End Exception Trace:");
+ log.log(Level.SEVERE, "");
+ log.log(Level.SEVERE, "Begin Thread Stack Trace:");
+ stack = t.getStackTrace();
+ for (int line = 0; line < stack.length; line++) {
+ log.log(Level.SEVERE, " " + stack[line].toString());
+ }
+ log.log(Level.SEVERE, "End Exception Trace:");
+ log.log(Level.SEVERE, "");
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java b/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java
new file mode 100644
index 0000000..a396f17
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java
@@ -0,0 +1,26 @@
+package org.bukkit.craftbukkit.util;
+
+import org.bukkit.Bukkit;
+
+public final class ExceptionReporter {
+
+ public static void handle(Throwable t, String... messages) {
+ for (String message : messages) {
+ Bukkit.getLogger().severe(message);
+ }
+ Bukkit.getLogger().severe("Spigot recommends you report this to http://www.spigotmc.org/");
+ Bukkit.getLogger().severe("");
+ Bukkit.getLogger().severe("Spigot version: " + Bukkit.getBukkitVersion());
+ Bukkit.getLogger().severe("Exception Trace Begins:");
+ StackTraceElement[] stack = t.getStackTrace();
+ for (int line = 0; line < stack.length; line++) {
+ Bukkit.getLogger().severe(" " + stack[line].toString());
+ }
+ Bukkit.getLogger().severe("Exception Trace Ends.");
+ Bukkit.getLogger().severe("");
+ }
+
+ public static void handle(Throwable t) {
+ handle(t, "Spigot has encountered an unexpected exception!");
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/FlatMap.java b/src/main/java/org/bukkit/craftbukkit/util/FlatMap.java
new file mode 100644
index 0000000..e8a7725
@ -1618,111 +1369,14 @@ index 01861cc..dbd33fa 100644
int index = (int) (keyIndex(key) & (BUCKET_SIZE - 1));
long[] inner = keys[index];
if (inner == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java b/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java
new file mode 100644
index 0000000..da6df8f
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java
@@ -0,0 +1,88 @@
+package org.bukkit.craftbukkit.util;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.CraftServer;
+
+public class WatchdogThread extends Thread {
+
+ private static WatchdogThread instance;
+ private static final String LINE = "------------------------------";
+ private AtomicLong lastTick = new AtomicLong(System.currentTimeMillis());
+ private final long timeoutTime;
+ private final boolean restart;
+ private boolean stopping;
+
+ private WatchdogThread(long timeoutTime, boolean restart) {
+ super("Spigot Watchdog Thread");
+ this.timeoutTime = timeoutTime;
+ this.restart = restart;
+ }
+
+ public static void startThread(int timeoutTime, boolean restart) {
+ if (instance == null) {
+ instance = new WatchdogThread(timeoutTime * 1000L, restart);
+ instance.start();
+ }
+ instance.stopping = false;
+ }
+
+ public static void tick() {
+ instance.lastTick.set(System.currentTimeMillis());
+ }
+
+ public static void stopping() {
+ if (instance != null) {
+ instance.stopping = true;
+ }
+ }
+
+ @Override
+ public void run() {
+ while (!this.isInterrupted()) {
+ try {
+ sleep(10000);
+ } catch (InterruptedException ignore) {
+ }
+ if (stopping)
+ continue;
+ if (System.currentTimeMillis() > (lastTick.get() + timeoutTime)) {
+ Logger log = ((CraftServer) Bukkit.getServer()).getLogger();
+ log.log(Level.SEVERE, "The server has stopped responding!");
+ log.log(Level.SEVERE, "Please report this to http://www.spigotmc.org/!");
+ log.log(Level.SEVERE, "Spigot version: " + Bukkit.getBukkitVersion());
+ log.log(Level.SEVERE, "Begin Exception Trace For All Threads:");
+ Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces();
+ Iterator<Entry<Thread, StackTraceElement[]>> i = traces.entrySet().iterator();
+ while (i.hasNext()) {
+ Entry<Thread, StackTraceElement[]> entry = i.next();
+ Thread thread = entry.getKey();
+ if (thread.getState() != State.WAITING) {
+ System.err.println(LINE);
+
+ log.log(Level.SEVERE, "Current Thread: " + thread.getName());
+ log.log(Level.SEVERE, " PID: " + thread.getId() + " | Alive: " + thread.isAlive() + " | State: " + thread.getState());
+ log.log(Level.SEVERE, " Stack:");
+ StackTraceElement[] stack = entry.getValue();
+ for (int line = 0; line < stack.length; line++) {
+ log.log(Level.SEVERE, " " + stack[line].toString());
+ }
+ }
+ }
+ System.err.println(LINE);
+
+ if (this.restart) {
+ ((CraftServer) Bukkit.getServer()).restart();
+ }
+
+ //Give up
+ this.interrupt();
+ }
+ }
+ }
+}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 61a95e3..5262ae1 100644
index 61a95e3..f44d5d0 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -25,6 +25,36 @@ settings:
@@ -25,6 +25,33 @@ settings:
query-plugins: true
deprecated-verbose: default
shutdown-message: Server closed
+ restart-script-location: start.bat
+ timeout-time: 180
+ restart-on-crash: false
+ filter-unsafe-ips: false
+ whitelist-message: You are not white-listed on this server!
+ log-commands: true

View File

@ -1,4 +1,4 @@
From f303848293ac86066ccea4f00947253af6e9c8f0 Mon Sep 17 00:00:00 2001
From 8a6dee291c36ec103e28624da71583f6eb863dde Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Sat, 12 Jan 2013 19:57:45 +1100
Subject: [PATCH] Per world view distance.
@ -10,7 +10,7 @@ Subject: [PATCH] Per world view distance.
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a42aa1e..842d722 100644
index 7032c61..4aa2a19 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -49,7 +49,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
@ -53,10 +53,10 @@ index 45217cd..94e07fe 100644
public int wheatGrowthModifier = 100;
public int cactusGrowthModifier = 100;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 55bfb77..9d6d613 100644
index f44d5d0..0c92b66 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -52,6 +52,7 @@ world-settings:
@@ -49,6 +49,7 @@ world-settings:
world:
growth-chunks-per-tick: 1000
world_nether:

View File

@ -1,46 +0,0 @@
From 266474a8588a30de49a7c2a883dde257b7e001ee Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Thu, 10 Jan 2013 12:33:37 +1100
Subject: [PATCH] Update timeout time to new default value.
---
src/main/java/org/bukkit/craftbukkit/Spigot.java | 9 ++++++++-
src/main/resources/configurations/bukkit.yml | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index a53c7b0..30bc542 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -7,7 +7,14 @@ public class Spigot {
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
- org.bukkit.craftbukkit.util.WatchdogThread.startThread(configuration.getInt("settings.timeout-time", 180), configuration.getBoolean("settings.restart-on-crash", false));
+ int timeout = configuration.getInt("settings.timeout-time", 300);
+ if (timeout == 180) {
+ timeout = 300;
+ server.getLogger().info("Migrating to new timeout time of 300");
+ configuration.set("settings.timeout-time", timeout);
+ server.saveConfig();
+ }
+ org.bukkit.craftbukkit.util.WatchdogThread.startThread(timeout, configuration.getBoolean("settings.restart-on-crash", false));
server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage);
server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage);
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 5262ae1..55bfb77 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -26,7 +26,7 @@ settings:
deprecated-verbose: default
shutdown-message: Server closed
restart-script-location: start.bat
- timeout-time: 180
+ timeout-time: 300
restart-on-crash: false
filter-unsafe-ips: false
whitelist-message: You are not white-listed on this server!
--
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 25d363d1f0fdc54987a6d6bc6f06eb53c6129637 Mon Sep 17 00:00:00 2001
From b5b44a60c5a1f64ba4ce828bb5fa112e1552cd72 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 11 Jan 2013 11:08:45 -0500
Subject: [PATCH] Fix various crop growth modifier formula issues

View File

@ -1,4 +1,4 @@
From c88bb483e5104872c4492f006b107625f9c91939 Mon Sep 17 00:00:00 2001
From 5403a45cb37298605612b7b059ea963a09afa453 Mon Sep 17 00:00:00 2001
From: Agaricus <agaricusb@yahoo.com>
Date: Sun, 13 Jan 2013 03:41:38 -0800
Subject: [PATCH] Add OldChunkLoader from mc-dev for diff visibility

View File

@ -1,4 +1,4 @@
From 6d940cd4bc4a1b7ba8e918f25711e916274adb4d Mon Sep 17 00:00:00 2001
From 69eceb5d0258629d174e17d5a8e3547e196e2138 Mon Sep 17 00:00:00 2001
From: Agaricus <agaricusb@yahoo.com>
Date: Sun, 13 Jan 2013 03:49:07 -0800
Subject: [PATCH] Fix mcRegion-to-Anvil conversion

View File

@ -1,4 +1,4 @@
From e9aa88610fc3b464adc357a0b6bd435032e41a7d Mon Sep 17 00:00:00 2001
From c202dc309048355e8243da6950dc27bbf2753ac9 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Tue, 15 Jan 2013 15:05:02 +1100
Subject: [PATCH] Update versioning check to correctly resolve api version.

View File

@ -1,4 +1,4 @@
From c11561f896f9b4445894ad7e1c69505d1b567597 Mon Sep 17 00:00:00 2001
From 2510ee47cc0bc0a9dc98effad61b9e8835192235 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Fri, 18 Jan 2013 16:20:01 +0500
Subject: [PATCH] Optimize packet used to unload chunks for the client

View File

@ -1,4 +1,4 @@
From 54137647a6488134d5268180e083f4ab05ae8215 Mon Sep 17 00:00:00 2001
From e82bcce15b5b93aaaf2eb09c47f44db1d735ff51 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 19 Jan 2013 01:11:30 -0500
Subject: [PATCH] Skip entity.move() if we are not moving anywhere.
@ -8,7 +8,7 @@ Subject: [PATCH] Skip entity.move() if we are not moving anywhere.
1 file changed, 1 insertion(+)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 26b7a1f..2340fad 100644
index 71707ed..d0a58f8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -423,6 +423,7 @@ public abstract class Entity {

View File

@ -1,4 +1,4 @@
From 040e9d8a5a8437a06bbd4531fc788144defd447d Mon Sep 17 00:00:00 2001
From 66bf9228164154e0da57d1a8dbabc6837b2da2f8 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 16 Jan 2013 15:27:22 -0600
Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache
@ -8,7 +8,7 @@ Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1e36467..e2426bc 100644
index b1dd29e..41f4f31 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -297,15 +297,13 @@ public abstract class World implements IBlockAccess {

View File

@ -1,4 +1,4 @@
From c7e5718f1f1357d6dccdde091ee8598abc120cc1 Mon Sep 17 00:00:00 2001
From ede0d69949d7d00980598f1944de83052162deb4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Add Custom Timings to various points
@ -210,7 +210,7 @@ index 43a24f5..7ca0acf 100644
/* CraftBukkit start - No longer needed as we have already handled it in server.dispatchServerCommand above.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e2426bc..9b7bc02 100644
index 41f4f31..c914461 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
@ -325,5 +325,5 @@ index 0000000..bb0c191
+ }
+}
--
1.8.1.1
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From cde68c3d5bc4581749a7cf6afbd91a8213a2e1d5 Mon Sep 17 00:00:00 2001
From f36116f21a496382c52e7cd3f0f97820c183fc49 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 25 Jan 2013 18:24:54 +1100
Subject: [PATCH] Better + more flexible itemstack merging
@ -40,7 +40,7 @@ index a7baa0f..5e3ac84 100644
}
} else {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9b7bc02..262290f 100644
index c914461..88007c3 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -923,31 +923,8 @@ public abstract class World implements IBlockAccess {

View File

@ -1,4 +1,4 @@
From 418300d476c22377bddb9789d3b434ac4a649a7e Mon Sep 17 00:00:00 2001
From 2bbaa8a04d59da56e08aa738dfc96b19c8f01db4 Mon Sep 17 00:00:00 2001
From: lishid <lishid@gmail.com>
Date: Sat, 16 Feb 2013 10:05:25 +1100
Subject: [PATCH] Add oreobfuscator for Spigot.
@ -123,7 +123,7 @@ index 5faee12..55f9ffa 100644
if (false) { // Never trigger
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a7785b7..204af22 100644
index 257497e..1a3cc03 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -163,6 +163,12 @@ public final class CraftServer implements Server {
@ -305,10 +305,10 @@ index 0000000..3e74103
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index 8dda8b8..2600de4 100644
index 4a4f949..3bfeb49 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -23,6 +23,14 @@ public class Spigot {
@@ -13,6 +13,14 @@ public class Spigot {
server.commandComplete = configuration.getBoolean("settings.command-complete", true);
server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions");
@ -324,10 +324,10 @@ index 8dda8b8..2600de4 100644
server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!");
}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 9d6d613..3228d17 100644
index 0c92b66..78e9a66 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -84,3 +84,9 @@ database:
@@ -81,3 +81,9 @@ database:
driver: org.sqlite.JDBC
password: walrus
url: jdbc:sqlite:{DIR}{NAME}.db

View File

@ -1,4 +1,4 @@
From e9079818151c8df92e2d927b0f4f3308d9cea113 Mon Sep 17 00:00:00 2001
From aedb805a7d9546c33994de3acee0da1814c0f6b5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Jan 2013 19:31:14 -0500
Subject: [PATCH] Reduce number of LivingEntity collision checks.
@ -33,5 +33,5 @@ index b2481aa..bbbb008 100644
this.o(entity);
}
--
1.8.1.1
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 1c18e9b73bc9b0bce7ee99f0abf89b34b454b806 Mon Sep 17 00:00:00 2001
From 7a0b264ffa3d6c7d4110f3e25059cc3f1bffee88 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Jan 2013 13:25:53 -0500
Subject: [PATCH] Only count entities in chunks being processed for the spawn

View File

@ -1,4 +1,4 @@
From c990d9e10a9a8285c8d408c6cb665c1f1e640545 Mon Sep 17 00:00:00 2001
From 2a34593e2cd2cff381e8d6d6e1a1427221cd24c4 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 2 Feb 2013 19:40:53 +1100
Subject: [PATCH] Send maps a lot less often to combat the lag they cause.
@ -24,7 +24,7 @@ index a026c4c..27a548f 100644
ItemStack i5 = i4.i();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 204af22..f00b28d 100644
index 1a3cc03..6c7fa4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -179,6 +179,7 @@ public final class CraftServer implements Server {
@ -36,10 +36,10 @@ index 204af22..f00b28d 100644
static {
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index b124dab..c712b52 100644
index 3bfeb49..5827820 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -22,6 +22,7 @@ public class Spigot {
@@ -12,6 +12,7 @@ public class Spigot {
server.ipFilter = configuration.getBoolean("settings.filter-unsafe-ips", false);
server.commandComplete = configuration.getBoolean("settings.command-complete", true);
server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions");
@ -48,10 +48,10 @@ index b124dab..c712b52 100644
server.orebfuscatorEnabled = configuration.getBoolean("orebfuscator.enable", false);
server.orebfuscatorEngineMode = configuration.getInt("orebfuscator.engine-mode", 1);
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 3228d17..3122a14 100644
index 78e9a66..548f7c1 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -34,6 +34,7 @@ settings:
@@ -31,6 +31,7 @@ settings:
command-complete: true
spam-exclusions:
- /skill

View File

@ -1,4 +1,4 @@
From c8578420f6c44d29e5f93dfbcee0b861c16794bd Mon Sep 17 00:00:00 2001
From 04cff8e45e1fe99b3679b15d672c41ac1de31ffb Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 09:20:19 +1100
Subject: [PATCH] Detect, remove and warn about null tile entities.
@ -8,7 +8,7 @@ Subject: [PATCH] Detect, remove and warn about null tile entities.
1 file changed, 7 insertions(+)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 262290f..cd7ad64 100644
index 88007c3..9f05a52 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1302,6 +1302,13 @@ public abstract class World implements IBlockAccess {

View File

@ -1,17 +1,17 @@
From c7b127737d0df2cfbbae9fa5abe6bbb85312139a Mon Sep 17 00:00:00 2001
From 5edc0ce11f85c023f0d9afb33dc152d0e26bd15f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 12:28:17 +1100
Subject: [PATCH] Tick loop optimization - sleep for as long as possible.
---
.../java/net/minecraft/server/MinecraftServer.java | 50 +++++++++-------------
src/main/java/org/bukkit/craftbukkit/Spigot.java | 1 +
src/main/java/org/bukkit/craftbukkit/Spigot.java | 2 +
.../craftbukkit/command/TicksPerSecondCommand.java | 35 +++++++++++++++
3 files changed, 56 insertions(+), 30 deletions(-)
3 files changed, 57 insertions(+), 30 deletions(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 955a3ac..99a6cf4 100644
index 4bdf8aa..128016f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -86,6 +86,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@ -82,17 +82,18 @@ index 955a3ac..99a6cf4 100644
this.a((CrashReport) null);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index c712b52..582dbab 100644
index 5827820..1ead152 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -6,6 +6,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@@ -6,6 +6,8 @@ import org.bukkit.configuration.file.YamlConfiguration;
public class Spigot {
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
+ commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps"));
int timeout = configuration.getInt("settings.timeout-time", 300);
if (timeout == 180) {
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
+ commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps"));
+
server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage);
server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage);
server.logCommands = configuration.getBoolean("settings.log-commands", true);
diff --git a/src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java b/src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java
new file mode 100644
index 0000000..f114a31

View File

@ -1,4 +1,4 @@
From 4383e778b06659440cd8ce0e62366b035387c6d1 Mon Sep 17 00:00:00 2001
From affa8e15e1628d9210a4ace9cb14214cd19ec404 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 14 Feb 2013 17:32:20 +1100
Subject: [PATCH] Netty
@ -271,7 +271,7 @@ index 0000000..f25af14
+}
diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
new file mode 100644
index 0000000..baca853
index 0000000..fe978fe
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,229 @@

View File

@ -1,4 +1,4 @@
From 805e4bb891c7e5a8bcdec220fb952fec33cbc1dd Mon Sep 17 00:00:00 2001
From f097ee841d58b9a3051598d193d24c726331e668 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Feb 2013 19:45:09 +1100
Subject: [PATCH] Entity Activation Range# This feature gives 3 new
@ -10,12 +10,12 @@ This change can have dramatic impact on gameplay if configured too low. Balance
---
src/main/java/net/minecraft/server/Entity.java | 8 ++
.../java/net/minecraft/server/EntityArrow.java | 2 +-
src/main/java/net/minecraft/server/World.java | 10 +-
src/main/java/net/minecraft/server/World.java | 3 +-
.../java/org/bukkit/craftbukkit/CraftWorld.java | 13 ++
src/main/java/org/bukkit/craftbukkit/Spigot.java | 149 +++++++++++++++++++++
.../java/org/bukkit/event/WorldTimingsHandler.java | 2 +
src/main/resources/configurations/bukkit.yml | 3 +
7 files changed, 185 insertions(+), 2 deletions(-)
7 files changed, 178 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d0a58f8..9da5035 100644
@ -57,7 +57,7 @@ index 916b9dc..bdd18f6 100644
public int shake = 0;
public Entity shooter;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cd7ad64..53834a9 100644
index 9f05a52..b1ccf1f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1241,6 +1241,7 @@ public abstract class World implements IBlockAccess {
@ -68,21 +68,7 @@ index cd7ad64..53834a9 100644
timings.entityTick.startTiming(); // Spigot
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1405,6 +1406,13 @@ public abstract class World implements IBlockAccess {
if (entity == null) {
return;
}
+ if (!entity.isActivated && !org.bukkit.craftbukkit.Spigot.checkIfActive(entity)) {
+ if (entity.vehicle == null) {
+ entity.ticksLived++;
+ }
+ return;
+ }
+ entity.isActivated = entity.defaultActivationState;
try {
tickEntity(entity, flag);
} catch (Exception e) {
@@ -1434,7 +1442,7 @@ public abstract class World implements IBlockAccess {
@@ -1404,7 +1405,7 @@ public abstract class World implements IBlockAccess {
int j = MathHelper.floor(entity.locZ);
byte b0 = 32;
@ -137,7 +123,7 @@ index 21bd64a..a083ae4 100644
public Block getBlockAt(int x, int y, int z) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index 6eeabec..2a5fd45 100644
index 1ead152..a5b05ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -1,7 +1,10 @@
@ -150,8 +136,8 @@ index 6eeabec..2a5fd45 100644
+import java.util.List;
public class Spigot {
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
@@ -36,5 +39,151 @@ public class Spigot {
@@ -27,5 +30,151 @@ public class Spigot {
if (server.chunkGCPeriod == 0) {
server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!");
}
@ -323,10 +309,10 @@ index bb0c191..6a4a05e 100644
}
}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 3122a14..5933a88 100644
index 548f7c1..eea3265 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -50,6 +50,9 @@ world-settings:
@@ -47,6 +47,9 @@ world-settings:
sugar-growth-modifier: 100
tree-growth-modifier: 100
mushroom-growth-modifier: 100

View File

@ -1,4 +1,4 @@
From a5d69c6fac6168ba145722a1e79027428c015bc1 Mon Sep 17 00:00:00 2001
From 4210bd504bcd504a8557dd1e3c5cd584ea8086ad Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 16 Feb 2013 19:05:15 +1100
Subject: [PATCH] Infrequently send tab list updates.
@ -36,7 +36,7 @@ index d13fa19..3fc66aa 100644
public void sendAll(Packet packet) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index 2a5fd45..e0ecf21 100644
index a5b05ed..8c67fc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -7,6 +7,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@ -44,10 +44,10 @@ index 2a5fd45..e0ecf21 100644
public class Spigot {
+ public static boolean tabPing = false;
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps"));
@@ -40,6 +41,7 @@ public class Spigot {
@@ -31,6 +32,7 @@ public class Spigot {
server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!");
}
@ -56,10 +56,10 @@ index 2a5fd45..e0ecf21 100644
/**
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 5933a88..8ddda07 100644
index eea3265..a35f3dd 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -35,6 +35,7 @@ settings:
@@ -32,6 +32,7 @@ settings:
spam-exclusions:
- /skill
map-send-interval: 10000

View File

@ -1,4 +1,4 @@
From 67f4933a29bc5317157dbb033c8400ca26df6909 Mon Sep 17 00:00:00 2001
From f7fb19c794aab4eb7dcd6d052f367830714a79f3 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 20 Feb 2013 23:07:53 -0500
Subject: [PATCH] Optimize getTileEntities performance

View File

@ -1,4 +1,4 @@
From 58eaa4790c1875741e06017f81a32801cfc3f4ad Mon Sep 17 00:00:00 2001
From d5d64c9cc4c90075cca6aa720e5cab3109a4e5f1 Mon Sep 17 00:00:00 2001
From: shakytom <tom.roberts00@gmail.com>
Date: Wed, 20 Feb 2013 22:34:38 -0500
Subject: [PATCH] Improved tile entity lookup for chunk sending

View File

@ -1,4 +1,4 @@
From 9371abd26d6cac2503d48f67ce8a6580349027bd Mon Sep 17 00:00:00 2001
From ce3485e724f259f36bb13acbfdea7e7bb381b143 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 08:58:35 +1100
Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the
@ -11,7 +11,7 @@ Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the
create mode 100644 src/main/java/org/spigotmc/Metrics.java
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index e0ecf21..95ff3c1 100644
index 8c67fc3..5729cd6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -1,13 +1,19 @@
@ -31,10 +31,10 @@ index e0ecf21..95ff3c1 100644
public class Spigot {
public static boolean tabPing = false;
+ private static Metrics metrics;
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps"));
@@ -42,6 +48,15 @@ public class Spigot {
@@ -33,6 +39,15 @@ public class Spigot {
}
tabPing = configuration.getBoolean("settings.tab-ping", tabPing);