├── .gitignore ├── README ├── pom.xml └── src └── main ├── assembly └── package.xml ├── java └── org │ └── dynmap │ └── mobs │ ├── DynmapMobsPlugin.java │ └── MetricsLite.java └── resources ├── 8x8 ├── bat.png ├── bear.png ├── bigcat.png ├── birdy.png ├── blaze.png ├── boar.png ├── boat.png ├── bunny.png ├── cat.png ├── caveogre.png ├── cavespider.png ├── chicken.png ├── chickenjockey.png ├── command-minecart.png ├── cow.png ├── creeper.png ├── crocodile.png ├── deer.png ├── dolphin.png ├── donkey.png ├── duck.png ├── elderguardian.png ├── enderdragon.png ├── enderman.png ├── endermite.png ├── evoker.png ├── explosive-minecart.png ├── fireogre.png ├── fishy.png ├── flamewraith.png ├── fox.png ├── ghast.png ├── giant.png ├── goat.png ├── golem.png ├── guardian.png ├── hellrat.png ├── hopper-minecart.png ├── horse.png ├── husk.png ├── jellyfish.png ├── kitty.png ├── llama.png ├── magmacube.png ├── mice.png ├── minecart.png ├── mooshroom.png ├── mule.png ├── ocelot.png ├── ogre.png ├── ostrich.png ├── pig.png ├── polarbear.png ├── powered-minecart.png ├── rabbit.png ├── rat.png ├── ray.png ├── scorpion.png ├── shark.png ├── sheep.png ├── shulker.png ├── silverfish.png ├── skeleton.png ├── skeletonhorse.png ├── slime.png ├── snake.png ├── snowgolem.png ├── spawner-minecart.png ├── spider.png ├── spiderjockey.png ├── squid.png ├── storage-minecart.png ├── stray.png ├── tamedwolf.png ├── turtle.png ├── vanillahorse.png ├── vanillapolarbear.png ├── vex.png ├── villager.png ├── vindicator.png ├── werewolf.png ├── wildwolf.png ├── witch.png ├── wither.png ├── witherskeleton.png ├── wolf.png ├── wraith.png ├── zombie.png ├── zombiehorse.png ├── zombiepigman.png └── zombievillager.png ├── bat.png ├── bear.png ├── bigcat.png ├── birdy.png ├── blaze.png ├── boar.png ├── boat.png ├── bunny.png ├── cat.png ├── caveogre.png ├── cavespider.png ├── chicken.png ├── chickenjockey.png ├── command-minecart.png ├── config.yml ├── cow.png ├── creeper.png ├── crocodile.png ├── deer.png ├── dolphin.png ├── donkey.png ├── duck.png ├── elderguardian.png ├── enderdragon.png ├── enderman.png ├── endermite.png ├── evoker.png ├── explosive-minecart.png ├── fireogre.png ├── fishy.png ├── flamewraith.png ├── fox.png ├── ghast.png ├── giant.png ├── goat.png ├── golem.png ├── guardian.png ├── hellrat.png ├── hopper-minecart.png ├── horse.png ├── husk.png ├── jellyfish.png ├── kitty.png ├── llama.png ├── magmacube.png ├── mice.png ├── minecart.png ├── mooshroom.png ├── mule.png ├── ocelot.png ├── ogre.png ├── ostrich.png ├── pig.png ├── plugin.yml ├── polarbear.png ├── powered-minecart.png ├── rabbit.png ├── rat.png ├── ray.png ├── scorpion.png ├── shark.png ├── sheep.png ├── shulker.png ├── silverfish.png ├── skeleton.png ├── skeletonhorse.png ├── slime.png ├── snake.png ├── snowgolem.png ├── spawner-minecart.png ├── spider.png ├── spiderjockey.png ├── squid.png ├── storage-minecart.png ├── stray.png ├── tamedwolf.png ├── turtle.png ├── vanillahorse.png ├── vanillapolarbear.png ├── vex.png ├── villager.png ├── vindicator.png ├── werewolf.png ├── wildwolf.png ├── witch.png ├── wither.png ├── witherskeleton.png ├── wolf.png ├── wraith.png ├── zombie.png ├── zombiehorse.png ├── zombiepigman.png └── zombievillager.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse stuff 2 | /.classpath 3 | /.project 4 | /.settings 5 | 6 | # netbeans 7 | /nbproject 8 | 9 | # we use maven! 10 | /build.xml 11 | 12 | # maven 13 | /target 14 | 15 | # vim 16 | .*.sw[a-p] 17 | 18 | # various other potential build files 19 | /build 20 | /bin 21 | /dist 22 | /manifest.mf 23 | 24 | # Mac filesystem dust 25 | /.DS_Store -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/README -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | dynmap-mobs 4 | dynmap-mobs 5 | 6 | 7 | 8 | src/main/resources 9 | true 10 | 11 | *.yml 12 | *.txt 13 | 14 | 15 | 16 | src/main/resources 17 | false 18 | 19 | *.yml 20 | *.txt 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.apache.maven.plugins 28 | maven-compiler-plugin 29 | 2.0.2 30 | 31 | 1.6 32 | 1.6 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | bukkit-repo 45 | http://hub.spigotmc.org/nexus/content/groups/public/ 46 | 47 | 48 | 49 | 50 | 51 | 52 | dynmap-repo 53 | http://repo.mikeprimm.com/ 54 | 55 | 56 | 57 | 58 | 59 | org.bukkit 60 | bukkit 61 | 1.11-R0.1-SNAPSHOT 62 | 63 | 64 | us.dynmap 65 | dynmap-api 66 | 2.2-SNAPSHOT 67 | 68 | 69 | 70 | UTF-8 71 | 72 | 1.4 73 | -------------------------------------------------------------------------------- /src/main/assembly/package.xml: -------------------------------------------------------------------------------- 1 | 2 | bin 3 | false 4 | 5 | zip 6 | 7 | 8 | 9 | 10 | 11 | ${project.build.directory}/${artifactId}-${version}.jar 12 | / 13 | dynmap-mobs.jar 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/org/dynmap/mobs/DynmapMobsPlugin.java: -------------------------------------------------------------------------------- 1 | package org.dynmap.mobs; 2 | import java.io.IOException; 3 | import java.io.InputStream; 4 | import java.lang.reflect.Method; 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | import java.util.HashSet; 8 | import java.util.List; 9 | import java.util.Map; 10 | import java.util.Set; 11 | import java.util.logging.Level; 12 | import java.util.logging.Logger; 13 | 14 | import org.bukkit.Bukkit; 15 | import org.bukkit.Location; 16 | import org.bukkit.OfflinePlayer; 17 | import org.bukkit.Server; 18 | import org.bukkit.World; 19 | import org.bukkit.block.Block; 20 | import org.bukkit.configuration.file.FileConfiguration; 21 | import org.bukkit.entity.AnimalTamer; 22 | import org.bukkit.entity.Entity; 23 | import org.bukkit.entity.Horse; 24 | import org.bukkit.entity.LivingEntity; 25 | import org.bukkit.entity.Ocelot; 26 | import org.bukkit.entity.Player; 27 | import org.bukkit.entity.Skeleton; 28 | import org.bukkit.entity.Horse.Variant; 29 | import org.bukkit.entity.Skeleton.SkeletonType; 30 | import org.bukkit.entity.Villager; 31 | import org.bukkit.entity.Villager.Profession; 32 | import org.bukkit.entity.Wolf; 33 | import org.bukkit.entity.Zombie; 34 | import org.bukkit.event.EventHandler; 35 | import org.bukkit.event.EventPriority; 36 | import org.bukkit.event.Listener; 37 | import org.bukkit.event.server.PluginEnableEvent; 38 | import org.bukkit.plugin.java.JavaPlugin; 39 | import org.bukkit.plugin.Plugin; 40 | import org.bukkit.plugin.PluginManager; 41 | import org.dynmap.DynmapAPI; 42 | import org.dynmap.markers.MarkerAPI; 43 | import org.dynmap.markers.MarkerIcon; 44 | import org.dynmap.markers.MarkerSet; 45 | import org.dynmap.markers.Marker; 46 | 47 | public class DynmapMobsPlugin extends JavaPlugin { 48 | private static Logger log; 49 | Plugin dynmap; 50 | DynmapAPI api; 51 | MarkerAPI markerapi; 52 | FileConfiguration cfg; 53 | MarkerSet set; 54 | MarkerSet vset; 55 | double res; /* Position resolution */ 56 | long updperiod; 57 | long vupdperiod; 58 | int hideifundercover; 59 | int hideifshadow; 60 | boolean tinyicons; 61 | boolean nolabels; 62 | boolean vtinyicons; 63 | boolean vnolabels; 64 | boolean inc_coord; 65 | boolean vinc_coord; 66 | boolean stop; 67 | boolean reload = false; 68 | static String obcpackage; 69 | static String nmspackage; 70 | Method gethandle; 71 | 72 | int updates_per_tick = 20; 73 | int vupdates_per_tick = 20; 74 | 75 | HashMap lookup_cache = new HashMap(); 76 | HashMap vlookup_cache = new HashMap(); 77 | 78 | @Override 79 | public void onLoad() { 80 | log = this.getLogger(); 81 | } 82 | 83 | public static String mapClassName(String n) { 84 | if(n.startsWith("org.bukkit.craftbukkit")) { 85 | n = getOBCPackage() + n.substring("org.bukkit.craftbukkit".length()); 86 | } 87 | else if(n.startsWith("net.minecraft.server")) { 88 | n = getNMSPackage() + n.substring("net.minecraft.server".length()); 89 | } 90 | return n; 91 | } 92 | 93 | /* Mapping of mobs to icons */ 94 | private static class MobMapping { 95 | String mobid; 96 | boolean enabled; 97 | Class mobclass; 98 | Class entclass; 99 | String cls_id; 100 | String entclsid; 101 | String label; 102 | MarkerIcon icon; 103 | 104 | MobMapping(String id, String clsid, String lbl) { 105 | this(id, clsid, lbl, null); 106 | } 107 | @SuppressWarnings("unchecked") 108 | MobMapping(String id, String clsid, String lbl, String entclsid) { 109 | mobid = id; 110 | label = lbl; 111 | cls_id = clsid; 112 | } 113 | public void init() { 114 | try { 115 | mobclass = (Class) Class.forName(mapClassName(cls_id)); 116 | } catch (ClassNotFoundException cnfx) { 117 | mobclass = null; 118 | } 119 | try { 120 | this.entclsid = entclsid; 121 | if(entclsid != null) { 122 | entclass = (Class) Class.forName(mapClassName(entclsid)); 123 | } 124 | } catch (ClassNotFoundException cnfx) { 125 | entclass = null; 126 | } 127 | } 128 | }; 129 | MobMapping mobs[]; 130 | 131 | private MobMapping configmobs[] = { 132 | // Mo'Creatures 133 | new MobMapping("horse", "org.bukkit.entity.Animals", "Horse", "net.minecraft.server.MoCEntityHorse"), 134 | new MobMapping("fireogre", "org.bukkit.entity.Monster", "Fire Ogre", "net.minecraft.server.MoCEntityFireOgre"), 135 | new MobMapping("caveogre", "org.bukkit.entity.Monster", "Cave Ogre", "net.minecraft.server.MoCEntityCaveOgre"), 136 | new MobMapping("ogre", "org.bukkit.entity.Monster", "Ogre", "net.minecraft.server.MoCEntityOgre"), 137 | new MobMapping("boar", "org.bukkit.entity.Pig", "Boar", "net.minecraft.server.MoCEntityBoar"), 138 | new MobMapping("polarbear", "org.bukkit.entity.Animals", "Polar Bear", "net.minecraft.server.MoCEntityPolarBear"), 139 | new MobMapping("bear", "org.bukkit.entity.Animals", "Bear", "net.minecraft.server.MoCEntityBear"), 140 | new MobMapping("duck", "org.bukkit.entity.Chicken", "Duck", "net.minecraft.server.MoCEntityDuck"), 141 | new MobMapping("bigcat", "org.bukkit.entity.Animals", "Big Cat", "net.minecraft.server.MoCEntityBigCat"), 142 | new MobMapping("deer", "org.bukkit.entity.Animals", "Deer", "net.minecraft.server.MoCEntityDeer"), 143 | new MobMapping("wildwolf", "org.bukkit.entity.Monster", "Wild Wolf", "net.minecraft.server.MoCEntityWWolf"), 144 | new MobMapping("flamewraith", "org.bukkit.entity.Monster", "Wraith", "net.minecraft.server.MoCEntityFlameWraith"), 145 | new MobMapping("wraith", "org.bukkit.entity.Monster", "Wraith", "net.minecraft.server.MoCEntityWraith"), 146 | new MobMapping("bunny", "org.bukkit.entity.Animals", "Bunny", "net.minecraft.server.MoCEntityBunny"), 147 | new MobMapping("bird", "org.bukkit.entity.Animals", "Bird", "net.minecraft.server.MoCEntityBird"), 148 | new MobMapping("fox", "org.bukkit.entity.Animals", "Bird", "net.minecraft.server.MoCEntityFox"), 149 | new MobMapping("werewolf", "org.bukkit.entity.Monster", "Werewolf", "net.minecraft.server.MoCEntityWerewolf"), 150 | new MobMapping("shark", "org.bukkit.entity.WaterMob", "Shark", "net.minecraft.server.MoCEntityShark"), 151 | new MobMapping("dolphin", "org.bukkit.entity.WaterMob", "Shark", "net.minecraft.server.MoCEntityDolphin"), 152 | new MobMapping("fishy", "org.bukkit.entity.WaterMob", "Fishy", "net.minecraft.server.MoCEntityFishy"), 153 | new MobMapping("kitty", "org.bukkit.entity.Animals", "Kitty", "net.minecraft.server.MoCEntityKitty"), 154 | new MobMapping("hellrat", "org.bukkit.entity.Monster", "Hell Rat", "net.minecraft.server.MoCEntityHellRat"), 155 | new MobMapping("rat", "org.bukkit.entity.Monster", "Rat", "net.minecraft.server.MoCEntityRat"), 156 | new MobMapping("mouse", "org.bukkit.entity.Animals", "Mouse", "net.minecraft.server.MoCEntityMouse"), 157 | new MobMapping("scorpion", "org.bukkit.entity.Monster", "Scorpion", "net.minecraft.server.MoCEntityScorpion"), 158 | new MobMapping("turtle", "org.bukkit.entity.Animals", "Turtle", "net.minecraft.server.MoCEntityTurtle"), 159 | new MobMapping("crocodile", "org.bukkit.entity.Animals", "Crocodile", "net.minecraft.server.MoCEntityCrocodile"), 160 | new MobMapping("ray", "org.bukkit.entity.WaterMob", "Ray", "net.minecraft.server.MoCEntityRay"), 161 | new MobMapping("jellyfish", "org.bukkit.entity.WaterMob", "Jelly Fish", "net.minecraft.server.MoCEntityJellyFish"), 162 | new MobMapping("goat", "org.bukkit.entity.Animals", "Goat", "net.minecraft.server.MoCEntityGoat"), 163 | new MobMapping("snake", "org.bukkit.entity.Animals", "Snake", "net.minecraft.server.MoCEntitySnake"), 164 | new MobMapping("ostrich", "org.bukkit.entity.Animals", "Ostrich", "net.minecraft.server.MoCEntityOstrich"), 165 | // Standard hostile 166 | new MobMapping("elderguardian", "org.bukkit.entity.ElderGuardian", "Elder Guardian"), 167 | new MobMapping("witherskeleton", "org.bukkit.entity.WitherSkeleton", "Wither Skeleton"), 168 | new MobMapping("stray", "org.bukkit.entity.Stray", "Stray"), 169 | new MobMapping("husk", "org.bukkit.entity.Husk", "Husk"), 170 | new MobMapping("zombievillager", "org.bukkit.entity.ZombieVillager", "Zombie Villager"), 171 | new MobMapping("evoker", "org.bukkit.entity.Evoker", "Evoker"), 172 | new MobMapping("vex", "org.bukkit.entity.Vex", "Vex"), 173 | new MobMapping("vindicator", "org.bukkit.entity.Vindicator", "Vindicator"), 174 | new MobMapping("creeper", "org.bukkit.entity.Creeper", "Creeper"), 175 | new MobMapping("skeleton", "org.bukkit.entity.Skeleton", "Skeleton"), 176 | new MobMapping("giant", "org.bukkit.entity.Giant", "Giant"), 177 | new MobMapping("ghast", "org.bukkit.entity.Ghast", "Ghast"), 178 | new MobMapping("zombiepigman", "org.bukkit.entity.PigZombie", "Zombie Pigman"), 179 | new MobMapping("zombie", "org.bukkit.entity.Zombie", "Zombie"), /* Must be last zombie type */ 180 | new MobMapping("enderman", "org.bukkit.entity.Enderman", "Enderman"), 181 | new MobMapping("cavespider", "org.bukkit.entity.CaveSpider", "Cave Spider"), 182 | new MobMapping("spider", "org.bukkit.entity.Spider", "Spider"), /* Must be last spider type */ 183 | new MobMapping("spiderjockey", "org.bukkit.entity.Spider", "Spider Jockey"), /* Must be just after spider */ 184 | new MobMapping("silverfish", "org.bukkit.entity.Silverfish", "Silverfish"), 185 | new MobMapping("blaze", "org.bukkit.entity.Blaze", "Blaze"), 186 | new MobMapping("magmacube", "org.bukkit.entity.MagmaCube", "Magma Cube"), 187 | new MobMapping("slime", "org.bukkit.entity.Slime", "Slime"), /* Must be last slime type */ 188 | new MobMapping("enderdragon", "org.bukkit.entity.EnderDragon", "Ender Dragon"), 189 | new MobMapping("wither", "org.bukkit.entity.Wither", "Wither"), 190 | new MobMapping("witch", "org.bukkit.entity.Witch", "Witch"), 191 | new MobMapping("endermite", "org.bukkit.entity.Endermite", "Endermite"), 192 | new MobMapping("guardian", "org.bukkit.entity.Guardian", "Guardian"), 193 | new MobMapping("shulker", "org.bukkit.entity.Shulker", "Shulker"), 194 | // Standard passive 195 | new MobMapping("skeletonhorse", "org.bukkit.entity.SkeletonHorse", "Skeleton Horse"), 196 | new MobMapping("zombiehorse", "org.bukkit.entity.ZombieHorse", "Zombie Horse"), 197 | new MobMapping("donkey", "org.bukkit.entity.Donkey", "Donkey"), 198 | new MobMapping("mule", "org.bukkit.entity.Mule", "Mule"), 199 | new MobMapping("bat", "org.bukkit.entity.Bat", "Bat"), 200 | new MobMapping("pig", "org.bukkit.entity.Pig", "Pig"), 201 | new MobMapping("sheep", "org.bukkit.entity.Sheep", "Sheep"), 202 | new MobMapping("cow", "org.bukkit.entity.Cow", "Cow"), 203 | new MobMapping("chicken", "org.bukkit.entity.Chicken", "Chicken"), 204 | new MobMapping("chickenjockey", "org.bukkit.entity.Chicken", "Chicken Jockey"), /* Must be just after chicken */ 205 | new MobMapping("squid", "org.bukkit.entity.Squid", "Squid"), 206 | new MobMapping("wolf", "org.bukkit.entity.Wolf", "Wolf"), 207 | new MobMapping("tamedwolf", "org.bukkit.entity.Wolf", "Wolf"), /* Must be just after wolf */ 208 | new MobMapping("mooshroom", "org.bukkit.entity.MushroomCow", "Mooshroom"), 209 | new MobMapping("snowgolem", "org.bukkit.entity.Snowman", "Snow Golem"), 210 | new MobMapping("ocelot", "org.bukkit.entity.Ocelot", "Ocelot"), 211 | new MobMapping("cat", "org.bukkit.entity.Ocelot", "Cat"), /* Must be just after ocelot */ 212 | new MobMapping("golem", "org.bukkit.entity.IronGolem", "Iron Golem"), 213 | new MobMapping("vanillahorse", "org.bukkit.entity.Horse", "Horse"), 214 | new MobMapping("rabbit", "org.bukkit.entity.Rabbit", "Rabbit"), 215 | new MobMapping("vanillapolarbear", "org.bukkit.entity.PolarBear", "Polar Bear"), 216 | new MobMapping("llama", "org.bukkit.entity.Llama", "Llama"), 217 | new MobMapping("villager", "org.bukkit.entity.Villager", "Villager") 218 | }; 219 | private MobMapping configvehicles[] = { 220 | // Command Minecart 221 | new MobMapping("command-minecart", "org.bukkit.entity.minecart.CommandMinecart", "Command Minecart"), 222 | // Explosive Minecart 223 | new MobMapping("explosive-minecart", "org.bukkit.entity.minecart.ExplosiveMinecart", "Explosive Minecart"), 224 | // Hopper Minecart 225 | new MobMapping("hopper-minecart", "org.bukkit.entity.minecart.HopperMinecart", "Hopper Minecart"), 226 | // Powered Minecart 227 | new MobMapping("powered-minecart", "org.bukkit.entity.minecart.PoweredMinecart", "Powered Minecart"), 228 | // Rideable Minecart 229 | new MobMapping("minecart", "org.bukkit.entity.minecart.RideableMinecart", "Minecart"), 230 | // Spawner Minecart 231 | new MobMapping("spawner-minecart", "org.bukkit.entity.minecart.SpawnerMinecart", "Spawner Minecart"), 232 | // Storage Minecart 233 | new MobMapping("storage-minecart", "org.bukkit.entity.minecart.StorageMinecart", "Storage Minecart"), 234 | // Boat 235 | new MobMapping("boat", "org.bukkit.entity.Boat", "Boat") 236 | }; 237 | MobMapping vehicles[]; 238 | 239 | public static void info(String msg) { 240 | log.log(Level.INFO, msg); 241 | } 242 | public static void severe(String msg) { 243 | log.log(Level.SEVERE, msg); 244 | } 245 | 246 | private class MobUpdate implements Runnable { 247 | Map newmap = new HashMap(); /* Build new map */ 248 | ArrayList worldsToDo = null; 249 | List mobsToDo = null; 250 | int mobIndex = 0; 251 | World curWorld = null; 252 | 253 | public void run() { 254 | if(stop || (mobs == null) || (mobs.length == 0) || (set == null)) { 255 | return; 256 | } 257 | // If needed, prime world list 258 | if (worldsToDo == null) { 259 | worldsToDo = new ArrayList(getServer().getWorlds()); 260 | } 261 | while (mobsToDo == null) { 262 | if (worldsToDo.isEmpty()) { 263 | // Now, review old map - anything left is gone 264 | for(Marker oldm : mobicons.values()) { 265 | oldm.deleteMarker(); 266 | } 267 | // And replace with new map 268 | mobicons = newmap; 269 | // Schedule next run 270 | getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, new MobUpdate(), updperiod); 271 | return; 272 | } 273 | else { 274 | curWorld = worldsToDo.remove(0); // Get next world 275 | mobsToDo = curWorld.getLivingEntities(); // Get living entities 276 | mobIndex = 0; 277 | if ((mobsToDo != null) && mobsToDo.isEmpty()) { 278 | mobsToDo = null; 279 | } 280 | } 281 | } 282 | // Process up to limit per tick 283 | for (int cnt = 0; cnt < updates_per_tick; cnt++) { 284 | if (mobIndex >= mobsToDo.size()) { 285 | mobsToDo = null; 286 | break; 287 | } 288 | // Get next entity 289 | LivingEntity le = mobsToDo.get(mobIndex); 290 | mobIndex++; 291 | 292 | int i; 293 | 294 | /* See if entity is mob we care about */ 295 | String clsid = null; 296 | if(gethandle != null) { 297 | try { 298 | clsid = gethandle.invoke(le).getClass().getName(); 299 | } catch (Exception x) { 300 | } 301 | } 302 | 303 | if(clsid == null) 304 | clsid = le.getClass().getName(); 305 | Integer idx = lookup_cache.get(clsid); 306 | if(idx == null) { 307 | for(i = 0; i < mobs.length; i++) { 308 | if((mobs[i].mobclass != null) && mobs[i].mobclass.isInstance(le)){ 309 | if (mobs[i].entclsid == null) { 310 | break; 311 | } 312 | else if(gethandle != null) { 313 | Object obcentity = null; 314 | try { 315 | obcentity = gethandle.invoke(le); 316 | } catch (Exception x) { 317 | } 318 | if ((mobs[i].entclass != null) && (obcentity != null) && (mobs[i].entclass.isInstance(obcentity))) { 319 | break; 320 | } 321 | } 322 | } 323 | } 324 | lookup_cache.put(clsid, i); 325 | } 326 | else { 327 | i = idx; 328 | } 329 | if(i >= mobs.length) { 330 | continue; 331 | } 332 | 333 | String label = null; 334 | if(mobs[i].mobid.equals("spider")) { /* Check for jockey */ 335 | if(le.getPassenger() != null) { /* Has passenger? */ 336 | i = findNext(i, "spiderjockey"); /* Make jockey */ 337 | } 338 | } 339 | else if(mobs[i].mobid.equals("chicken")) { /* Check for jockey */ 340 | if(le.getPassenger() != null) { /* Has passenger? */ 341 | i = findNext(i, "chickenjockey"); /* Make jockey */ 342 | } 343 | } 344 | else if(mobs[i].mobid.equals("wolf")) { /* Check for tamed wolf */ 345 | Wolf wolf = (Wolf)le; 346 | if(wolf.isTamed()) { 347 | i = findNext(i, "tamedwolf"); 348 | AnimalTamer t = wolf.getOwner(); 349 | if((t != null) && (t instanceof OfflinePlayer)) { 350 | label = "Wolf (" + ((OfflinePlayer)t).getName() + ")"; 351 | } 352 | } 353 | } 354 | else if(mobs[i].mobid.equals("ocelot")) { /* Check for tamed ocelot */ 355 | Ocelot cat = (Ocelot)le; 356 | if(cat.isTamed()) { 357 | i = findNext(i, "cat"); 358 | AnimalTamer t = cat.getOwner(); 359 | if((t != null) && (t instanceof OfflinePlayer)) { 360 | label = "Cat (" + ((OfflinePlayer)t).getName() + ")"; 361 | } 362 | } 363 | } 364 | else if(mobs[i].mobid.equals("villager")) { 365 | Villager v = (Villager)le; 366 | Profession p = v.getProfession(); 367 | if(p != null) { 368 | switch(p) { 369 | case BLACKSMITH: 370 | label = "Blacksmith"; 371 | break; 372 | case BUTCHER: 373 | label = "Butcher"; 374 | break; 375 | case FARMER: 376 | label = "Farmer"; 377 | break; 378 | case LIBRARIAN: 379 | label = "Librarian"; 380 | break; 381 | case NITWIT: 382 | label = "Nitwit"; 383 | break; 384 | case PRIEST: 385 | label = "Priest"; 386 | break; 387 | } 388 | } 389 | } 390 | else if(mobs[i].mobid.equals("vanillahorse") || mobs[i].mobid.equals("donkey") || mobs[i].mobid.equals("mule") || mobs[i].mobid.equals("zombiehorse") || mobs[i].mobid.equals("skeletonhorse")) { /* Check for rider */ 391 | if(le.getPassenger() != null) { /* Has passenger? */ 392 | Entity e = le.getPassenger(); 393 | if (e instanceof Player) { 394 | label = label + " (" + ((Player)e).getName() + ")"; 395 | } 396 | } 397 | } 398 | if(i >= mobs.length) { 399 | continue; 400 | } 401 | if(label == null) { 402 | label = mobs[i].label; 403 | } 404 | Location loc = le.getLocation(); 405 | Block blk = null; 406 | if(hideifshadow < 15) { 407 | blk = loc.getBlock(); 408 | if(blk.getLightLevel() <= hideifshadow) { 409 | continue; 410 | } 411 | } 412 | if(hideifundercover < 15) { 413 | if(blk == null) blk = loc.getBlock(); 414 | if(blk.getLightFromSky() <= hideifundercover) { 415 | continue; 416 | } 417 | } 418 | /* See if we already have marker */ 419 | double x = Math.round(loc.getX() / res) * res; 420 | double y = Math.round(loc.getY() / res) * res; 421 | double z = Math.round(loc.getZ() / res) * res; 422 | Marker m = mobicons.remove(le.getEntityId()); 423 | if(nolabels) { 424 | label = ""; 425 | } 426 | else if(inc_coord) { 427 | label = label + " [" + (int)x + "," + (int)y + "," + (int)z + "]"; 428 | } 429 | if(m == null) { /* Not found? Need new one */ 430 | m = set.createMarker("mob"+le.getEntityId(), label, curWorld.getName(), x, y, z, mobs[i].icon, false); 431 | } 432 | else { /* Else, update position if needed */ 433 | m.setLocation(curWorld.getName(), x, y, z); 434 | m.setLabel(label); 435 | m.setMarkerIcon(mobs[i].icon); 436 | } 437 | if (m != null) { 438 | newmap.put(le.getEntityId(), m); /* Add to new map */ 439 | } 440 | } 441 | getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, this, 1); 442 | } 443 | } 444 | 445 | private class VehicleUpdate implements Runnable { 446 | Map newmap = new HashMap(); /* Build new map */ 447 | ArrayList worldsToDo = null; 448 | List vehiclesToDo = null; 449 | int vehiclesIndex = 0; 450 | World curWorld = null; 451 | 452 | public void run() { 453 | if(stop || (vehicles == null) || (vehicles.length == 0) || (vset == null)) { 454 | return; 455 | } 456 | // If needed, prime world list 457 | if (worldsToDo == null) { 458 | worldsToDo = new ArrayList(getServer().getWorlds()); 459 | } 460 | while (vehiclesToDo == null) { 461 | if (worldsToDo.isEmpty()) { 462 | // Now, review old map - anything left is gone 463 | for(Marker oldm : vehicleicons.values()) { 464 | oldm.deleteMarker(); 465 | } 466 | // And replace with new map 467 | vehicleicons = newmap; 468 | // Schedule next run 469 | getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, new VehicleUpdate(), vupdperiod); 470 | return; 471 | } 472 | else { 473 | curWorld = worldsToDo.remove(0); // Get next world 474 | vehiclesToDo = new ArrayList(curWorld.getEntitiesByClasses(org.bukkit.entity.Vehicle.class)); // Get vehicles 475 | vehiclesIndex = 0; 476 | if ((vehiclesToDo != null) && vehiclesToDo.isEmpty()) { 477 | vehiclesToDo = null; 478 | } 479 | } 480 | } 481 | // Process up to limit per tick 482 | for (int cnt = 0; cnt < vupdates_per_tick; cnt++) { 483 | if (vehiclesIndex >= vehiclesToDo.size()) { 484 | vehiclesToDo = null; 485 | break; 486 | } 487 | // Get next entity 488 | Entity le = vehiclesToDo.get(vehiclesIndex); 489 | vehiclesIndex++; 490 | 491 | int i; 492 | /* See if entity is vehicle we care about */ 493 | String clsid = null; 494 | if(gethandle != null) { 495 | try { 496 | clsid = gethandle.invoke(le).getClass().getName(); 497 | } catch (Exception x) { 498 | } 499 | } 500 | if(clsid == null) 501 | clsid = le.getClass().getName(); 502 | Integer idx = vlookup_cache.get(clsid); 503 | if(idx == null) { 504 | for(i = 0; i < vehicles.length; i++) { 505 | if((vehicles[i].mobclass != null) && vehicles[i].mobclass.isInstance(le)){ 506 | if (vehicles[i].entclsid == null) { 507 | break; 508 | } 509 | else if(gethandle != null) { 510 | Object obcentity = null; 511 | try { 512 | obcentity = gethandle.invoke(le); 513 | } catch (Exception x) { 514 | } 515 | if ((vehicles[i].entclass != null) && (obcentity != null) && (vehicles[i].entclass.isInstance(obcentity))) { 516 | break; 517 | } 518 | } 519 | } 520 | } 521 | vlookup_cache.put(clsid, i); 522 | } 523 | else { 524 | i = idx; 525 | } 526 | if(i >= vehicles.length) { 527 | continue; 528 | } 529 | String label = null; 530 | if(i >= vehicles.length) { 531 | continue; 532 | } 533 | if(label == null) { 534 | label = vehicles[i].label; 535 | } 536 | Location loc = le.getLocation(); 537 | if(curWorld.isChunkLoaded(loc.getBlockX() >> 4, loc.getBlockZ() >> 4) == false) { 538 | continue; 539 | } 540 | Block blk = null; 541 | if(hideifshadow < 15) { 542 | blk = loc.getBlock(); 543 | if(blk.getLightLevel() <= hideifshadow) { 544 | continue; 545 | } 546 | } 547 | if(hideifundercover < 15) { 548 | if(blk == null) blk = loc.getBlock(); 549 | if(blk.getLightFromSky() <= hideifundercover) { 550 | continue; 551 | } 552 | } 553 | /* See if we already have marker */ 554 | double x = Math.round(loc.getX() / res) * res; 555 | double y = Math.round(loc.getY() / res) * res; 556 | double z = Math.round(loc.getZ() / res) * res; 557 | Marker m = vehicleicons.remove(le.getEntityId()); 558 | if(vnolabels) 559 | label = ""; 560 | else if(vinc_coord) { 561 | label = label + " [" + (int)x + "," + (int)y + "," + (int)z + "]"; 562 | } 563 | if(m == null) { /* Not found? Need new one */ 564 | m = vset.createMarker("vehicle"+le.getEntityId(), label, curWorld.getName(), x, y, z, vehicles[i].icon, false); 565 | } 566 | else { /* Else, update position if needed */ 567 | m.setLocation(curWorld.getName(), x, y, z); 568 | m.setLabel(label); 569 | m.setMarkerIcon(vehicles[i].icon); 570 | } 571 | newmap.put(le.getEntityId(), m); /* Add to new map */ 572 | } 573 | getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, this, 1); 574 | } 575 | } 576 | 577 | private Map mobicons = new HashMap(); 578 | private Map vehicleicons = new HashMap(); 579 | 580 | private int findNext(int idx, String mobid) { 581 | idx++; 582 | if ((idx < mobs.length) && mobs[idx].mobid.equals(mobid)) { 583 | return idx; 584 | } 585 | else { 586 | return mobs.length; 587 | } 588 | } 589 | 590 | private class OurServerListener implements Listener { 591 | @EventHandler(priority=EventPriority.MONITOR) 592 | public void onPluginEnable(PluginEnableEvent event) { 593 | Plugin p = event.getPlugin(); 594 | String name = p.getDescription().getName(); 595 | if(name.equals("dynmap")) { 596 | activate(); 597 | } 598 | } 599 | } 600 | 601 | public void onEnable() { 602 | info("initializing"); 603 | PluginManager pm = getServer().getPluginManager(); 604 | /* Get dynmap */ 605 | dynmap = pm.getPlugin("dynmap"); 606 | if(dynmap == null) { 607 | severe("Cannot find dynmap!"); 608 | return; 609 | } 610 | api = (DynmapAPI)dynmap; /* Get API */ 611 | 612 | getServer().getPluginManager().registerEvents(new OurServerListener(), this); 613 | 614 | /* If enabled, activate */ 615 | if(dynmap.isEnabled()) 616 | activate(); 617 | 618 | try { 619 | MetricsLite ml = new MetricsLite(this); 620 | ml.start(); 621 | } catch (IOException iox) { 622 | } 623 | } 624 | 625 | private static String getNMSPackage() { 626 | if (nmspackage == null) { 627 | Server srv = Bukkit.getServer(); 628 | /* Get getHandle() method */ 629 | try { 630 | Method m = srv.getClass().getMethod("getHandle"); 631 | Object scm = m.invoke(srv); /* And use it to get SCM (nms object) */ 632 | nmspackage = scm.getClass().getPackage().getName(); 633 | } catch (Exception x) { 634 | nmspackage = "net.minecraft.server"; 635 | } 636 | } 637 | return nmspackage; 638 | } 639 | private static String getOBCPackage() { 640 | if (obcpackage == null) { 641 | obcpackage = Bukkit.getServer().getClass().getPackage().getName(); 642 | } 643 | return obcpackage; 644 | } 645 | 646 | private void activate() { 647 | /* look up the getHandle method for CraftEntity */ 648 | try { 649 | Class cls = Class.forName(mapClassName("org.bukkit.craftbukkit.entity.CraftEntity")); 650 | gethandle = cls.getMethod("getHandle"); 651 | } catch (ClassNotFoundException cnfx) { 652 | } catch (NoSuchMethodException e) { 653 | } catch (SecurityException e) { 654 | } 655 | if(gethandle == null) { 656 | severe("Unable to locate CraftEntity.getHandle() - cannot process most Mo'Creatures mobs"); 657 | } 658 | 659 | /* Now, get markers API */ 660 | markerapi = api.getMarkerAPI(); 661 | if(markerapi == null) { 662 | severe("Error loading Dynmap marker API!"); 663 | return; 664 | } 665 | /* Load configuration */ 666 | if(reload) { 667 | reloadConfig(); 668 | if(set != null) { 669 | set.deleteMarkerSet(); 670 | set = null; 671 | } 672 | if(vset != null) { 673 | vset.deleteMarkerSet(); 674 | vset = null; 675 | } 676 | mobicons.clear(); 677 | vehicleicons.clear(); 678 | lookup_cache.clear(); 679 | } 680 | else { 681 | reload = true; 682 | } 683 | this.saveDefaultConfig(); 684 | FileConfiguration cfg = getConfig(); 685 | cfg.options().copyDefaults(true); /* Load defaults, if needed */ 686 | this.saveConfig(); /* Save updates, if needed */ 687 | 688 | /* Now, check which mobs are enabled */ 689 | Set> clsset = new HashSet>(); 690 | int cnt = 0; 691 | for(int i = 0; i < configmobs.length; i++) { 692 | configmobs[i].init(); 693 | configmobs[i].enabled = cfg.getBoolean("mobs." + configmobs[i].mobid, false); 694 | configmobs[i].icon = markerapi.getMarkerIcon("mobs." + configmobs[i].mobid); 695 | InputStream in = null; 696 | if(tinyicons) 697 | in = getClass().getResourceAsStream("/8x8/" + configmobs[i].mobid + ".png"); 698 | if(in == null) 699 | in = getClass().getResourceAsStream("/" + configmobs[i].mobid + ".png"); 700 | if(in != null) { 701 | if(configmobs[i].icon == null) 702 | configmobs[i].icon = markerapi.createMarkerIcon("mobs." + configmobs[i].mobid, configmobs[i].label, in); 703 | else /* Update image */ 704 | configmobs[i].icon.setMarkerIconImage(in); 705 | } 706 | if(configmobs[i].icon == null) { 707 | configmobs[i].icon = markerapi.getMarkerIcon(MarkerIcon.DEFAULT); 708 | } 709 | if(configmobs[i].enabled) { 710 | cnt++; 711 | } 712 | } 713 | /* Make list of just enabled mobs */ 714 | mobs = new MobMapping[cnt]; 715 | for(int i = 0, j = 0; i < configmobs.length; i++) { 716 | if(configmobs[i].enabled) { 717 | mobs[j] = configmobs[i]; 718 | j++; 719 | clsset.add(configmobs[i].mobclass); 720 | } 721 | } 722 | 723 | hideifshadow = cfg.getInt("update.hideifshadow", 15); 724 | hideifundercover = cfg.getInt("update.hideifundercover", 15); 725 | /* Now, add marker set for mobs (make it transient) */ 726 | if(mobs.length > 0) { 727 | set = markerapi.getMarkerSet("mobs.markerset"); 728 | if(set == null) 729 | set = markerapi.createMarkerSet("mobs.markerset", cfg.getString("layer.name", "Mobs"), null, false); 730 | else 731 | set.setMarkerSetLabel(cfg.getString("layer.name", "Mobs")); 732 | if(set == null) { 733 | severe("Error creating marker set"); 734 | return; 735 | } 736 | set.setLayerPriority(cfg.getInt("layer.layerprio", 10)); 737 | set.setHideByDefault(cfg.getBoolean("layer.hidebydefault", false)); 738 | int minzoom = cfg.getInt("layer.minzoom", 0); 739 | if(minzoom > 0) /* Don't call if non-default - lets us work with pre-0.28 dynmap */ 740 | set.setMinZoom(minzoom); 741 | tinyicons = cfg.getBoolean("layer.tinyicons", false); 742 | nolabels = cfg.getBoolean("layer.nolabels", false); 743 | inc_coord = cfg.getBoolean("layer.inc-coord", false); 744 | /* Get position resolution */ 745 | res = cfg.getDouble("update.resolution", 1.0); 746 | /* Set up update job - based on period */ 747 | double per = cfg.getDouble("update.period", 5.0); 748 | if(per < 2.0) per = 2.0; 749 | updperiod = (long)(per*20.0); 750 | updates_per_tick = cfg.getInt("update.mobs-per-tick", 20); 751 | stop = false; 752 | getServer().getScheduler().scheduleSyncDelayedTask(this, new MobUpdate(), updperiod); 753 | info("Enable layer for mobs"); 754 | } 755 | else { 756 | info("Layer for mobs disabled"); 757 | } 758 | 759 | /* Now, check which vehicles are enabled */ 760 | clsset = new HashSet>(); 761 | cnt = 0; 762 | for(int i = 0; i < configvehicles.length; i++) { 763 | configvehicles[i].init(); 764 | configvehicles[i].enabled = cfg.getBoolean("vehicles." + configvehicles[i].mobid, false); 765 | configvehicles[i].icon = markerapi.getMarkerIcon("vehicles." + configvehicles[i].mobid); 766 | InputStream in = null; 767 | if(tinyicons) 768 | in = getClass().getResourceAsStream("/8x8/" + configvehicles[i].mobid + ".png"); 769 | if(in == null) 770 | in = getClass().getResourceAsStream("/" + configvehicles[i].mobid + ".png"); 771 | if(in != null) { 772 | if(configvehicles[i].icon == null) 773 | configvehicles[i].icon = markerapi.createMarkerIcon("vehicles." + configvehicles[i].mobid, configvehicles[i].label, in); 774 | else /* Update image */ 775 | configvehicles[i].icon.setMarkerIconImage(in); 776 | } 777 | if(configvehicles[i].icon == null) { 778 | configvehicles[i].icon = markerapi.getMarkerIcon(MarkerIcon.DEFAULT); 779 | } 780 | if(configvehicles[i].enabled) { 781 | cnt++; 782 | } 783 | } 784 | /* Make list of just enabled vehicles */ 785 | vehicles = new MobMapping[cnt]; 786 | for(int i = 0, j = 0; i < configvehicles.length; i++) { 787 | if(configvehicles[i].enabled) { 788 | vehicles[j] = configvehicles[i]; 789 | j++; 790 | clsset.add(configvehicles[i].mobclass); 791 | } 792 | } 793 | /* Now, add marker set for vehicles (make it transient) */ 794 | if(vehicles.length > 0) { 795 | vset = markerapi.getMarkerSet("vehicles.markerset"); 796 | if(vset == null) 797 | vset = markerapi.createMarkerSet("vehicles.markerset", cfg.getString("vehiclelayer.name", "Vehicles"), null, false); 798 | else 799 | vset.setMarkerSetLabel(cfg.getString("vehiclelayer.name", "Vehicles")); 800 | if(vset == null) { 801 | severe("Error creating marker set"); 802 | return; 803 | } 804 | vset.setLayerPriority(cfg.getInt("vehiclelayer.layerprio", 10)); 805 | vset.setHideByDefault(cfg.getBoolean("vehiclelayer.hidebydefault", false)); 806 | int minzoom = cfg.getInt("vehiclelayer.minzoom", 0); 807 | if(minzoom > 0) /* Don't call if non-default - lets us work with pre-0.28 dynmap */ 808 | vset.setMinZoom(minzoom); 809 | vtinyicons = cfg.getBoolean("vehiclelayer.tinyicons", false); 810 | vnolabels = cfg.getBoolean("vehiclelayer.nolabels", false); 811 | vinc_coord = cfg.getBoolean("vehiclelayer.inc-coord", false); 812 | /* Get position resolution */ 813 | res = cfg.getDouble("update.resolution", 1.0); 814 | /* Set up update job - based on period */ 815 | double per = cfg.getDouble("update.vehicleperiod", 5.0); 816 | if(per < 2.0) per = 2.0; 817 | vupdperiod = (long)(per*20.0); 818 | vupdates_per_tick = cfg.getInt("update.vehicles-per-tick", 20); 819 | stop = false; 820 | getServer().getScheduler().scheduleSyncDelayedTask(this, new VehicleUpdate(), vupdperiod / 3); 821 | info("Enable layer for vehicles"); 822 | } 823 | else { 824 | info("Layer for vehicles disabled"); 825 | } 826 | 827 | info("version " + this.getDescription().getVersion() + " is activated"); 828 | } 829 | 830 | public void onDisable() { 831 | if(set != null) { 832 | set.deleteMarkerSet(); 833 | set = null; 834 | } 835 | if(vset != null) { 836 | vset.deleteMarkerSet(); 837 | vset = null; 838 | } 839 | mobicons.clear(); 840 | vehicleicons.clear(); 841 | lookup_cache.clear(); 842 | stop = true; 843 | } 844 | 845 | } 846 | -------------------------------------------------------------------------------- /src/main/java/org/dynmap/mobs/MetricsLite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Tyler Blair. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without modification, are 5 | * permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, this list of 8 | * conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, this list 11 | * of conditions and the following disclaimer in the documentation and/or other materials 12 | * provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED 15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 21 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 22 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | * 24 | * The views and conclusions contained in the software and documentation are those of the 25 | * authors and contributors and should not be interpreted as representing official policies, 26 | * either expressed or implied, of anybody else. 27 | */ 28 | 29 | package org.dynmap.mobs; 30 | 31 | import org.bukkit.Bukkit; 32 | import org.bukkit.configuration.InvalidConfigurationException; 33 | import org.bukkit.configuration.file.YamlConfiguration; 34 | import org.bukkit.plugin.Plugin; 35 | import org.bukkit.plugin.PluginDescriptionFile; 36 | 37 | import java.io.BufferedReader; 38 | import java.io.File; 39 | import java.io.IOException; 40 | import java.io.InputStreamReader; 41 | import java.io.OutputStreamWriter; 42 | import java.io.UnsupportedEncodingException; 43 | import java.net.Proxy; 44 | import java.net.URL; 45 | import java.net.URLConnection; 46 | import java.net.URLEncoder; 47 | import java.util.UUID; 48 | import java.util.logging.Level; 49 | 50 | public class MetricsLite { 51 | 52 | /** 53 | * The current revision number 54 | */ 55 | private final static int REVISION = 5; 56 | 57 | /** 58 | * The base url of the metrics domain 59 | */ 60 | private static final String BASE_URL = "http://mcstats.org"; 61 | 62 | /** 63 | * The url used to report a server's status 64 | */ 65 | private static final String REPORT_URL = "/report/%s"; 66 | 67 | /** 68 | * Interval of time to ping (in minutes) 69 | */ 70 | private final static int PING_INTERVAL = 10; 71 | 72 | /** 73 | * The plugin this metrics submits for 74 | */ 75 | private final Plugin plugin; 76 | 77 | /** 78 | * The plugin configuration file 79 | */ 80 | private final YamlConfiguration configuration; 81 | 82 | /** 83 | * The plugin configuration file 84 | */ 85 | private final File configurationFile; 86 | 87 | /** 88 | * Unique server id 89 | */ 90 | private final String guid; 91 | 92 | /** 93 | * Lock for synchronization 94 | */ 95 | private final Object optOutLock = new Object(); 96 | 97 | /** 98 | * Id of the scheduled task 99 | */ 100 | private volatile int taskId = -1; 101 | 102 | public MetricsLite(Plugin plugin) throws IOException { 103 | if (plugin == null) { 104 | throw new IllegalArgumentException("Plugin cannot be null"); 105 | } 106 | 107 | this.plugin = plugin; 108 | 109 | // load the config 110 | configurationFile = getConfigFile(); 111 | configuration = YamlConfiguration.loadConfiguration(configurationFile); 112 | 113 | // add some defaults 114 | configuration.addDefault("opt-out", false); 115 | configuration.addDefault("guid", UUID.randomUUID().toString()); 116 | 117 | // Do we need to create the file? 118 | if (configuration.get("guid", null) == null) { 119 | configuration.options().header("http://mcstats.org").copyDefaults(true); 120 | configuration.save(configurationFile); 121 | } 122 | 123 | // Load the guid then 124 | guid = configuration.getString("guid"); 125 | } 126 | 127 | /** 128 | * Start measuring statistics. This will immediately create an async repeating task as the plugin and send 129 | * the initial data to the metrics backend, and then after that it will post in increments of 130 | * PING_INTERVAL * 1200 ticks. 131 | * 132 | * @return True if statistics measuring is running, otherwise false. 133 | */ 134 | public boolean start() { 135 | synchronized (optOutLock) { 136 | // Did we opt out? 137 | if (isOptOut()) { 138 | return false; 139 | } 140 | 141 | // Is metrics already running? 142 | if (taskId >= 0) { 143 | return true; 144 | } 145 | 146 | // Begin hitting the server with glorious data 147 | taskId = plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() { 148 | 149 | private boolean firstPost = true; 150 | 151 | public void run() { 152 | try { 153 | // This has to be synchronized or it can collide with the disable method. 154 | synchronized (optOutLock) { 155 | // Disable Task, if it is running and the server owner decided to opt-out 156 | if (isOptOut() && taskId > 0) { 157 | plugin.getServer().getScheduler().cancelTask(taskId); 158 | taskId = -1; 159 | } 160 | } 161 | 162 | // We use the inverse of firstPost because if it is the first time we are posting, 163 | // it is not a interval ping, so it evaluates to FALSE 164 | // Each time thereafter it will evaluate to TRUE, i.e PING! 165 | postPlugin(!firstPost); 166 | 167 | // After the first post we set firstPost to false 168 | // Each post thereafter will be a ping 169 | firstPost = false; 170 | } catch (IOException e) { 171 | //Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage()); 172 | } 173 | } 174 | }, 0, PING_INTERVAL * 1200); 175 | 176 | return true; 177 | } 178 | } 179 | 180 | /** 181 | * Has the server owner denied plugin metrics? 182 | * 183 | * @return true if metrics should be opted out of it 184 | */ 185 | public boolean isOptOut() { 186 | synchronized(optOutLock) { 187 | try { 188 | // Reload the metrics file 189 | configuration.load(getConfigFile()); 190 | } catch (IOException ex) { 191 | Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage()); 192 | return true; 193 | } catch (InvalidConfigurationException ex) { 194 | Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage()); 195 | return true; 196 | } 197 | return configuration.getBoolean("opt-out", false); 198 | } 199 | } 200 | 201 | /** 202 | * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. 203 | * 204 | * @throws IOException 205 | */ 206 | public void enable() throws IOException { 207 | // This has to be synchronized or it can collide with the check in the task. 208 | synchronized (optOutLock) { 209 | // Check if the server owner has already set opt-out, if not, set it. 210 | if (isOptOut()) { 211 | configuration.set("opt-out", false); 212 | configuration.save(configurationFile); 213 | } 214 | 215 | // Enable Task, if it is not running 216 | if (taskId < 0) { 217 | start(); 218 | } 219 | } 220 | } 221 | 222 | /** 223 | * Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task. 224 | * 225 | * @throws IOException 226 | */ 227 | public void disable() throws IOException { 228 | // This has to be synchronized or it can collide with the check in the task. 229 | synchronized (optOutLock) { 230 | // Check if the server owner has already set opt-out, if not, set it. 231 | if (!isOptOut()) { 232 | configuration.set("opt-out", true); 233 | configuration.save(configurationFile); 234 | } 235 | 236 | // Disable Task, if it is running 237 | if (taskId > 0) { 238 | this.plugin.getServer().getScheduler().cancelTask(taskId); 239 | taskId = -1; 240 | } 241 | } 242 | } 243 | 244 | /** 245 | * Gets the File object of the config file that should be used to store data such as the GUID and opt-out status 246 | * 247 | * @return the File object for the config file 248 | */ 249 | public File getConfigFile() { 250 | // I believe the easiest way to get the base folder (e.g craftbukkit set via -P) for plugins to use 251 | // is to abuse the plugin object we already have 252 | // plugin.getDataFolder() => base/plugins/PluginA/ 253 | // pluginsFolder => base/plugins/ 254 | // The base is not necessarily relative to the startup directory. 255 | File pluginsFolder = plugin.getDataFolder().getParentFile(); 256 | 257 | // return => base/plugins/PluginMetrics/config.yml 258 | return new File(new File(pluginsFolder, "PluginMetrics"), "config.yml"); 259 | } 260 | 261 | /** 262 | * Generic method that posts a plugin to the metrics website 263 | */ 264 | private void postPlugin(boolean isPing) throws IOException { 265 | // The plugin's description file containg all of the plugin data such as name, version, author, etc 266 | final PluginDescriptionFile description = plugin.getDescription(); 267 | 268 | // Construct the post data 269 | final StringBuilder data = new StringBuilder(); 270 | data.append(encode("guid")).append('=').append(encode(guid)); 271 | encodeDataPair(data, "version", description.getVersion()); 272 | encodeDataPair(data, "server", Bukkit.getVersion()); 273 | encodeDataPair(data, "players", Integer.toString(Bukkit.getServer().getOnlinePlayers().size())); 274 | encodeDataPair(data, "revision", String.valueOf(REVISION)); 275 | 276 | // If we're pinging, append it 277 | if (isPing) { 278 | encodeDataPair(data, "ping", "true"); 279 | } 280 | 281 | // Create the url 282 | URL url = new URL(BASE_URL + String.format(REPORT_URL, encode(plugin.getDescription().getName()))); 283 | 284 | // Connect to the website 285 | URLConnection connection; 286 | 287 | // Mineshafter creates a socks proxy, so we can safely bypass it 288 | // It does not reroute POST requests so we need to go around it 289 | if (isMineshafterPresent()) { 290 | connection = url.openConnection(Proxy.NO_PROXY); 291 | } else { 292 | connection = url.openConnection(); 293 | } 294 | 295 | connection.setDoOutput(true); 296 | 297 | // Write the data 298 | final OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream()); 299 | writer.write(data.toString()); 300 | writer.flush(); 301 | 302 | // Now read the response 303 | final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); 304 | final String response = reader.readLine(); 305 | 306 | // close resources 307 | writer.close(); 308 | reader.close(); 309 | 310 | if (response == null || response.startsWith("ERR")) { 311 | throw new IOException(response); //Throw the exception 312 | } 313 | //if (response.startsWith("OK")) - We should get "OK" followed by an optional description if everything goes right 314 | } 315 | 316 | /** 317 | * Check if mineshafter is present. If it is, we need to bypass it to send POST requests 318 | * 319 | * @return true if mineshafter is installed on the server 320 | */ 321 | private boolean isMineshafterPresent() { 322 | try { 323 | Class.forName("mineshafter.MineServer"); 324 | return true; 325 | } catch (Exception e) { 326 | return false; 327 | } 328 | } 329 | 330 | /** 331 | *

Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first 332 | * key/value pair MUST be included manually, e.g:

333 | * 334 | * StringBuffer data = new StringBuffer(); 335 | * data.append(encode("guid")).append('=').append(encode(guid)); 336 | * encodeDataPair(data, "version", description.getVersion()); 337 | * 338 | * 339 | * @param buffer the stringbuilder to append the data pair onto 340 | * @param key the key value 341 | * @param value the value 342 | */ 343 | private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException { 344 | buffer.append('&').append(encode(key)).append('=').append(encode(value)); 345 | } 346 | 347 | /** 348 | * Encode text as UTF-8 349 | * 350 | * @param text the text to encode 351 | * @return the encoded text, as UTF-8 352 | */ 353 | private static String encode(final String text) throws UnsupportedEncodingException { 354 | return URLEncoder.encode(text, "UTF-8"); 355 | } 356 | 357 | } -------------------------------------------------------------------------------- /src/main/resources/8x8/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/bat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/bear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/bear.png -------------------------------------------------------------------------------- /src/main/resources/8x8/bigcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/bigcat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/birdy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/birdy.png -------------------------------------------------------------------------------- /src/main/resources/8x8/blaze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/blaze.png -------------------------------------------------------------------------------- /src/main/resources/8x8/boar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/boar.png -------------------------------------------------------------------------------- /src/main/resources/8x8/boat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/boat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/bunny.png -------------------------------------------------------------------------------- /src/main/resources/8x8/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/cat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/caveogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/caveogre.png -------------------------------------------------------------------------------- /src/main/resources/8x8/cavespider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/cavespider.png -------------------------------------------------------------------------------- /src/main/resources/8x8/chicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/chicken.png -------------------------------------------------------------------------------- /src/main/resources/8x8/chickenjockey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/chickenjockey.png -------------------------------------------------------------------------------- /src/main/resources/8x8/command-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/command-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/cow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/cow.png -------------------------------------------------------------------------------- /src/main/resources/8x8/creeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/creeper.png -------------------------------------------------------------------------------- /src/main/resources/8x8/crocodile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/crocodile.png -------------------------------------------------------------------------------- /src/main/resources/8x8/deer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/deer.png -------------------------------------------------------------------------------- /src/main/resources/8x8/dolphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/dolphin.png -------------------------------------------------------------------------------- /src/main/resources/8x8/donkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/donkey.png -------------------------------------------------------------------------------- /src/main/resources/8x8/duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/duck.png -------------------------------------------------------------------------------- /src/main/resources/8x8/elderguardian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/elderguardian.png -------------------------------------------------------------------------------- /src/main/resources/8x8/enderdragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/enderdragon.png -------------------------------------------------------------------------------- /src/main/resources/8x8/enderman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/enderman.png -------------------------------------------------------------------------------- /src/main/resources/8x8/endermite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/endermite.png -------------------------------------------------------------------------------- /src/main/resources/8x8/evoker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/evoker.png -------------------------------------------------------------------------------- /src/main/resources/8x8/explosive-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/explosive-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/fireogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/fireogre.png -------------------------------------------------------------------------------- /src/main/resources/8x8/fishy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/fishy.png -------------------------------------------------------------------------------- /src/main/resources/8x8/flamewraith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/flamewraith.png -------------------------------------------------------------------------------- /src/main/resources/8x8/fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/fox.png -------------------------------------------------------------------------------- /src/main/resources/8x8/ghast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/ghast.png -------------------------------------------------------------------------------- /src/main/resources/8x8/giant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/giant.png -------------------------------------------------------------------------------- /src/main/resources/8x8/goat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/goat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/golem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/golem.png -------------------------------------------------------------------------------- /src/main/resources/8x8/guardian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/guardian.png -------------------------------------------------------------------------------- /src/main/resources/8x8/hellrat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/hellrat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/hopper-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/hopper-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/horse.png -------------------------------------------------------------------------------- /src/main/resources/8x8/husk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/husk.png -------------------------------------------------------------------------------- /src/main/resources/8x8/jellyfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/jellyfish.png -------------------------------------------------------------------------------- /src/main/resources/8x8/kitty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/kitty.png -------------------------------------------------------------------------------- /src/main/resources/8x8/llama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/llama.png -------------------------------------------------------------------------------- /src/main/resources/8x8/magmacube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/magmacube.png -------------------------------------------------------------------------------- /src/main/resources/8x8/mice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/mice.png -------------------------------------------------------------------------------- /src/main/resources/8x8/minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/mooshroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/mooshroom.png -------------------------------------------------------------------------------- /src/main/resources/8x8/mule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/mule.png -------------------------------------------------------------------------------- /src/main/resources/8x8/ocelot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/ocelot.png -------------------------------------------------------------------------------- /src/main/resources/8x8/ogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/ogre.png -------------------------------------------------------------------------------- /src/main/resources/8x8/ostrich.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/ostrich.png -------------------------------------------------------------------------------- /src/main/resources/8x8/pig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/pig.png -------------------------------------------------------------------------------- /src/main/resources/8x8/polarbear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/polarbear.png -------------------------------------------------------------------------------- /src/main/resources/8x8/powered-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/powered-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/rabbit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/rabbit.png -------------------------------------------------------------------------------- /src/main/resources/8x8/rat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/rat.png -------------------------------------------------------------------------------- /src/main/resources/8x8/ray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/ray.png -------------------------------------------------------------------------------- /src/main/resources/8x8/scorpion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/scorpion.png -------------------------------------------------------------------------------- /src/main/resources/8x8/shark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/shark.png -------------------------------------------------------------------------------- /src/main/resources/8x8/sheep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/sheep.png -------------------------------------------------------------------------------- /src/main/resources/8x8/shulker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/shulker.png -------------------------------------------------------------------------------- /src/main/resources/8x8/silverfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/silverfish.png -------------------------------------------------------------------------------- /src/main/resources/8x8/skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/skeleton.png -------------------------------------------------------------------------------- /src/main/resources/8x8/skeletonhorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/skeletonhorse.png -------------------------------------------------------------------------------- /src/main/resources/8x8/slime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/slime.png -------------------------------------------------------------------------------- /src/main/resources/8x8/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/snake.png -------------------------------------------------------------------------------- /src/main/resources/8x8/snowgolem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/snowgolem.png -------------------------------------------------------------------------------- /src/main/resources/8x8/spawner-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/spawner-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/spider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/spider.png -------------------------------------------------------------------------------- /src/main/resources/8x8/spiderjockey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/spiderjockey.png -------------------------------------------------------------------------------- /src/main/resources/8x8/squid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/squid.png -------------------------------------------------------------------------------- /src/main/resources/8x8/storage-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/storage-minecart.png -------------------------------------------------------------------------------- /src/main/resources/8x8/stray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/stray.png -------------------------------------------------------------------------------- /src/main/resources/8x8/tamedwolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/tamedwolf.png -------------------------------------------------------------------------------- /src/main/resources/8x8/turtle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/turtle.png -------------------------------------------------------------------------------- /src/main/resources/8x8/vanillahorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/vanillahorse.png -------------------------------------------------------------------------------- /src/main/resources/8x8/vanillapolarbear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/vanillapolarbear.png -------------------------------------------------------------------------------- /src/main/resources/8x8/vex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/vex.png -------------------------------------------------------------------------------- /src/main/resources/8x8/villager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/villager.png -------------------------------------------------------------------------------- /src/main/resources/8x8/vindicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/vindicator.png -------------------------------------------------------------------------------- /src/main/resources/8x8/werewolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/werewolf.png -------------------------------------------------------------------------------- /src/main/resources/8x8/wildwolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/wildwolf.png -------------------------------------------------------------------------------- /src/main/resources/8x8/witch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/witch.png -------------------------------------------------------------------------------- /src/main/resources/8x8/wither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/wither.png -------------------------------------------------------------------------------- /src/main/resources/8x8/witherskeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/witherskeleton.png -------------------------------------------------------------------------------- /src/main/resources/8x8/wolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/wolf.png -------------------------------------------------------------------------------- /src/main/resources/8x8/wraith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/wraith.png -------------------------------------------------------------------------------- /src/main/resources/8x8/zombie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/zombie.png -------------------------------------------------------------------------------- /src/main/resources/8x8/zombiehorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/zombiehorse.png -------------------------------------------------------------------------------- /src/main/resources/8x8/zombiepigman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/zombiepigman.png -------------------------------------------------------------------------------- /src/main/resources/8x8/zombievillager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/8x8/zombievillager.png -------------------------------------------------------------------------------- /src/main/resources/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/bat.png -------------------------------------------------------------------------------- /src/main/resources/bear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/bear.png -------------------------------------------------------------------------------- /src/main/resources/bigcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/bigcat.png -------------------------------------------------------------------------------- /src/main/resources/birdy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/birdy.png -------------------------------------------------------------------------------- /src/main/resources/blaze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/blaze.png -------------------------------------------------------------------------------- /src/main/resources/boar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/boar.png -------------------------------------------------------------------------------- /src/main/resources/boat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/boat.png -------------------------------------------------------------------------------- /src/main/resources/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/bunny.png -------------------------------------------------------------------------------- /src/main/resources/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/cat.png -------------------------------------------------------------------------------- /src/main/resources/caveogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/caveogre.png -------------------------------------------------------------------------------- /src/main/resources/cavespider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/cavespider.png -------------------------------------------------------------------------------- /src/main/resources/chicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/chicken.png -------------------------------------------------------------------------------- /src/main/resources/chickenjockey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/chickenjockey.png -------------------------------------------------------------------------------- /src/main/resources/command-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/command-minecart.png -------------------------------------------------------------------------------- /src/main/resources/config.yml: -------------------------------------------------------------------------------- 1 | # dynmap-mobs configuration 2 | # 3 | update: 4 | # Seconds between position updates for mobs 5 | period: 5.0 6 | # Seconds between position updates for vehicles 7 | vehicleperiod: 10.0 8 | # Round position to given unit 9 | resolution: 1.0 10 | # Make markers hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky(disable hide)) 11 | hideifshadow: 4 12 | # Make markers hidden when they are under cover (#=sky light level,0=underground,15=open to sky(disable hide)) 13 | hideifundercover: 15 14 | # Mob updates per tick (prevent lag spikes when large number of mobs) 15 | mobs-per-tick: 20 16 | # Vehicle updates per tick (prevent lag spikes when large number of vehicles) 17 | vehicles-per-tick: 20 18 | 19 | mobs: 20 | elderguardian: true 21 | witherskeleton: true 22 | stray: true 23 | husk: true 24 | zombievillager: true 25 | evoker: true 26 | vex: true 27 | vindicator: true 28 | creeper: true 29 | skeleton: true 30 | giant: true 31 | ghast: true 32 | zombiepigman: true 33 | zombie: true 34 | enderman: true 35 | cavespider: true 36 | spider: true 37 | spiderjockey: true 38 | silverfish: true 39 | blaze: true 40 | magmacube: true 41 | slime: true 42 | enderdragon: true 43 | wither: true 44 | witch: true 45 | endermite: true 46 | guardian: true 47 | shulker: true 48 | skeletonhorse: true 49 | zombiehorse: true 50 | donkey: true 51 | mule: true 52 | bat: true 53 | pig: true 54 | sheep: true 55 | cow: true 56 | chicken: true 57 | chickenjockey: true 58 | squid: true 59 | wolf: true 60 | tamedwolf: true 61 | mooshroom: true 62 | snowgolem: true 63 | ocelot: true 64 | cat: true 65 | golem: true 66 | vanillahorse: true 67 | rabbit: true 68 | vanillapolarbear: true 69 | llama: true 70 | villager: true 71 | horse: false 72 | fireogre: false 73 | caveogre: false 74 | ogre: false 75 | boar: false 76 | polarbear: false 77 | bear: false 78 | duck: false 79 | bigcat: false 80 | deer: false 81 | wildwolf: false 82 | flamewraith: false 83 | wraith: false 84 | bunny: false 85 | bird: false 86 | fox: false 87 | werewolf: false 88 | shark: false 89 | dolphin: false 90 | fishy: false 91 | kitty: false 92 | hellrat: false 93 | rat: false 94 | mouse: false 95 | scorpion: false 96 | turtle: false 97 | crocodile: false 98 | ray: false 99 | jellyfish: false 100 | goat: false 101 | snake: false 102 | ostrich: false 103 | 104 | vehicles: 105 | # Specific minecart types 106 | command-minecart: false 107 | explosive-minecart: false 108 | hopper-minecart: false 109 | powered-minecart: false 110 | spawner-minecart: false 111 | storage-minecart: false 112 | minecart: false 113 | # Boats 114 | boat: false 115 | 116 | layer: 117 | name: "Mobs" 118 | # Make mobs layer hidden by default 119 | hidebydefault: false 120 | # ordering priority in layer menu (low goes before high - default is 0) 121 | layerprio: 10 122 | # (optional) if true, use tiny marker icons (8x8) - default is 16x16 123 | tinyicons: false 124 | # (optional) if true, don't show labels on mob icons 125 | nolabels: false 126 | # (optional) set minimum zoom level when mob icons should be visible (0=default, any zoom) 127 | minzoom: 0 128 | # (optional) include coordinate in label for icon 129 | inc-coord: false 130 | 131 | vehiclelayer: 132 | name: "Vehicles" 133 | hidebydefault: false 134 | # ordering priority in layer menu (low goes before high - default is 0) 135 | layerprio: 11 136 | # (optional) if true, use tiny marker icons (8x8) - default is 16x16 137 | tinyicons: false 138 | # (optional) if true, don't show labels on mob icons 139 | nolabels: false 140 | # (optional) set minimum zoom level when mob icons should be visible (0=default, any zoom) 141 | minzoom: 0 142 | # (optional) include coordinate in label for icon 143 | inc-coord: false 144 | -------------------------------------------------------------------------------- /src/main/resources/cow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/cow.png -------------------------------------------------------------------------------- /src/main/resources/creeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/creeper.png -------------------------------------------------------------------------------- /src/main/resources/crocodile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/crocodile.png -------------------------------------------------------------------------------- /src/main/resources/deer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/deer.png -------------------------------------------------------------------------------- /src/main/resources/dolphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/dolphin.png -------------------------------------------------------------------------------- /src/main/resources/donkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/donkey.png -------------------------------------------------------------------------------- /src/main/resources/duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/duck.png -------------------------------------------------------------------------------- /src/main/resources/elderguardian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/elderguardian.png -------------------------------------------------------------------------------- /src/main/resources/enderdragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/enderdragon.png -------------------------------------------------------------------------------- /src/main/resources/enderman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/enderman.png -------------------------------------------------------------------------------- /src/main/resources/endermite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/endermite.png -------------------------------------------------------------------------------- /src/main/resources/evoker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/evoker.png -------------------------------------------------------------------------------- /src/main/resources/explosive-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/explosive-minecart.png -------------------------------------------------------------------------------- /src/main/resources/fireogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/fireogre.png -------------------------------------------------------------------------------- /src/main/resources/fishy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/fishy.png -------------------------------------------------------------------------------- /src/main/resources/flamewraith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/flamewraith.png -------------------------------------------------------------------------------- /src/main/resources/fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/fox.png -------------------------------------------------------------------------------- /src/main/resources/ghast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/ghast.png -------------------------------------------------------------------------------- /src/main/resources/giant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/giant.png -------------------------------------------------------------------------------- /src/main/resources/goat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/goat.png -------------------------------------------------------------------------------- /src/main/resources/golem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/golem.png -------------------------------------------------------------------------------- /src/main/resources/guardian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/guardian.png -------------------------------------------------------------------------------- /src/main/resources/hellrat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/hellrat.png -------------------------------------------------------------------------------- /src/main/resources/hopper-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/hopper-minecart.png -------------------------------------------------------------------------------- /src/main/resources/horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/horse.png -------------------------------------------------------------------------------- /src/main/resources/husk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/husk.png -------------------------------------------------------------------------------- /src/main/resources/jellyfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/jellyfish.png -------------------------------------------------------------------------------- /src/main/resources/kitty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/kitty.png -------------------------------------------------------------------------------- /src/main/resources/llama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/llama.png -------------------------------------------------------------------------------- /src/main/resources/magmacube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/magmacube.png -------------------------------------------------------------------------------- /src/main/resources/mice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/mice.png -------------------------------------------------------------------------------- /src/main/resources/minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/minecart.png -------------------------------------------------------------------------------- /src/main/resources/mooshroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/mooshroom.png -------------------------------------------------------------------------------- /src/main/resources/mule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/mule.png -------------------------------------------------------------------------------- /src/main/resources/ocelot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/ocelot.png -------------------------------------------------------------------------------- /src/main/resources/ogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/ogre.png -------------------------------------------------------------------------------- /src/main/resources/ostrich.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/ostrich.png -------------------------------------------------------------------------------- /src/main/resources/pig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/pig.png -------------------------------------------------------------------------------- /src/main/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | name: dynmap-mobs 2 | main: org.dynmap.mobs.DynmapMobsPlugin 3 | version: "${project.version}" 4 | author: mikeprimm 5 | depend: [ dynmap ] 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/polarbear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/polarbear.png -------------------------------------------------------------------------------- /src/main/resources/powered-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/powered-minecart.png -------------------------------------------------------------------------------- /src/main/resources/rabbit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/rabbit.png -------------------------------------------------------------------------------- /src/main/resources/rat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/rat.png -------------------------------------------------------------------------------- /src/main/resources/ray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/ray.png -------------------------------------------------------------------------------- /src/main/resources/scorpion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/scorpion.png -------------------------------------------------------------------------------- /src/main/resources/shark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/shark.png -------------------------------------------------------------------------------- /src/main/resources/sheep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/sheep.png -------------------------------------------------------------------------------- /src/main/resources/shulker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/shulker.png -------------------------------------------------------------------------------- /src/main/resources/silverfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/silverfish.png -------------------------------------------------------------------------------- /src/main/resources/skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/skeleton.png -------------------------------------------------------------------------------- /src/main/resources/skeletonhorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/skeletonhorse.png -------------------------------------------------------------------------------- /src/main/resources/slime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/slime.png -------------------------------------------------------------------------------- /src/main/resources/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/snake.png -------------------------------------------------------------------------------- /src/main/resources/snowgolem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/snowgolem.png -------------------------------------------------------------------------------- /src/main/resources/spawner-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/spawner-minecart.png -------------------------------------------------------------------------------- /src/main/resources/spider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/spider.png -------------------------------------------------------------------------------- /src/main/resources/spiderjockey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/spiderjockey.png -------------------------------------------------------------------------------- /src/main/resources/squid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/squid.png -------------------------------------------------------------------------------- /src/main/resources/storage-minecart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/storage-minecart.png -------------------------------------------------------------------------------- /src/main/resources/stray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/stray.png -------------------------------------------------------------------------------- /src/main/resources/tamedwolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/tamedwolf.png -------------------------------------------------------------------------------- /src/main/resources/turtle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/turtle.png -------------------------------------------------------------------------------- /src/main/resources/vanillahorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/vanillahorse.png -------------------------------------------------------------------------------- /src/main/resources/vanillapolarbear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/vanillapolarbear.png -------------------------------------------------------------------------------- /src/main/resources/vex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/vex.png -------------------------------------------------------------------------------- /src/main/resources/villager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/villager.png -------------------------------------------------------------------------------- /src/main/resources/vindicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/vindicator.png -------------------------------------------------------------------------------- /src/main/resources/werewolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/werewolf.png -------------------------------------------------------------------------------- /src/main/resources/wildwolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/wildwolf.png -------------------------------------------------------------------------------- /src/main/resources/witch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/witch.png -------------------------------------------------------------------------------- /src/main/resources/wither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/wither.png -------------------------------------------------------------------------------- /src/main/resources/witherskeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/witherskeleton.png -------------------------------------------------------------------------------- /src/main/resources/wolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/wolf.png -------------------------------------------------------------------------------- /src/main/resources/wraith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/wraith.png -------------------------------------------------------------------------------- /src/main/resources/zombie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/zombie.png -------------------------------------------------------------------------------- /src/main/resources/zombiehorse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/zombiehorse.png -------------------------------------------------------------------------------- /src/main/resources/zombiepigman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/zombiepigman.png -------------------------------------------------------------------------------- /src/main/resources/zombievillager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webbukkit/dynmap-mobs/2e3781069daa7872bc5b2f6ab749e66ce7c49dfc/src/main/resources/zombievillager.png --------------------------------------------------------------------------------