mirror of
https://github.com/encounter/dynmap.git
synced 2026-03-30 11:08:39 -07:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4152337568 | |||
| c393eec159 | |||
| e724a7bccb | |||
| 97ff6a2c2d | |||
| 33206e089f | |||
| cb4f6aaf82 | |||
| c978d87fef | |||
| 00a660d019 | |||
| 3875486fbf | |||
| e0f9a2f1e2 | |||
| be983825ab | |||
| aa796deeff | |||
| b4b11329c2 | |||
| 1a23f24b81 |
@@ -54,12 +54,18 @@ Powered Rail
|
||||
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Detector Rail
|
||||
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Sticky Piston
|
||||
29 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Cobweb
|
||||
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
Tall Grass
|
||||
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
|
||||
Dead Shrubs
|
||||
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
Piston
|
||||
33 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Piston Head
|
||||
34 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Wool
|
||||
35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
|
||||
35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
|
||||
|
||||
@@ -54,12 +54,18 @@ Powered Rail
|
||||
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Detector Rail
|
||||
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Sticky Piston
|
||||
29 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Cobweb
|
||||
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
Tall Grass
|
||||
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
|
||||
Dead Shrubs
|
||||
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
Piston
|
||||
33 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Piston Head
|
||||
34 157 128 79 255 96 96 96 255 78 64 39 255 48 48 48 255
|
||||
Wool
|
||||
35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
|
||||
35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
|
||||
|
||||
@@ -54,12 +54,18 @@ Powered Rail
|
||||
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Detector Rail
|
||||
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
Sticky Piston
|
||||
29 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
|
||||
Cobweb
|
||||
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
Tall Grass
|
||||
31 111 185 79 255 86 158 53 255 65 131 40 255 57 105 21 255
|
||||
Dead Shrubs
|
||||
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
Piston
|
||||
33 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
|
||||
Piston Head
|
||||
34 157 128 79 255 125 122 116 255 78 64 39 255 88 85 81 255
|
||||
Wool
|
||||
35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
|
||||
35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255
|
||||
|
||||
@@ -25,9 +25,12 @@
|
||||
26 200 20 20 255 160 16 16 255 100 10 10 255 80 8 8 255
|
||||
27 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
28 150 134 102 180 120 107 81 180 75 67 51 180 60 53 40 180
|
||||
29 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
|
||||
30 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
31 97 156 53 255 73 120 38 255 38 68 16 255 26 50 9 255
|
||||
32 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
33 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
|
||||
34 109 80 60 255 111 108 98 255 76 56 41 255 111 108 98 255
|
||||
35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
|
||||
35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
|
||||
35:1 227 128 52 255 224 126 51 255 187 105 42 255 224 126 51 255
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap</artifactId>
|
||||
<version>0.19.1</version>
|
||||
<version>0.19.2</version>
|
||||
<name>dynmap</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -72,7 +72,9 @@ public class FileLockManager {
|
||||
String fn = f.getPath();
|
||||
synchronized(lock) {
|
||||
boolean got_lock = false;
|
||||
boolean first_wait = true;
|
||||
long starttime = 0;
|
||||
if(timeout > 0)
|
||||
starttime = System.currentTimeMillis();
|
||||
while(!got_lock) {
|
||||
Integer lockcnt = filelocks.get(fn); /* Get lock count */
|
||||
if(lockcnt == null) {
|
||||
@@ -85,14 +87,16 @@ public class FileLockManager {
|
||||
}
|
||||
else { /* Write lock in place */
|
||||
try {
|
||||
if((timeout > 0) && (!first_wait)) { /* We already waited */
|
||||
return false;
|
||||
}
|
||||
if(timeout < 0)
|
||||
if(timeout < 0) {
|
||||
lock.wait();
|
||||
else
|
||||
lock.wait(timeout);
|
||||
first_wait = false;
|
||||
}
|
||||
else {
|
||||
long now = System.currentTimeMillis();
|
||||
long elapsed = now-starttime;
|
||||
if(elapsed > timeout) /* Give up on timeout */
|
||||
return false;
|
||||
lock.wait(timeout-elapsed);
|
||||
}
|
||||
} catch (InterruptedException ix) {
|
||||
Log.severe("getReadLock(" + fn + ") interrupted");
|
||||
return false;
|
||||
|
||||
@@ -25,6 +25,8 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
private static Method poppreservedchunk = null;
|
||||
private static Method getsnapshot2 = null;
|
||||
private static Method getemptysnapshot = null;
|
||||
private static Method gethandle = null;
|
||||
private static Method removeentities = null;
|
||||
|
||||
private World w;
|
||||
private List<DynmapChunk> chunks;
|
||||
@@ -230,10 +232,18 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
/* Get CraftChunk.getChunkSnapshot(boolean,boolean,boolean) */
|
||||
/* Get CraftChunk.getChunkSnapshot(boolean,boolean,boolean) and CraftChunk.getHandle() */
|
||||
try {
|
||||
Class c = Class.forName("org.bukkit.craftbukkit.CraftChunk");
|
||||
getsnapshot2 = c.getDeclaredMethod("getChunkSnapshot", new Class[] { boolean.class, boolean.class, boolean.class });
|
||||
gethandle = c.getDeclaredMethod("getHandle", new Class[0]);
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
/* Get Chunk.removeEntities() */
|
||||
try {
|
||||
Class c = Class.forName("net.minecraft.server.Chunk");
|
||||
removeentities = c.getDeclaredMethod("removeEntities", new Class[0]);
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
@@ -341,11 +351,26 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
if ((!wasLoaded) && didload) {
|
||||
/* It looks like bukkit "leaks" entities - they don't get removed from the world-level table
|
||||
* when chunks are unloaded but not saved - removing them seems to do the trick */
|
||||
if(!didgenerate) {
|
||||
if(!(didgenerate && do_save)) {
|
||||
boolean did_remove = false;
|
||||
Chunk cc = w.getChunkAt(chunk.x, chunk.z);
|
||||
if(cc != null) {
|
||||
for(Entity e: cc.getEntities())
|
||||
e.remove();
|
||||
if((gethandle != null) && (removeentities != null)) {
|
||||
try {
|
||||
Object chk = gethandle.invoke(cc);
|
||||
if(chk != null) {
|
||||
removeentities.invoke(chk);
|
||||
did_remove = true;
|
||||
}
|
||||
} catch (InvocationTargetException itx) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (IllegalAccessException e) {
|
||||
}
|
||||
}
|
||||
if(!did_remove) {
|
||||
if(cc != null) {
|
||||
for(Entity e: cc.getEntities())
|
||||
e.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Since we only remember ones we loaded, and we're synchronous, no player has
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: dynmap
|
||||
main: org.dynmap.DynmapPlugin
|
||||
version: "0.19.1"
|
||||
version: "0.19.2"
|
||||
authors: [FrozenCow, mikeprimm, zeeZ]
|
||||
softdepend: [Permissions]
|
||||
commands:
|
||||
|
||||
Reference in New Issue
Block a user