mirror of
https://github.com/encounter/dynmap.git
synced 2026-03-30 11:08:39 -07:00
Compare commits
149 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9f615db2d | |||
| bc6176f3e1 | |||
| 0db2296e97 | |||
| e4e0d68537 | |||
| d1a8c40248 | |||
| f0cdd5614b | |||
| fd0c430695 | |||
| cee491f610 | |||
| 38dd39d75f | |||
| 108e9d24c4 | |||
| de0ad58344 | |||
| cf660f0c9a | |||
| 015f898255 | |||
| d75a0ea325 | |||
| d0ab3b6fe5 | |||
| 7cf75873b8 | |||
| b89af6cca3 | |||
| 23f5ec5a27 | |||
| 3b7e81a729 | |||
| 19fca36bac | |||
| d44c3620cc | |||
| fe25cb6a0f | |||
| 2866eaa905 | |||
| ca9be50422 | |||
| f00e05f25e | |||
| d6cce5ed48 | |||
| 04d93d35fd | |||
| 15489833df | |||
| d5c19703f6 | |||
| fea84a45b2 | |||
| 1622bb4408 | |||
| 3fd511a8d1 | |||
| 3b16a36b99 | |||
| 5ae837f911 | |||
| 5f8c44ee6b | |||
| e2f0307eeb | |||
| d5b4f6c8c4 | |||
| 9fa46597d1 | |||
| 987e6bcb54 | |||
| b2cb15b75c | |||
| e57301b14e | |||
| 38c8254707 | |||
| 5b5b217be2 | |||
| de73cd4028 | |||
| 06785be5f3 | |||
| b108cad2d3 | |||
| cb010802db | |||
| 4fb1ddf49a | |||
| 325f069b46 | |||
| 024e7dc96c | |||
| b56332eae8 | |||
| 992a905b0a | |||
| 920dea04ee | |||
| 2ccf70d3fe | |||
| 3365a96565 | |||
| c3f0062862 | |||
| 9dc81aa65a | |||
| 26f4f7d994 | |||
| a7ba34065b | |||
| ecf415d9e4 | |||
| 6bea667659 | |||
| 728cd8304a | |||
| 7937a64f06 | |||
| e28ee185b6 | |||
| e5556d9138 | |||
| 084cf3f0f9 | |||
| 28e98a617d | |||
| c2d596e433 | |||
| 32da02ffaa | |||
| 0caa655095 | |||
| 771b708959 | |||
| d840b07960 | |||
| b36821f3b4 | |||
| 57f4f0030e | |||
| deef732129 | |||
| 17ba0d4d00 | |||
| ccbd6bf45e | |||
| 9cdbf45062 | |||
| d915f7b14a | |||
| 70dead3fb9 | |||
| b804aa72f8 | |||
| 17f5f43772 | |||
| 5e107cccb9 | |||
| 05f3ced64f | |||
| b01e0c8cdc | |||
| 69b562a5bf | |||
| 4a17f87691 | |||
| 04056572f8 | |||
| 271990b87c | |||
| cbfa26a5b3 | |||
| 355d54842f | |||
| e26ac97787 | |||
| 03376dab52 | |||
| 0ffc825b05 | |||
| 600dd00bcd | |||
| fe93f64273 | |||
| d41422fc2c | |||
| 491e88f745 | |||
| ecf6ae69a3 | |||
| 4985c763cc | |||
| 7ff33f04a0 | |||
| 31584804aa | |||
| 2b01db451d | |||
| c82a54fe7f | |||
| a1ccc876a3 | |||
| e752ae3bd5 | |||
| 1e3ceed5d7 | |||
| 88ff70ac48 | |||
| 84d01c530a | |||
| daa2d0f186 | |||
| 17644a5778 | |||
| 0a8f2a182a | |||
| 619485212d | |||
| 7f5d3ab23d | |||
| bb45cc10cb | |||
| c0479bff05 | |||
| cf1d6c414d | |||
| 9eab216525 | |||
| b8fe65bc99 | |||
| 1a5ddeeda5 | |||
| 5f23afe608 | |||
| 0a1de1b18e | |||
| 88db6445f9 | |||
| 6c708d1b3a | |||
| dcdfb3da5d | |||
| 95cc3ae869 | |||
| 106f95d8b6 | |||
| be60623719 | |||
| ff026e91b6 | |||
| b66be7a47c | |||
| 92e3ec5f08 | |||
| c4e1362274 | |||
| 63b9579fa5 | |||
| 5f32f8fb99 | |||
| ca9aa0727f | |||
| b3ccd203c8 | |||
| 8e59f37995 | |||
| 91b60be572 | |||
| 69fcc1706e | |||
| ab6352a17d | |||
| 631f06d091 | |||
| 8d5f081cdf | |||
| 553a956949 | |||
| d53b3bc340 | |||
| eb276dd59d | |||
| ad33ef79d9 | |||
| b47bbee4e8 | |||
| e1e13df4b2 | |||
| d4a2d2d32f |
@@ -68,6 +68,37 @@ Black Cloth
|
||||
34 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 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
|
||||
Wool - Orange
|
||||
35:1 204 111 48 255 162 89 38 255 102 56 24 255 81 44 19 255
|
||||
Wool - Magenta
|
||||
35:2 166 66 175 255 133 53 140 255 83 33 87 255 66 26 69 255
|
||||
Wool - Light Blue
|
||||
35:3 91 121 185 255 73 96 147 255 46 61 92 255 36 48 73 255
|
||||
Wool - Yellow
|
||||
35:4 170 158 24 255 135 126 19 255 85 79 12 255 67 62 10 255
|
||||
Wool - Light Green
|
||||
35:5 51 165 42 255 41 131 33 255 26 82 21 255 20 65 17 255
|
||||
Wool - Pink
|
||||
35:6 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Wool - Gray
|
||||
35:7 58 58 58 255 47 47 47 255 29 29 29 255 23 23 23 255
|
||||
Wool - Light Gray
|
||||
35:8 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
Wool - Cyan
|
||||
35:9 34 102 131 255 27 81 104 255 17 51 65 255 13 40 52 255
|
||||
Wool - Purple
|
||||
35:10 113 47 171 255 90 37 136 255 57 24 85 255 45 19 68 255
|
||||
Wool - Blue
|
||||
35:11 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Wool - Brown
|
||||
35:12 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
Wool - Dark Green
|
||||
35:13 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Wool - Red
|
||||
35:14 143 39 36 255 114 31 28 255 71 20 18 255 57 16 14 255
|
||||
Wool - Black
|
||||
35:15 24 20 20 255 19 16 16 255 12 10 10 255 9 8 8 255
|
||||
Gray Cloth
|
||||
36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255
|
||||
Yellow Flower
|
||||
@@ -84,8 +115,22 @@ Iron Block
|
||||
42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255
|
||||
Double Stone Slab
|
||||
43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Double Stone Slab - Sandstone
|
||||
43:1 218 210 158 255 174 168 126 255 109 105 79 255 87 84 63 255
|
||||
Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab - Sandstone
|
||||
44:1 218 210 158 255 174 168 126 255 109 105 79 255 87 84 63 255
|
||||
Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
|
||||
@@ -68,6 +68,37 @@ Black Cloth
|
||||
34 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 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
|
||||
Wool - Orange
|
||||
35:1 227 128 52 255 224 126 51 255 187 105 42 255 224 126 51 255
|
||||
Wool - Magenta
|
||||
35:2 185 76 188 255 183 75 186 255 153 63 155 255 183 75 186 255
|
||||
Wool - Light Blue
|
||||
35:3 102 139 199 255 100 137 196 255 84 114 164 255 100 137 196 255
|
||||
Wool - Yellow
|
||||
35:4 189 181 26 255 187 178 26 255 156 149 22 255 187 178 26 255
|
||||
Wool - Light Green
|
||||
35:5 57 189 45 255 56 186 44 255 47 156 37 255 56 186 44 255
|
||||
Wool - Pink
|
||||
35:6 211 132 145 255 209 130 143 255 174 109 120 255 209 130 143 255
|
||||
Wool - Gray
|
||||
35:7 65 67 63 255 64 66 62 255 54 55 52 255 64 66 62 255
|
||||
Wool - Light Gray
|
||||
35:8 154 166 156 255 152 163 154 255 127 137 128 255 152 163 154 255
|
||||
Wool - Cyan
|
||||
35:9 38 117 141 255 37 115 139 255 31 96 116 255 37 115 139 255
|
||||
Wool - Purple
|
||||
35:10 126 54 184 255 124 53 181 255 104 44 151 255 124 53 181 255
|
||||
Wool - Blue
|
||||
35:11 38 51 144 255 37 50 143 255 31 42 119 255 37 50 143 255
|
||||
Wool - Brown
|
||||
35:12 83 51 26 255 82 50 26 255 69 42 22 255 82 50 26 255
|
||||
Wool - Dark Green
|
||||
35:13 54 77 22 255 54 76 22 255 45 63 19 255 54 76 22 255
|
||||
Wool - Red
|
||||
35:14 159 45 38 255 157 44 38 255 131 37 32 255 157 44 38 255
|
||||
Wool - Black
|
||||
35:15 26 23 22 255 26 23 21 255 22 19 18 255 26 23 21 255
|
||||
Gray Cloth
|
||||
36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255
|
||||
Yellow Flower
|
||||
@@ -84,8 +115,22 @@ Iron Block
|
||||
42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255
|
||||
Double Stone Slab
|
||||
43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Double Stone Slab - Sandstone
|
||||
43:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab - Sandstone
|
||||
44:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
|
||||
@@ -68,6 +68,37 @@ Black Cloth
|
||||
34 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 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
|
||||
Wool - Orange
|
||||
35:1 204 111 48 255 162 89 38 255 102 56 24 255 81 44 19 255
|
||||
Wool - Magenta
|
||||
35:2 166 66 175 255 133 53 140 255 83 33 87 255 66 26 69 255
|
||||
Wool - Light Blue
|
||||
35:3 91 121 185 255 73 96 147 255 46 61 92 255 36 48 73 255
|
||||
Wool - Yellow
|
||||
35:4 170 158 24 255 135 126 19 255 85 79 12 255 67 62 10 255
|
||||
Wool - Light Green
|
||||
35:5 51 165 42 255 41 131 33 255 26 82 21 255 20 65 17 255
|
||||
Wool - Pink
|
||||
35:6 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255
|
||||
Wool - Gray
|
||||
35:7 58 58 58 255 47 47 47 255 29 29 29 255 23 23 23 255
|
||||
Wool - Light Gray
|
||||
35:8 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255
|
||||
Wool - Cyan
|
||||
35:9 34 102 131 255 27 81 104 255 17 51 65 255 13 40 52 255
|
||||
Wool - Purple
|
||||
35:10 113 47 171 255 90 37 136 255 57 24 85 255 45 19 68 255
|
||||
Wool - Blue
|
||||
35:11 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255
|
||||
Wool - Brown
|
||||
35:12 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255
|
||||
Wool - Dark Green
|
||||
35:13 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255
|
||||
Wool - Red
|
||||
35:14 143 39 36 255 114 31 28 255 71 20 18 255 57 16 14 255
|
||||
Wool - Black
|
||||
35:15 24 20 20 255 19 16 16 255 12 10 10 255 9 8 8 255
|
||||
Gray Cloth
|
||||
36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255
|
||||
Yellow Flower
|
||||
@@ -84,8 +115,22 @@ Iron Block
|
||||
42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255
|
||||
Double Stone Slab
|
||||
43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Double Stone Slab - Sandstone
|
||||
43:1 214 182 111 255 203 171 100 255 186 154 83 255 173 141 70 255
|
||||
Double Stone Slab - Wood
|
||||
43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Double Stone Slab - Cobblestone
|
||||
43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Stone Slab
|
||||
44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255
|
||||
Stone Slab - Sandstone
|
||||
44:1 214 182 111 255 203 171 100 255 186 154 83 255 173 141 70 255
|
||||
Stone Slab - Wood
|
||||
44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255
|
||||
Stone Slab - Cobblestone
|
||||
44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255
|
||||
Brick
|
||||
45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255
|
||||
TNT
|
||||
|
||||
@@ -16,7 +16,24 @@
|
||||
17 119 97 74 255 99 81 62 255 83 68 52 255 99 81 62 255
|
||||
18 27 69 37 180 22 57 31 180 19 48 25 180 22 57 31 180
|
||||
20 178 217 223 90 148 181 186 90 124 151 155 90 148 181 186 90
|
||||
24 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 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
|
||||
35:2 185 76 188 255 183 75 186 255 153 63 155 255 183 75 186 255
|
||||
35:3 102 139 199 255 100 137 196 255 84 114 164 255 100 137 196 255
|
||||
35:4 189 181 26 255 187 178 26 255 156 149 22 255 187 178 26 255
|
||||
35:5 57 189 45 255 56 186 44 255 47 156 37 255 56 186 44 255
|
||||
35:6 211 132 145 255 209 130 143 255 174 109 120 255 209 130 143 255
|
||||
35:7 65 67 63 255 64 66 62 255 54 55 52 255 64 66 62 255
|
||||
35:8 154 166 156 255 152 163 154 255 127 137 128 255 152 163 154 255
|
||||
35:9 38 117 141 255 37 115 139 255 31 96 116 255 37 115 139 255
|
||||
35:10 126 54 184 255 124 53 181 255 104 44 151 255 124 53 181 255
|
||||
35:11 38 51 144 255 37 50 143 255 31 42 119 255 37 50 143 255
|
||||
35:12 83 51 26 255 82 50 26 255 69 42 22 255 82 50 26 255
|
||||
35:13 54 77 22 255 54 76 22 255 45 63 19 255 54 76 22 255
|
||||
35:14 159 45 38 255 157 44 38 255 131 37 32 255 157 44 38 255
|
||||
35:15 26 23 22 255 26 23 21 255 22 19 18 255 26 23 21 255
|
||||
36 0 0 0 254 0 0 0 254 0 0 0 254 0 0 0 254
|
||||
37 73 108 60 254 61 90 50 254 51 75 42 254 61 90 50 254
|
||||
38 84 139 187 254 70 116 155 254 59 97 130 254 70 116 155 254
|
||||
@@ -25,7 +42,15 @@
|
||||
41 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255
|
||||
42 249 249 249 255 207 207 207 255 173 173 173 255 207 207 207 255
|
||||
43 122 112 99 255 101 93 82 255 85 78 69 255 101 93 82 255
|
||||
43:0 122 112 99 255 101 93 82 255 85 78 69 255 101 93 82 255
|
||||
43:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
43:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255
|
||||
43:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255
|
||||
44 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254
|
||||
44:0 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254
|
||||
44:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255
|
||||
44:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255
|
||||
44:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255
|
||||
45 230 103 73 255 192 86 61 255 160 71 50 255 192 86 61 255
|
||||
46 255 79 30 255 231 72 27 255 193 60 22 255 231 72 27 255
|
||||
48 96 108 70 255 80 90 58 255 67 75 49 255 80 90 58 255
|
||||
|
||||
+216
-105
@@ -1,9 +1,75 @@
|
||||
# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
|
||||
|
||||
components:
|
||||
- class: org.dynmap.ClientConfigurationComponent
|
||||
|
||||
- class: org.dynmap.InternalClientUpdateComponent
|
||||
sendhealth: true
|
||||
allowwebchat: true
|
||||
webchat-interval: 5
|
||||
#- class: org.dynmap.JsonFileClientUpdateComponent
|
||||
# writeinterval: 1
|
||||
# sendhealth: true
|
||||
# allowwebchat: false
|
||||
|
||||
- class: org.dynmap.SimpleWebChatComponent
|
||||
allowchat: true
|
||||
#- class: org.dynmap.herochat.HeroWebChatComponent
|
||||
# # Control which HeroChat channel messages from web are directed to
|
||||
# herochatwebchannel: Global
|
||||
# # Control which channels are monitored and reported to the web
|
||||
# herochatchannels:
|
||||
# - Global
|
||||
# #- Trade
|
||||
# #- Haggle
|
||||
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: chat
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: chatballoon
|
||||
focuschatballoons: false
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: chatbox
|
||||
showplayerfaces: true
|
||||
messagettl: 5
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: playermarkers
|
||||
showplayerfaces: true
|
||||
showplayerhealth: true
|
||||
#- class: org.dynmap.ClientComponent
|
||||
# type: digitalclock
|
||||
- class: org.dynmap.ClientComponent
|
||||
type: timeofdayclock
|
||||
showdigitalclock: true
|
||||
#showweather: true
|
||||
#- class: org.dynmap.regions.RegionsComponent
|
||||
# type: regions
|
||||
# name: WorldGuard
|
||||
# useworldpath: true
|
||||
# filename: regions.yml
|
||||
# basenode: regions
|
||||
# use3dregions: true
|
||||
# infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname% - %priority% (%parent%)</span><br /> Owners <span style="font-weight:bold;">%playerowners% %groupowners%</span><br />Members <span style="font-weight:bold;">%playermembers% %groupmembers%</span><br />Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
|
||||
# regionstyle:
|
||||
# strokeColor: "#FF0000"
|
||||
# strokeOpacity: 0.8
|
||||
# strokeWeight: 3
|
||||
# fillColor: "#FF0000"
|
||||
# fillOpacity: 0.35
|
||||
#- class: org.dynmap.TestComponent
|
||||
# stuff: "This is some configuration-value"
|
||||
|
||||
# Treat hiddenplayers.txt as a whitelist for players to be shown on the map? (Default false)
|
||||
display-whitelist: false
|
||||
|
||||
# How often a tile gets rendered (in seconds).
|
||||
renderinterval: 1
|
||||
|
||||
# Do render on main thread - may generate more server load, but safer and fixes broken tiles
|
||||
renderonsync: true
|
||||
|
||||
render-triggers:
|
||||
# - chunkloaded
|
||||
# - playermove
|
||||
# - playerjoin
|
||||
- blockplaced
|
||||
@@ -24,116 +90,161 @@ webserver-port: 8123
|
||||
# Disables Webserver portion of Dynmap (Advanced users only)
|
||||
disable-webserver: false
|
||||
|
||||
# Writes JSON to file in the webpath
|
||||
jsonfile: false
|
||||
# Use timesliced fullrender - takes a bit longer, but much more polite for server
|
||||
timeslicerender: true
|
||||
|
||||
# How often the json file gets written to(in seconds)
|
||||
jsonfile-interval: 1
|
||||
# Period between tile renders for timesliced fullrender, in seconds
|
||||
timesliceinterval: 0.5
|
||||
|
||||
# Interval the browser should poll for updates.
|
||||
updaterate: 2000
|
||||
|
||||
showplayerfacesinmenu: true
|
||||
|
||||
joinmessage: "%playername% joined"
|
||||
quitmessage: "%playername% quit"
|
||||
spammessage: "You may only chat once every %interval% seconds."
|
||||
|
||||
defaultzoom: 0
|
||||
defaultworld: world
|
||||
|
||||
# template world - this is used for worlds that exist but aren't defined in the worlds section.
|
||||
# Also, it supplies the "maps" section for worlds lacking a maps section, and the "center"
|
||||
# for worlds lacking a "center" section.
|
||||
templates:
|
||||
# Template for normal world
|
||||
normal:
|
||||
enabled: true
|
||||
center:
|
||||
x: 0
|
||||
y: 64
|
||||
z: 0
|
||||
maps:
|
||||
- class: org.dynmap.flat.FlatMap
|
||||
name: flat
|
||||
title: "Flat"
|
||||
prefix: flat
|
||||
colorscheme: default
|
||||
- class: org.dynmap.kzedmap.KzedMap
|
||||
renderers:
|
||||
- class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
name: surface
|
||||
title: "Surface"
|
||||
prefix: t
|
||||
maximumheight: 127
|
||||
colorscheme: default
|
||||
# Add shadows to world (based on top-down shadows from chunk data)
|
||||
# shadowstrength: 1.0
|
||||
# Sets the icon to 'images/block_custom.png'
|
||||
# icon: custom
|
||||
#- class: org.dynmap.kzedmap.HighlightTileRenderer
|
||||
# prefix: ht
|
||||
# maximumheight: 127
|
||||
# colorscheme: default
|
||||
# highlight: # For highlighting multiple block-types.
|
||||
# - 56 # Highlight diamond-ore
|
||||
# - 66 # Highlight minecart track
|
||||
# highlight: 56 # For highlighting a single block-type.
|
||||
- class: org.dynmap.kzedmap.CaveTileRenderer
|
||||
name: cave
|
||||
title: "Cave"
|
||||
prefix: ct
|
||||
maximumheight: 127
|
||||
# Nether world template
|
||||
nether:
|
||||
enabled: true
|
||||
center:
|
||||
x: 0
|
||||
y: 64
|
||||
z: 0
|
||||
maps:
|
||||
- class: org.dynmap.flat.FlatMap
|
||||
name: flat
|
||||
title: "Flat"
|
||||
prefix: flat
|
||||
colorscheme: default
|
||||
- class: org.dynmap.kzedmap.KzedMap
|
||||
renderers:
|
||||
- class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
name: nether
|
||||
title: "Surface"
|
||||
prefix: nt
|
||||
maximumheight: 127
|
||||
colorscheme: default
|
||||
|
||||
# The maptypes Dynmap will use to render.
|
||||
worlds:
|
||||
- name: world
|
||||
maps:
|
||||
- class: org.dynmap.flat.FlatMap
|
||||
prefix: flat
|
||||
colorscheme: default
|
||||
- class: org.dynmap.kzedmap.KzedMap
|
||||
renderers:
|
||||
- class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
prefix: t
|
||||
maximumheight: 127
|
||||
colorscheme: default
|
||||
- class: org.dynmap.kzedmap.CaveTileRenderer
|
||||
prefix: ct
|
||||
maximumheight: 127
|
||||
- name: nether
|
||||
maps:
|
||||
- class: org.dynmap.flat.FlatMap
|
||||
prefix: flat
|
||||
colorscheme: default
|
||||
- class: org.dynmap.kzedmap.KzedMap
|
||||
renderers:
|
||||
- class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
prefix: nt
|
||||
maximumheight: 64
|
||||
colorscheme: default
|
||||
# Worlds can be handled by templates, based on world type
|
||||
# You can override the properties of the template by specifying them in this section
|
||||
# for example 'Title: "My Awesome World"'
|
||||
#- name: world
|
||||
# title: "World"
|
||||
# Use 'enabled: false' to disable a certain world.
|
||||
# enabled: false
|
||||
# Use 'template: mycustomtemplate' to use the properties specified in the template 'mycustomtemplate' to this world. Default it is set to the environment-name (normal or nether).
|
||||
# template: mycustomtemplate
|
||||
# Rest of comes from template - uncomment to tailor for world specifically
|
||||
# center:
|
||||
# x: 0
|
||||
# y: 64
|
||||
# z: 0
|
||||
# maps:
|
||||
# - class: org.dynmap.flat.FlatMap
|
||||
# name: flat
|
||||
# title: "Flat"
|
||||
# prefix: flat
|
||||
# colorscheme: default
|
||||
# - class: org.dynmap.kzedmap.KzedMap
|
||||
# renderers:
|
||||
# - class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
# name: surface
|
||||
# title: "Surface"
|
||||
# prefix: t
|
||||
# maximumheight: 127
|
||||
# colorscheme: default
|
||||
# # Add shadows to world (based on top-down shadows from chunk data)
|
||||
# # shadowstrength: 1.0
|
||||
# # Sets the icon to 'images/block_custom.png'
|
||||
# # icon: custom
|
||||
# #- class: org.dynmap.kzedmap.HighlightTileRenderer
|
||||
# # prefix: ht
|
||||
# # maximumheight: 127
|
||||
# # colorscheme: default
|
||||
# # highlight: # For highlighting multiple block-types.
|
||||
# # - 56 # Highlight diamond-ore
|
||||
# # - 66 # Highlight minecart track
|
||||
# # highlight: 56 # For highlighting a single block-type.
|
||||
# - class: org.dynmap.kzedmap.CaveTileRenderer
|
||||
# name: cave
|
||||
# title: "Cave"
|
||||
# prefix: ct
|
||||
# maximumheight: 127
|
||||
#
|
||||
# To just label world, and inherit rest from template, just provide name and title
|
||||
#- name: world2
|
||||
# title: "Second World"
|
||||
#
|
||||
#- name: nether
|
||||
# title: "Nether"
|
||||
# center:
|
||||
# x: 0
|
||||
# y: 64
|
||||
# z: 0
|
||||
# maps:
|
||||
# - class: org.dynmap.flat.FlatMap
|
||||
# name: flat
|
||||
# title: "Flat"
|
||||
# prefix: flat
|
||||
# colorscheme: default
|
||||
# - class: org.dynmap.kzedmap.KzedMap
|
||||
# renderers:
|
||||
# - class: org.dynmap.kzedmap.DefaultTileRenderer
|
||||
# name: nether
|
||||
# title: "Surface"
|
||||
# prefix: nt
|
||||
# maximumheight: 127
|
||||
# colorscheme: default
|
||||
|
||||
web:
|
||||
# Handles the clientside updates differently only enable if using jsonfile
|
||||
jsonfile: false
|
||||
|
||||
# Interval the browser should poll for updates.
|
||||
updaterate: 2000
|
||||
|
||||
showchatballoons: false
|
||||
focuschatballoons: false
|
||||
|
||||
showchatwindow: true
|
||||
allowwebchat: true
|
||||
webchat-interval: 5
|
||||
messagettl: 15
|
||||
|
||||
showplayerfacesonmap: true
|
||||
showplayerfacesinmenu: true
|
||||
|
||||
joinmessage: "%playername% joined"
|
||||
quitmessage: "%playername% quit"
|
||||
spammessage: "You may only chat once every %interval% seconds."
|
||||
|
||||
components:
|
||||
- type: chat
|
||||
- type: chatballoon
|
||||
focuschatballoons: false
|
||||
- type: chatbox
|
||||
showplayerfaces: true
|
||||
messagettl: 5
|
||||
- type: playermarkers
|
||||
showplayerfaces: true
|
||||
#- type: digitalclock
|
||||
- type: timeofdayclock
|
||||
showdigitalclock: true
|
||||
|
||||
defaultworld: world
|
||||
worlds:
|
||||
- title: World
|
||||
name: world
|
||||
maps:
|
||||
- type: FlatMapType
|
||||
title: Flat
|
||||
name: flat
|
||||
prefix: flat
|
||||
- type: KzedMapType
|
||||
title: Surface
|
||||
name: surface
|
||||
prefix: t
|
||||
- type: KzedMapType
|
||||
title: Cave
|
||||
name: cave
|
||||
prefix: ct
|
||||
- title: Nether
|
||||
name: nether
|
||||
maps:
|
||||
- type: FlatMapType
|
||||
title: Flat
|
||||
name: flat
|
||||
prefix: flat
|
||||
- type: KzedMapType
|
||||
title: Surface
|
||||
name: nether
|
||||
prefix: nt
|
||||
# Example:
|
||||
#- title: Other World # With what name the world is displayed.
|
||||
# name: world_other # The actual name of the world (equal to your directory-name).
|
||||
# maps:
|
||||
# - type: KzedMapType # The type (or perspective) of the map. At the moment, there are no others than KzedMapType.
|
||||
# title: Surface # The name of the map that will be displayed.
|
||||
# name: surface # The actual name of the map (should be unique for this world).
|
||||
# prefix: t # The prefix of the tile-files that are generated.
|
||||
# icon: images/block_other.png # Sets a custom icon for the map. (optional)
|
||||
# - type: KzedMapType
|
||||
# title: Cave
|
||||
# name: cave
|
||||
# prefix: ct
|
||||
# Enables debugging.
|
||||
#debuggers:
|
||||
# - class: org.dynmap.debug.LogDebugger
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dynmap.render # Render current chunk
|
||||
dynmap.fullrender # Issue a full render
|
||||
dynmap.hide.self # Hide self from map
|
||||
dynmap.hide.others # Hide others from map
|
||||
dynmap.show.self # Reveal self on map
|
||||
dynmap.show.others # Reveal others on map
|
||||
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap</artifactId>
|
||||
<version>0.15</version>
|
||||
<version>0.17</version>
|
||||
<name>dynmap</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<id>bin</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>tar.bz2</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.dynmap;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Armor {
|
||||
/**
|
||||
* http://www.minecraftwiki.net/wiki/Item_Durability#Armor_durability
|
||||
* We rely on getArmorContents() to return 4 armor pieces in the order
|
||||
* of: boots, pants, chest, helmet
|
||||
*/
|
||||
private static final double armorPoints[] = {1.5, 3.0, 4.0, 1.5};
|
||||
|
||||
public static final int getArmorPoints(Player player) {
|
||||
int currentDurability = 0;
|
||||
int baseDurability = 0;
|
||||
double baseArmorPoints = 0;
|
||||
ItemStack inventory[] = player.getInventory().getArmorContents();
|
||||
for(int i=0;i<inventory.length;i++) {
|
||||
final short maxDurability = inventory[i].getType().getMaxDurability();
|
||||
if(maxDurability < 0)
|
||||
continue;
|
||||
final short durability = inventory[i].getDurability();
|
||||
baseDurability += maxDurability;
|
||||
currentDurability += maxDurability - durability;
|
||||
baseArmorPoints += armorPoints[i];
|
||||
}
|
||||
return (int)(2*baseArmorPoints*currentDurability/baseDurability);
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,8 @@ import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class AsynchronousQueue<T> {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
private Object lock = new Object();
|
||||
private Thread thread;
|
||||
private LinkedList<T> queue = new LinkedList<T>();
|
||||
@@ -62,7 +58,7 @@ public class AsynchronousQueue<T> {
|
||||
try {
|
||||
thread.setPriority(Thread.MIN_PRIORITY);
|
||||
} catch (SecurityException e) {
|
||||
log.info("Failed to set minimum priority for worker thread!");
|
||||
Log.info("Failed to set minimum priority for worker thread!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,13 +70,13 @@ public class AsynchronousQueue<T> {
|
||||
Thread oldThread = thread;
|
||||
thread = null;
|
||||
|
||||
log.info("Stopping map renderer...");
|
||||
Log.info("Stopping map renderer...");
|
||||
|
||||
oldThread.interrupt();
|
||||
try {
|
||||
oldThread.join(1000);
|
||||
} catch (InterruptedException e) {
|
||||
log.info("Waiting for map renderer to stop is interrupted");
|
||||
Log.info("Waiting for map renderer to stop is interrupted");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,7 +92,7 @@ public class AsynchronousQueue<T> {
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
log.log(Level.SEVERE, "Exception on rendering-thread", ex);
|
||||
Log.severe("Exception on rendering-thread", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.dynmap;
|
||||
|
||||
public class ChatEvent {
|
||||
public String source;
|
||||
public String name;
|
||||
public String message;
|
||||
public ChatEvent(String source, String name, String message) {
|
||||
this.source = source;
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,65 @@
|
||||
package org.dynmap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.json.simple.JSONAware;
|
||||
import org.json.simple.JSONStreamAware;
|
||||
|
||||
public class Client {
|
||||
public static class Update {
|
||||
public long timestamp;
|
||||
public long servertime;
|
||||
public Player[] players;
|
||||
public Object[] updates;
|
||||
}
|
||||
|
||||
public static class Player {
|
||||
public String type = "player";
|
||||
public String name;
|
||||
public String world;
|
||||
public double x, y, z;
|
||||
|
||||
public Player(String name, String world, double x, double y, double z) {
|
||||
this.name = name;
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Stamped {
|
||||
public static class Update implements JSONAware, JSONStreamAware {
|
||||
public long timestamp = System.currentTimeMillis();
|
||||
|
||||
@Override
|
||||
public String toJSONString() {
|
||||
return org.dynmap.web.Json.stringifyJson(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeJSONString(Writer w) throws IOException {
|
||||
// TODO: This isn't the best...
|
||||
w.write(toJSONString());
|
||||
}
|
||||
}
|
||||
|
||||
public static class ChatMessage extends Stamped {
|
||||
|
||||
public static class ChatMessage extends Update {
|
||||
public String type = "chat";
|
||||
public String source;
|
||||
public String playerName;
|
||||
public String message;
|
||||
|
||||
public ChatMessage(String playerName, String message) {
|
||||
this.playerName = playerName;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
public static class WebChatMessage extends Stamped {
|
||||
public String type = "webchat";
|
||||
public String playerName;
|
||||
public String message;
|
||||
|
||||
public WebChatMessage(String playerName, String message) {
|
||||
this.playerName = playerName;
|
||||
this.message = message;
|
||||
public String account;
|
||||
public String channel;
|
||||
public ChatMessage(String source, String channel, String playerName, String message, String playeraccount) {
|
||||
this.source = source;
|
||||
this.playerName = ChatColor.stripColor(playerName);
|
||||
this.message = ChatColor.stripColor(message);
|
||||
this.account = playeraccount;
|
||||
this.channel = channel;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Tile extends Stamped {
|
||||
public static class PlayerJoinMessage extends Update {
|
||||
public String type = "playerjoin";
|
||||
public String playerName;
|
||||
public String account;
|
||||
public PlayerJoinMessage(String playerName, String playeraccount) {
|
||||
this.playerName = ChatColor.stripColor(playerName);
|
||||
this.account = playeraccount;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerQuitMessage extends Update {
|
||||
public String type = "playerquit";
|
||||
public String playerName;
|
||||
public String account;
|
||||
public PlayerQuitMessage(String playerName, String playeraccount) {
|
||||
this.playerName = ChatColor.stripColor(playerName);
|
||||
this.account = playeraccount;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Tile extends Update {
|
||||
public String type = "tile";
|
||||
public String name;
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.dynmap;
|
||||
|
||||
import static org.dynmap.JSONUtils.a;
|
||||
import static org.dynmap.JSONUtils.s;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
public class ClientComponent extends Component {
|
||||
|
||||
public ClientComponent(final DynmapPlugin plugin, final ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
plugin.events.addListener("buildclientconfiguration", new Event.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void triggered(JSONObject root) {
|
||||
buildClientConfiguration(root);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void buildClientConfiguration(JSONObject root) {
|
||||
JSONObject o = createClientConfiguration();
|
||||
a(root, "components", o);
|
||||
}
|
||||
|
||||
protected JSONObject createClientConfiguration() {
|
||||
JSONObject o = convertMap(configuration);
|
||||
o.remove("class");
|
||||
return o;
|
||||
}
|
||||
|
||||
protected static final JSONObject convertMap(Map<String, ?> m) {
|
||||
JSONObject o = new JSONObject();
|
||||
for(Map.Entry<String, ?> entry : m.entrySet()) {
|
||||
s(o, entry.getKey(), convert(entry.getValue()));
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
protected static final JSONArray convertList(List<?> l) {
|
||||
JSONArray o = new JSONArray();
|
||||
for(Object entry : l) {
|
||||
o.add(convert(entry));
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
protected static final Object convert(Object o) {
|
||||
if (o instanceof Map<?, ?>) {
|
||||
return convertMap((Map<String, ?>)o);
|
||||
} else if (o instanceof List<?>) {
|
||||
return convertList((List<?>)o);
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.dynmap;
|
||||
|
||||
import static org.dynmap.JSONUtils.a;
|
||||
import static org.dynmap.JSONUtils.l;
|
||||
import static org.dynmap.JSONUtils.s;
|
||||
|
||||
import org.dynmap.Event.Listener;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class ClientConfigurationComponent extends Component {
|
||||
public ClientConfigurationComponent(final DynmapPlugin plugin, ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
plugin.events.<JSONObject>addListener("buildclientconfiguration", new Listener<JSONObject>() {
|
||||
@Override
|
||||
public void triggered(JSONObject t) {
|
||||
ConfigurationNode c = plugin.configuration;
|
||||
s(t, "updaterate", c.getFloat("updaterate", 1.0f));
|
||||
s(t, "showplayerfacesinmenu", c.getBoolean("showplayerfacesinmenu", true));
|
||||
s(t, "joinmessage", c.getString("joinmessage", "%playername% joined"));
|
||||
s(t, "quitmessage", c.getString("quitmessage", "%playername% quit"));
|
||||
s(t, "spammessage", c.getString("spammessage", "You may only chat once every %interval% seconds."));
|
||||
s(t, "defaultzoom", c.getInteger("defaultzoom", 0));
|
||||
|
||||
DynmapWorld defaultWorld = null;
|
||||
for(DynmapWorld world : plugin.mapManager.getWorlds()) {
|
||||
if (defaultWorld == null) defaultWorld = world;
|
||||
ConfigurationNode wn = world.configuration;
|
||||
JSONObject wo = new JSONObject();
|
||||
s(wo, "name", wn.getString("name"));
|
||||
s(wo, "title", wn.getString("title"));
|
||||
s(wo, "center/x", wn.getFloat("center/x", 0.0f));
|
||||
s(wo, "center/y", wn.getFloat("center/y", 64.0f));
|
||||
s(wo, "center/z", wn.getFloat("center/z", 0.0f));
|
||||
a(t, "worlds", wo);
|
||||
|
||||
for(MapType mt : world.maps) {
|
||||
mt.buildClientConfiguration(wo);
|
||||
}
|
||||
}
|
||||
s(t, "defaultworld", c.getString("defaultworld", defaultWorld == null ? "world" : defaultWorld.world.getName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package org.dynmap;
|
||||
|
||||
import static org.dynmap.JSONUtils.a;
|
||||
import static org.dynmap.JSONUtils.s;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class ClientUpdateComponent extends Component {
|
||||
public ClientUpdateComponent(final DynmapPlugin plugin, ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
plugin.events.addListener("buildclientupdate", new Event.Listener<ClientUpdateEvent>() {
|
||||
@Override
|
||||
public void triggered(ClientUpdateEvent e) {
|
||||
buildClientUpdate(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void buildClientUpdate(ClientUpdateEvent e) {
|
||||
World world = e.world.world;
|
||||
JSONObject u = e.update;
|
||||
long since = e.timestamp;
|
||||
String worldName = world.getName();
|
||||
|
||||
s(u, "servertime", world.getTime() % 24000);
|
||||
s(u, "hasStorm", world.hasStorm());
|
||||
s(u, "isThundering", world.isThundering());
|
||||
|
||||
s(u, "players", new JSONArray());
|
||||
Player[] players = plugin.playerList.getVisiblePlayers();
|
||||
for(int i=0;i<players.length;i++) {
|
||||
Player p = players[i];
|
||||
Location pl = p.getLocation();
|
||||
JSONObject jp = new JSONObject();
|
||||
s(jp, "type", "player");
|
||||
s(jp, "name", ChatColor.stripColor(p.getDisplayName()));
|
||||
s(jp, "account", p.getName());
|
||||
s(jp, "world", p.getWorld().getName());
|
||||
s(jp, "x", pl.getX());
|
||||
s(jp, "y", pl.getY());
|
||||
s(jp, "z", pl.getZ());
|
||||
if (configuration.getBoolean("sendhealth", false)) {
|
||||
s(jp, "health", p.getHealth());
|
||||
s(jp, "armor", Armor.getArmorPoints(p));
|
||||
}
|
||||
a(u, "players", jp);
|
||||
}
|
||||
|
||||
s(u, "updates", new JSONArray());
|
||||
for(Object update : plugin.mapManager.getWorldUpdates(worldName, since)) {
|
||||
a(u, "updates", (Client.Update)update);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.dynmap;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class ClientUpdateEvent {
|
||||
public long timestamp;
|
||||
public DynmapWorld world;
|
||||
public JSONObject update;
|
||||
|
||||
public ClientUpdateEvent(long timestamp, DynmapWorld world, JSONObject update) {
|
||||
this.timestamp = timestamp;
|
||||
this.world = world;
|
||||
this.update = update;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.dynmap;
|
||||
|
||||
/**
|
||||
* Simple replacement for java.awt.Color for dynmap - it's not an invariant, so we don't make millions
|
||||
* of them during rendering
|
||||
*/
|
||||
public class Color {
|
||||
/* RGBA value */
|
||||
private int val;
|
||||
|
||||
public static final int TRANSPARENT = 0;
|
||||
|
||||
public Color(int red, int green, int blue, int alpha) {
|
||||
setRGBA(red, green, blue, alpha);
|
||||
}
|
||||
public Color(int red, int green, int blue) {
|
||||
setRGBA(red, green, blue, 0xFF);
|
||||
}
|
||||
public Color() {
|
||||
setTransparent();
|
||||
}
|
||||
public final int getRed() {
|
||||
return (val >> 24) & 0xFF;
|
||||
}
|
||||
public final int getGreen() {
|
||||
return (val >> 16) & 0xFF;
|
||||
}
|
||||
public final int getBlue() {
|
||||
return (val >> 8) & 0xFF;
|
||||
}
|
||||
public final int getAlpha() {
|
||||
return (val & 0xFF);
|
||||
}
|
||||
public final boolean isTransparent() {
|
||||
return (val == TRANSPARENT);
|
||||
}
|
||||
public final void setTransparent() {
|
||||
val = TRANSPARENT;
|
||||
}
|
||||
public final void setColor(Color c) {
|
||||
val = c.val;
|
||||
}
|
||||
public final void setRGBA(int red, int green, int blue, int alpha) {
|
||||
val = ((red & 0xFF) << 24) | ((green & 0xFF) << 16) | ((blue & 0xFF) << 8) | (alpha & 0xFF);
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,32 @@
|
||||
package org.dynmap;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Scanner;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.dynmap.debug.Debug;
|
||||
|
||||
public class ColorScheme {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
private static final HashMap<String, ColorScheme> cache = new HashMap<String, ColorScheme>();
|
||||
|
||||
public String name;
|
||||
public java.util.Map<Integer, Color[]> colors;
|
||||
|
||||
public ColorScheme(String name, java.util.Map<Integer, Color[]> colors) {
|
||||
public String name;
|
||||
/* Switch to arrays - faster than map */
|
||||
public Color[][] colors; /* [blk-type][step] */
|
||||
public Color[][][] datacolors; /* [bkt-type][blk-dat][step] */
|
||||
|
||||
public ColorScheme(String name, Color[][] colors, Color[][][] datacolors) {
|
||||
this.name = name;
|
||||
this.colors = colors;
|
||||
this.datacolors = datacolors;
|
||||
}
|
||||
|
||||
|
||||
private static File getColorSchemeDirectory() {
|
||||
return new File(DynmapPlugin.dataDirectory, "colorschemes");
|
||||
}
|
||||
|
||||
|
||||
public static ColorScheme getScheme(String name) {
|
||||
if (name == null)
|
||||
name = "default";
|
||||
@@ -38,11 +37,13 @@ public class ColorScheme {
|
||||
}
|
||||
return scheme;
|
||||
}
|
||||
|
||||
|
||||
public static ColorScheme loadScheme(String name) {
|
||||
File colorSchemeFile = new File(getColorSchemeDirectory(), name + ".txt");
|
||||
java.util.Map<Integer, Color[]> colors = new HashMap<Integer, Color[]>();
|
||||
Color[][] colors = new Color[256][];
|
||||
Color[][][] datacolors = new Color[256][][];
|
||||
InputStream stream;
|
||||
boolean enab_datacolor = MapManager.mapman.doSyncRender();
|
||||
try {
|
||||
Debug.debug("Loading colors from '" + colorSchemeFile + "'...");
|
||||
stream = new FileInputStream(colorSchemeFile);
|
||||
@@ -59,9 +60,16 @@ public class ColorScheme {
|
||||
if (split.length < 17) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Integer id = new Integer(split[0]);
|
||||
|
||||
Integer id;
|
||||
Integer dat = null;
|
||||
int idx = split[0].indexOf(':');
|
||||
if(idx > 0) { /* ID:data - data color */
|
||||
id = new Integer(split[0].substring(0, idx));
|
||||
dat = new Integer(split[0].substring(idx+1));
|
||||
}
|
||||
else {
|
||||
id = new Integer(split[0]);
|
||||
}
|
||||
Color[] c = new Color[4];
|
||||
|
||||
/* store colors by raycast sequence number */
|
||||
@@ -70,16 +78,44 @@ public class ColorScheme {
|
||||
c[1] = new Color(Integer.parseInt(split[9]), Integer.parseInt(split[10]), Integer.parseInt(split[11]), Integer.parseInt(split[12]));
|
||||
c[2] = new Color(Integer.parseInt(split[13]), Integer.parseInt(split[14]), Integer.parseInt(split[15]), Integer.parseInt(split[16]));
|
||||
|
||||
colors.put(id, c);
|
||||
if(dat != null) {
|
||||
if(enab_datacolor) {
|
||||
Color[][] dcolor = datacolors[id]; /* Existing list? */
|
||||
if(dcolor == null) {
|
||||
dcolor = new Color[16][]; /* Make 16 index long list */
|
||||
datacolors[id] = dcolor;
|
||||
}
|
||||
if((dat >= 0) && (dat < 16)) { /* Add color to list */
|
||||
dcolor[dat] = c;
|
||||
}
|
||||
}
|
||||
if(dat == 0) { /* Index zero is base color too */
|
||||
colors[id] = c;
|
||||
}
|
||||
}
|
||||
else {
|
||||
colors[id] = c;
|
||||
}
|
||||
nc += 1;
|
||||
}
|
||||
scanner.close();
|
||||
/* Last, push base color into any open slots in data colors list */
|
||||
for(int k = 0; k < 256; k++) {
|
||||
Color[][] dc = datacolors[k]; /* see if data colors too */
|
||||
if(dc != null) {
|
||||
Color[] c = colors[k];
|
||||
for(int i = 0; i < 16; i++) {
|
||||
if(dc[i] == null)
|
||||
dc[i] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
log.log(Level.SEVERE, "Could not load colors '" + name + "' ('" + colorSchemeFile + "').", e);
|
||||
Log.severe("Could not load colors '" + name + "' ('" + colorSchemeFile + "').", e);
|
||||
return null;
|
||||
} catch (FileNotFoundException e) {
|
||||
log.log(Level.SEVERE, "Could not load colors '" + name + "' ('" + colorSchemeFile + "'): File not found.", e);
|
||||
Log.severe("Could not load colors '" + name + "' ('" + colorSchemeFile + "'): File not found.", e);
|
||||
}
|
||||
return new ColorScheme(name, colors);
|
||||
return new ColorScheme(name, colors, datacolors);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.dynmap;
|
||||
|
||||
public abstract class Component {
|
||||
protected DynmapPlugin plugin;
|
||||
protected ConfigurationNode configuration;
|
||||
public Component(DynmapPlugin plugin, ConfigurationNode configuration) {
|
||||
this.plugin = plugin;
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.dynmap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class ComponentManager {
|
||||
public Set<Component> components = new HashSet<Component>();
|
||||
public Map<String, List<Component>> componentLookup = new HashMap<String, List<Component>>();
|
||||
|
||||
public void add(Component c) {
|
||||
if (components.add(c)) {
|
||||
String key = c.getClass().toString();
|
||||
List<Component> clist = componentLookup.get(key);
|
||||
if (clist == null) {
|
||||
clist = new ArrayList<Component>();
|
||||
componentLookup.put(key, clist);
|
||||
}
|
||||
clist.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(Component c) {
|
||||
if (components.remove(c)) {
|
||||
String key = c.getClass().toString();
|
||||
List<Component> clist = componentLookup.get(key);
|
||||
if (clist != null) {
|
||||
clist.remove(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
componentLookup.clear();
|
||||
components.clear();
|
||||
}
|
||||
|
||||
public Iterable<Component> getComponents(Class<Component> c) {
|
||||
List<Component> list = componentLookup.get(c.toString());
|
||||
if (list == null)
|
||||
return new ArrayList<Component>();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user