WarpMarkers Bukkit Plugin
This plugin outputs a JSON file containing the locations of Warppoints from the Essentials Bukkit plugin for use with various Minecraft mapping software. When clicking on a marker on the map, the following information is shown: The name of the warppoint, who created it, and when, who last used it, and when. In addition WarpMarkers shows live messages for any Warppoint related event on the map (can be turned off). The project includes all of the files needed and installation instructions for the Minecraft Overviewer map generator. The events shown are: warppoint created, warppoint used and warppoint deleted.
A live map using WarpMarkers is found at mc.minecraftstuff.net
Resources
Installation
- Download the zip-file
- Unzip the downloaded zip-file
- Put the WarpMarkers.jar file in your plugin folder
- Stop and start Minecraft
- On first run, WarpMarkers will generate the configuration files needed in a folder called
WarpMarkers
in your plugin folder containing default values (by default it will output the JSON files to<minecraft_server_working_directory>/world/
- To change see the configuration section below
Configuration
The following configuration options for configuring the plugin itself are available in the <pluginfolder>/WarpMarkers/config.yml
file:
- interval (default 3000) how often (in miliseconds) the plugin should check if a new output file needs to be generated
- outputFile (default world/warpmarkers.json) the location of the json file to contain all of the warpmarkers
- updateFile: (default world/warpupdates.json) the location of the json file to contain updates to the warpmarkers
- updateLife: (default 50000) the (shortest) amount of time (in miliseconds) an update should remain in the update json file. Note that this value MUST be higher than the refresh-value set in the javascript-file
The following configuration options for configuring how the plugin interacts with the map are available in the WarpMarkers.js
file (see the setup sections for more information about this file):
- refreshrate (default 5000) How often the script checks for an update in miliseconds, value MUST be lower than the updateLife-value set in the config.yml file
- show_notifications (default true) Set this to false to turn of all notifications (events, start, stop)
- marker_image (default "cropcircles.png") Image file used for markers
- markershadow (default "markershadow.png") Image file used for marker shadows
- warp_icon (default "warp.jpg") Icon showed in popups and notifications
- onbydefault (default true) Determines if warppoints should be shown on the map as soon as it renders, or only after the user clicks the button.
- warpmarkers_file (default "warpmarkers.json") The location of the main warpmarkers json file
- warpupdates_file (default "warpupdates.json") The location of the warpmarkers updates json file
Setup for Minecraft Overviewer
- Perform installation (see above)
- Edit
<minecraftpluginfolder>/WarpMarkers/config.yml
so that the warpmarkers.json file is placed in the same folder as your Minecraft Overviewer output. Alternatively on GNU/Linux don't edit config.yml, make a symlink. If you change the name of the file, you must reflect said namechange in the WarpMarkers.js file. - Edit
<minecraftpluginfolder>/WarpMarkers/config.yml
so that the warpupdates.json file is placed in the same folder as your Minecraft Overviewer output. Alternatively on GNU/Linux don't edit config.yml, make a symlink. If you change the name of the file, you must reflect said namechange in the WarpMarkers.js file. - Stop Minecraft
- Start Minecraft
- Copy all of the files and folders in the
web_assets
folder to theweb_assets
folder your Minecraft Overviewer uses. -
Add the following three lines to the
index.html
file in theweb_assets
folder your Minecraft Overviewer uses. Add them directly before the</head>
tag:<link rel="stylesheet" type="text/css" href="css/gritter.css" />
<script type="text/javascript" src="js/jquery.gritter.js"></script>
<script type="text/javascript" src="WarpMarkers.js"></script>
-
In the same file, add
;warpmarkers.init();
to the bodies onload. In other words replace<body onload="overviewer.util.initialize()">
with<body onload="overviewer.util.initialize();warpmarkers.init();">
- Run Minecraft Overviewer and everything should work
Setup for Pigmap
TODO. Coming soon.
Version history
-
September 15 2011 - Version - 1.0.2
- Bug fix: WarpMarkers still unloaded if Essentials not running on start up instead of listening for Essentials.
-
September 13 2011 - Version - 1.0.1
- Checks permission before generating events. This avoids false events to be triggered if user doesn't have the correct permissions.
- Checks that command has not been disabled in Essentials config before generating events. This avoids false events to be triggered if user tries to use a disabled command.
- If Essentials not running, WarpMarkers will now wait for it to (possibly) start sometime in the future, instead of failing with an error message.
- Will now suspend and resume when Essentials is disabled and enabled.
-
September 12 2011 - Version 1.0.0
- Initial Release
Known bugs
- We have no way of knowing if we get the event when a player interacts with a sign before or after the Essentials plugin. This means that we cannot check if the user has enough credits if the warp-sign costs credits to use. This can lead to false events being showed on the map when a user without enough credits clicks on the sign.
Planned
- Add files for, an instructions on, using WarpMarkers with Pigmap and perhaps other map software
- Add support for Warpx0r and other similar plugins
- Implement /setwarpdiscription (with permissions) that will show on map
Building
- Unzip the zip-file or clone the project (
git clone [email protected]:deadcyclo/WarpMarkers.git
) - Make a sub-directory named lib
- Download the Craftbukkit .jar file and put it in the lib directory
- If different, rename it to
craftbukkit-0.0.1-SNAPSHOT.jar
- Download the Essentials .jar file and put it in the lib directory
- If different, rename it to
Essentials.jar
- Download the JSON simple .jar file and put it in the lib directory
- If different, rename it to
json_simple-1.1.jar
- Create a plugin.yml file for the project
- In the top directory run
make
(ormake WarpMarkers.jar
ormake WarpMarkers.zip
)
Contributing
- Fork it.
- Create a branch (
git checkout -b my_project
) - Commit your changes (
git commit -am "Added Something"
) - Push to the branch (
git push origin my_project
) - Create an [Issue][1] with a link to your branch
- Enjoy a cup of coffee or ten and wait
External projects used
Notifications use gritter jQuery plugin by Jordan Boesch
The map marker (cropcircles.png) is from the Map Icons Collection project by Nicolas Mollet
The WarpMarkers icon warp.jgp is a remake of this image by Torley Olmstead
The following libraries where also used: