summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-03-29 08:25:59 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-29 08:41:41 -0400
commite0c01154b030c527815e884b6b331c5534ab247f (patch)
tree0d497242d880abb19cb0825457bd97eb8a84ec4c
parentcbab48a7bdd583f396f9e9803f16fef5616abcf4 (diff)
downloadcraftbukkit-e0c01154b030c527815e884b6b331c5534ab247f.tar
craftbukkit-e0c01154b030c527815e884b6b331c5534ab247f.tar.gz
craftbukkit-e0c01154b030c527815e884b6b331c5534ab247f.tar.lz
craftbukkit-e0c01154b030c527815e884b6b331c5534ab247f.tar.xz
craftbukkit-e0c01154b030c527815e884b6b331c5534ab247f.zip
Fixed potential issue when converting worlds. Fixes BUKKIT-1307
-rw-r--r--src/main/java/net/minecraft/server/OldChunkLoader.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/OldChunkLoader.java b/src/main/java/net/minecraft/server/OldChunkLoader.java
index d615aa48..3abcc2fc 100644
--- a/src/main/java/net/minecraft/server/OldChunkLoader.java
+++ b/src/main/java/net/minecraft/server/OldChunkLoader.java
@@ -18,7 +18,15 @@ public class OldChunkLoader {
oldchunk.h = nbttagcompound.getList("Entities");
oldchunk.i = nbttagcompound.getList("TileEntities");
oldchunk.j = nbttagcompound.getList("TileTicks");
- oldchunk.a = nbttagcompound.getLong("LastUpdate");
+
+ // CraftBukkit start
+ try {
+ oldchunk.a = nbttagcompound.getLong("LastUpdate");
+ } catch (ClassCastException ex) {
+ oldchunk.a = nbttagcompound.getInt("LastUpdate");
+ }
+ // CraftBukkit end
+
return oldchunk;
}