Inactive [INFO] MapMarkers v0.3.4 [1.1R6]

Discussion in 'Inactive/Unsupported Plugins' started by TJ09, Jan 16, 2011.

  1. Offline

    TJ09

    PURPOSE
    This plugin outputs a JSON file containing player locations for use with various Minecraft mapping software.

    INSTALLATION
    1. Put MapMarkers.jar in your plugins folder
    2. Run your server once to generate a config file
    3. Edit plugins/MapMarkers/config.yml to your liking

    SETUP FOR MINECRAFT OVERVIEWER (Courtesy of FlukiestEmperor)
    0. Perform installation (see above)
    1. Edit MapMarkers.yml so that markers.json is placed in the same folder as your Minecraft Overviewer output
    Alternatively don't edit MapMarkers.yml, make a symlink (Linux):
    ln -s path/to/minecraft/server/bin/world/markers.json path/to/minecraft/map/markers.json
    2. Put player.png, player.php, and player_markers.js where the overviewer index.html is. (Optionally web_assets in your overviewer source directory)
    If you don't want to use player skins as the markers (requires PHP, allow_url_fopen, and ideally write permissions by your PHP user), copy player_markers_noskin.js and rename it to player_markers.js
    3. Add a line to your source overviewer index.html that reads:
    <script type="text/javascript" src="player_markers.js"></script>
    4. Run overviewer and everything should work

    SETUP FOR PIGMAP
    0. Perform installation (see above)
    1. Edit MapMarkers.yml so that markers.json is placed in the same folder as your Pigmap output
    Alternatively don't edit MapMarkers.yml, make a symlink (Linux):
    ln -s path/to/minecraft/server/bin/world/markers.json path/to/minecraft/map/markers.json
    2. Put player.png, player.php, and player_markers_old.js where the pigmap HTML is.
    If you don't want to use player skins as the markers (which requires PHP, allow_url_fopen, and ideally write permissions by your PHP user), copy player_markers_noskin_old.js and rename it to player_markers.js
    3. Add two lines to your source template.html that reads:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="player_markers.js"></script>
    4. Run pigmap and everything should work

    CONFIGURATION
    plugins/MapMarkers/config.yml contains all settings

    saveInterval (default 3000): How often to output the markers, in milliseconds
    outputFile (default world/markers.json): Where to place the output file
    dateFormat (default yyyyMMdd HH:mm:ss): How to format timestamps in the output JSON.
    writeSpawn (default false): Whether or not to place spawn markers (one for each world) in the output.

    CHANGELOG
    0.3.4:
    • Fixed for new configuration and event handling (Now works in 1.1-R6 and 1.2-betawhatever)
    0.3.3:
    • Updated quit event signature (fixes the nag errors)
    • Updated player_markers.js for the latest version of Overviewer. Pigmap and old versions of Overviewer are in the _old suffix (unchanged from 0.3.2)
    • Readme file contains the right instructions pointing to the new config location.
    0.3.2:

    • Properly included player_markers_noskin.js in the zip
    • Fixed a bug in player.php
    • Config file is now located in plugins/MapMarkers/config.yml. The plugin will automatically create the folder/file as necessary.
    • JSON output now includes world name instead of GUID.
    0.3.1:

    • Removed the constructor for compatability with new versions of Bukkit.
    • Plugin now handles player teleport events.
    • Timer now uses the bukkit scheduling stuff instead of a separate thread.
    0.3:

    • JSON output now has IDs indicating the marker type
    • Optional spawn markers (see config file)
    • JSON output includes world GUID
    • Player skins as can be used as icons
    FUTURE(Possible features)
    • Easy multiworld support.
    • Commands to add custom markers
    • Server weather and time
    • Player-controlled hiding of their position.
    • Zoom-to-player and track player
    DOWNLOAD

    Most recent version available at:
    http://tj09.net/minecraft/MapMarkers/MapMarkers-0.3.4.zip (Direct Jar)
    Older versions can be downloaded from:
    http://tj09.net/minecraft/MapMarkers/
     
    Mahagon, Phaedrus and DiddiZ like this.
  2. Offline

    skakri

    When I reload active plugins with /reload, I get this error:

    Code:
    Exception in thread "Timer-3" java.lang.NullPointerException
            at java.util.Calendar.setTime(Calendar.java:1092)
            at java.text.SimpleDateFormat.format(SimpleDateFormat.java:876)
            at java.text.SimpleDateFormat.format(SimpleDateFormat.java:869)
            at java.text.DateFormat.format(DateFormat.java:333)
            at com.bukkit.TJ09.MapMarkersTimerTask.run(MapMarkersTimerTask.java:48)
            at java.util.TimerThread.mainLoop(Timer.java:534)
            at java.util.TimerThread.run(Timer.java:484)
    
    Any ideas, how to fix this (MapMarkers stop working after /reload)?

    Have you considered to use MySQL as a storage (and option to store entries n-time/days)? I'm using MapMarkers to log user movement, and it's almost impossible, as all data just keeps overwritten (I'm currently thinking about a shell script file that copies .json file each 5 seconds, but that won't work right, as there'll be a slight delay). :)

    EDIT:
    Never mind – 3 hours in tutorials and manuals and I've done a plugin that suits my needs (logging to MySQL + get item in hand). Your source was a great help to understand how to get values from Bukkit. Thank you! :)
     
  3. Will MapMarkers be compatible with multiple Worlds? Like having multiple Maps and showing the players on the correct world?
     
  4. Offline

    Drakonas

    Apparently, I missed your post. I've fixed the problem and replaced the player-avatar.php script with a better one. Now shows the extra layer that was missing on the face.

    Also, I am in deep work on doing a huge update for my pigmap gen, thanks to Billiam.

    I am basically importing his script, and using it as the base for mine, while adding my features to it as well.

    New features compliments of Billiam: marker animations, faster loading time, date-updated text, full skin in infoWindows for markers, place marker support (and support for "Interesting Places" plugin)

    New features compliments of my friend Lantean: easier-to-select shareable link, better player-icon script (the one I mentioned)

    I haven't exactly thought of anything new to add. I suppose I can start working on custom descriptions in infoWindows after this. :D
     
  5. Offline

    but2002

    I'm Lantean. :)

    Anyways, this is really bugging me. I really want the JSON to show the spawn point, so I'm able to see it visibliy on the map. PigMap doesn't do this like overviewer did, and I'd really appreciate the spawn showing up on my map.

    Right now I have the spawn hard-coded and it shows just fine, but it could move for whatever reason, and some other people wouldn't even be able to figure out how to do what I did.

    Cheers!

    ~Lantean
     
  6. Offline

    datLicht

    MapMarkers is not working for me Craftbukkit 278 on Linux 64bit System... Can't figure out what the error is, plugin seems not to be loaded and Server crash when trying to enable or reload

    need Help pls

    EDIT:
    Is working now, still don't know why ;(
     
  7. Offline

    Reil

    Good to see you back, Drakonas. :3
     
  8. Hi, will there be an update i got all Persons on the map, still if they are offline!
     
  9. Offline

    FabianN

    If it's not working for you it's not Mapmarkers. I'm running the latest craftbukkit (297) and it's still working just fine for me.



    I have a request though. Now with the introduction of worlds in craftbukkit it would be good to be able to keep track of what world they are in. Being able to scrape that information from the markers.json file would be useful.

    Some other player info wouldn't hurt either, such as current health.
     
  10. Offline

    findyourexit

    Hey guys,

    Skakri and Daze both mentioned an error they were receiving:

    Code:
    Exception in thread "Timer-16" java.lang.NullPointerException
            at java.util.Calendar.setTime(Calendar.java:1092)
            at java.text.SimpleDateFormat.format(SimpleDateFormat.java:876)
            at java.text.SimpleDateFormat.format(SimpleDateFormat.java:869)
            at java.text.DateFormat.format(DateFormat.java:333)
            at com.bukkit.TJ09.MapMarkersTimerTask.run(MapMarkersTimerTask.java:48)
            at java.util.TimerThread.mainLoop(Timer.java:534)
            at java.util.TimerThread.run(Timer.java:484)
    
    I'm a little stumped as to how to get around this as it seems to be preventing MapMarker from generating a markers.json file for me to use.

    Sorry if I've missed something, I just feel like I've been looking at this for a while!
     
  11. Offline

    Xon

    Make sure the dateFormat in the config file is something valid. Additionally there is a potentially nasty threading issue with how it gets the list of players and then outputs it as a json list.

    That and it isn't multi-world ready.
     
  12. Offline

    GmK

    That and also the dev is mia :(

    I would love to see someone take this on!
     
  13. Offline

    Xon

    Figuring out where the latest version of eclipse puts stuff was annoying. This was compiled against Craftbukkit 282, and I haven't gotten around to looking at later versions.

    Changes:
    • This version only updates the json file when some player has moved, rather writing out the file all the time. If the file doesn't exist it will then output the file.
    • Added onPlayerTeleport to the list events to watch for. This catches when you join, but don't move and when you use portals.
    • Extended the produced json to include the world the player was seen on.
    • Rewrote how it records players, so it is now thread safe.
    I'm hoping the thread-safe changes are enough to fix crash, but I'm not 100% sure

    --- merged: Feb 13, 2011 3:22 AM ---
    Here is some additions to Minecraft-Overviewer I use which add an online player list and markers for each player. It dynamically gets player skins as required and does a fair bit of caching. Largely derived from Drakonas & datLicht's examples. The major difference is more aggressive caching and the marker's are updated rather than deleted and re-adding. This prevents flickering of the stupid markers.

    This addon need a web server capable of doing php, and it needs to be able to fopen to remote sites. It assumes there is a path '/tmp' where it can drop a cache directory, but that is easy to change by editing the top of the head.php file.

    The script (maprefresh.js) also assumes that the json file produced MapMaker is in the directory "./json/markers.json" relative to maps folder.
     

    Attached Files:

    findyourexit likes this.
  14. Offline

    findyourexit

    Thanks a million Xon - I have installed this update and reloading the plugin no longer kicks up any errors in console.

    I've been trying to get "MapMarkers-js-0.1.zip" working on my server since it's pretty much exactly what I'm hoping to achieve. Right now I've installed it all, but it doesn't seem to be working for me at the moment. I'll keep playing with it, but if you have any time at all to throw some basic installation instructions up I would be eternally grateful. Only if you got time for it of course.

    Thanks again!
     
  15. Offline

    Xon

    Oops, forgot that I had moved the locate of the json file, I've updated my original post. You just need to create a directory called "json" in the map folder and then point MapMarkers to put a file called "markers.json" in there.
     
    findyourexit likes this.
  16. Offline

    findyourexit

    Legendary mate :D I'll give it a whirl now and see how things go ;)

    Update:
    Hmmm no love for me :(

    Just made a directory ("json") in my map directory with "markers.json" generating into that directory (the markers.json file is generating correctly with the right data). Really weird, just doesn't seem to want to display the player markers from "markers.json" on my map :S
     
  17. Offline

    Xon

    All I can suggest is to use Chrome or Firefox Developer tools and see what is going wrong when maprefresh tries to run. Also make sure you can manually load the json file from your browser.
     
  18. Offline

    findyourexit

    Awesome suggestions for getting to the bottom of it - turns out it couldn't find "players.json" in the map directory, so I just made a symbolic link to "map"/json/markers.json in the map directory and called it "players.json" and now the "Online List" works a charm!

    Still trying to get to the bottom of why the player positions aren't getting displayed on the map though. Will update here if I work it out :D
     
  19. Thanks a bunch for doing this!
    Where does the new json reflect the world, the player is on? Can't find it in the generated json..
     
  20. Offline

    Drakonas

    Just a note. You can make symbolic links in windows too... Look up the mklink command for DOS. It's even in Windows 7/Vista.
     
  21. Offline

    but2002

    I made my own version of this plugin. I did no more than add the World's spawn location, include IDs, and adds the world name to the players, so it could ignore other world. Seems someone else already beat me to it, but I'll still post up a link here.

    http://dl.dropbox.com/u/1103639/MapMarkers.jar


    Output is similar to this.
    Code:
    [{"timestamp":"20110214 18:27:52","id":0,"type":"spawn","z":899.0,"msg":"Spawn","y":74.0,"x":-1173.0},{"timestamp":"20110214 18:27:52","id":4,"z":578.7706697162354,"msg":"Stewemere","y":121.0,"world":"world","x":-553.9325606601399},{"timestamp":"20110214 18:28:48","id":4,"z":594.3421188632084,"msg":"KOGeorge","y":103.0,"world":"world","x":-607.813357464938}]
     
  22. Offline

    Xon

    Note: the above version has the coding flaw which will cause it to crash with later versions of bukkit. Threads are making with the Bad Touch.

    I ment to release this version earlier. It does the same as but2002's version adding the current world and the id (0 == spawn, 4 == player) to the json. Note: You can have per-world spawns!

    0.2.5.2 has a threading issue when adding spawns for the later versions. I'll see if I can fix that later.
    --- merged: Feb 14, 2011 11:49 PM ---
    Would you believe it got dropped on the cutting from floor? I've stuffed it back in, but how I'm listing per-world spawn's isn't thread safe. So as long as the "includeSpawn" is set to "false" in the yml it should work without any issue.
     

    Attached Files:

  23. Offline

    findyourexit

    Just to follow up on where I was at - turns out player positions were getting displayed! The reason why I was confused is there are no little icons to mark these player locations. I can hover over the player locations and the markers exist, just no icon to make them visible! Time for me to work this out :p

    Also thanks very much for yet another update :D

    EDIT:
    Quick question - is there a way for me to check if my server is able to "fopen to remote sites"? I think that may be my issue since I have PHP installed/server is capable of running PHP and i have a ./tmp/ directory.
     
  24. Offline

    GmK

    Create a small php file (call is test.php) and in there paste:

    PHP:
    <?php
    phpinfo
    ();
    ?>
    Navigate to that, and search for 'fopen' - it will tell you if it is enabled or off.
     
  25. Offline

    Drakonas

    Xon, for some reason, in the new script I am working on, the spawn marker keeps getting re-placed. (This does not happen for players, and the only difference between player markers and the spawn marker is an if statement for the id.)
    I'm not sure if this is my script or your updated plugin. If you want to take a look at my map, message me. I'm also going to talk to the guy that coded the new script I'm basing this off of.

    Also, I have used the Essentials to set the spawn position. I'm not sure what's going on, but the spawn on the map is way off course of where it's supposed to be. Player positions update fine, however.

    Thanks in advance,
    Drakonas

    Edit: Ok, I think the spawn marker being replaced was a problem with network packet loss. (I was on a school network) I'm connected via Ethernet now, and it doesn't do that anymore. Still, the marker is quite a ways away from where it's supposed to be.
     
  26. Offline

    Xon

    I've been using General to set the spawn and looking at it's code it writes to a few obfuscated variables in the Minecraft world it's self. So it actually changes the respawn point in the savefile. Looking into how Essentials does it, it stores the it's group based spawn points in a file called spawn.yml and on the player respawn event changes the respawn location without changing the world respawn point.

    I'm just calling World.getSpawnLocation() which isn't going to see how Essentials does it. I'm going to have a think about what I can do about that. I want to move to using Essentials, so I'm thinking of adding support for getting Essential's spawn list.
    --- merged: Feb 16, 2011 10:54 AM ---
    • Renamed package used by MapMarkers plugin from com.bukkit.Tj09 to com.MapMarkers.TJ09
     

    Attached Files:

  27. Offline

    Drakonas

    Yes, but the problem is still there. Using Essentials, I only changed the spawn with about a 4 block difference from the original spawn. The spawn generated in MapMarkers is like 100 times farther away than that.

    It might be that the spawn point in my map was corrupted somehow.

    Actually, come to think of it, I also used SpawnControl at one point to change the spawn, as well as a very old version of General. Either of those could have corrupted it, as both plugins were very new in the Bukkit scene when I used them.
     
  28. Offline

    PeterFour

    Hi, I try to use this plugins, but i'm quite lost with all this version of overviwer on github. I have the version of drakonas, and it always don't want to work...
    Can you help me?
     
  29. Offline

    TJ09

    ohai, 0.3 is out.

    Changes since 0.2:
    IDs, spawn markers, multi-world, player skins as icons. And maybe more.

    Xon's version may be better though (although they both do the same thing). I certainly don't claim to be proficient with Java.

    Is that the standard? I based mine off of the Bukkit Plugin Generator posted somewhere a while back.
     
  30. Offline

    Xon

    Nether version is quite there yet thread-safe wise, ideally the plugin should be using BukkitScheduler.scheduleSyncDelayedTask rather than Timer.scheduleAtFixedRate, also Event.Type.PLAYER_TELEPORT isn't being captured so it looks weird when someone logs and gets dropped at the spawn point and then warps to where they logged out.
    --- merged: Feb 20, 2011 2:18 AM ---
    They where planning on blocking loading any plugin in that Namespace but realized all the tutorials and the like where wrong so they are fixing them up then planning on blocking sometime later.
     
  31. Offline

    TJ09

    That's not too big of a change, just convert the millisecond option to ticks and then it looks like it's basically a drop-in replacement.

    Ah, that explains that.
     

Share This Page