-
Notifications
You must be signed in to change notification settings - Fork 43
Home
This plugin supports the display of regions defined in the Towny plugin. The configuration is found in the config.yml file, found in the plugins/Dynmap-Towny directory. The default config.yml content is:
# Dynmap-Towny configuration
#
update:
# Seconds between checks for Towny updates
period: 300
layer:
name: "Towny"
# Make mobs layer hidden by default
hidebydefault: false
# ordering priority in layer menu (low goes before high - default is 0)
layerprio: 0
# Specify the minimum zoom-in level before outlines are shown (0=max zoom out (default))
minzoom: 0
# Format for popup - substitute values for macros
infowindow: '<div class="infowindow"><span style="font-size:120%;">%regionname% (%nation%)</span><br /> Mayor <span style="font-weight:bold;">%playerowners%</span><br /> Associates <span style="font-weight:bold;">%playermanagers%</span><br/>Flags<br /><span style="font-weight:bold;">%flags%</span></div>'
regionstyle:
strokeColor: "#FF0000"
strokeOpacity: 0.8
strokeWeight: 3
fillColor: "#FF0000"
fillOpacity: 0.35
homeicon: "blueflag"
capitalicon: "king"
# Optional setting to limit which regions to show, by name - if commented out, all regions are shown
visibleregions: [ ]
# Optional setting to hide specific regions, by name
hiddenregions: [ ]
# Optional per-region overrides for regionstyle (any defined replace those in regionstyle)
custstyle:
homebase:
strokeColor: "#00FF00"
y: 70
myothertown:
strokeColor: "#007F00"
# Optional per-nation overrides (custstyle has priority over nationstyle), _none_ is used for towns with no nation
nationstyle:
NationOfBlue:
strokeColor: "#0000FF"
fillColor: "#0000FF"
_none_:
homeicon: "greenflag"
The settings for this plugin are defined below:
-
update : The settings in this section control details of how and when updates from Towny are processed. The following settings are defined:
- period : This specifies the number of seconds between checks of the Towny configuration.
-
infowindow : this setting controls the generation of the HTML within the popup window displayed with the region is clicked. Several substitution macros are supported, which will be resolved into appropriate data specific to the region being displayed:
-
%regionname% - the name of the town
-
%playerowners% - the name of the mayor of the town
-
%playermanagers& - the name of the associates of the town
-
%playermembers% - the names of the players that are members of the region
-
%nation% - the name of the nation that the town is a member of, if any.
-
%flags% - the various attribute flags for the region
-
-
regionstyle : this is a map of attributes used for describing the coloring of the outline and fill for the regions being presented. The names of the Marker icons to be used for marking the town's home block (both if it is a nation's capital or if not) can be defined. The attributes include:
-
strokeColor : this specified the color of the outline of the regions
-
strokeOpacity : this specifies how opaque the outline is (0.0 = transparent, 1.0 = solid)
-
strokeWeight : this specifies the thickness of the outline
-
fillColor : this specifies the color used to fill the interior of the region
-
fillOpacity : this specifies how opaque the fill color is (0.0 = transparent, 1.0 = solid)
-
homeicon : Name of the Dynmap Marker Icon to be used for marking the town's home block. If not defined, no marker is shown. See https://github.com/webbukkit/dynmap/wiki/Using-markers for details on standard markers, and how to add custom markers.
-
capitalicon : Name of the Dynmap Marker Icon to be used for marking the town's home block when the town is the capital of a nation. If not defined, the homeicon is used instead.
-
y : Allows setting of the height (Y coordinate) used for the outline for the towns. Default is Y=64 (standard sea level). This would typically be set in custstyle on a town-by-town basis, to match the altitude of the outline with the typical ground level of the given town. Requires dynmap 0.29 or later to function.
-
-
visibleregions : this optional parameter, if defined, is used to provide a list of town names to be shown (any not on the list will not be shown). If the visibleregions attribute is not defined (the default), all towns will be shown.
-
hiddenregions : this optional parameter, if defined, is used to provide a list of town names to NOT be shown.
-
custstyle : this optional parameter, if defined, allows the regionstyle attributes used for specific towns to be overridden. The sections under the custstyle correspond to the name of the town to be customized, and the attributes within that section are the style settings (strokeColor, strokeOpacity, strokeWeight, fillColor, fillOpacity, homeicon, capitalicon, y) that will be used in place of the defaults from the regionstyle setting. Any settings provided by a matching custstyle setting will also override corresponding settings from a matching nationstyle.
-
nationstyle : this optional parameter, if defined, allows the regionstyle attributes used for towns that are in specific nations to be overridden. The sections under the nationstyle correspond to the name of the nation to be customized, and the attributes within that section are the style settings (strokeColor, strokeOpacity, strokeWeight, fillColor, fillOpacity, homeicon, capitalicon, y) that will be used in place of the defaults from the regionstyle setting for any town in that nation. The nation 'none' can be used to tailor towns that are not in a nation.
-
layer : This section controls display of the layer on the Dynmap maps, The attributes defined within the section include:
-
label : Name of the layer (controls what is shown on the layer selector).
-
hidebydefault : this optional parameter, if defined and set to true, changes the default visibility state for the map layer with the region information to be hidden. The layer can still be made visible with the layer control on the web client UI.
-
layerprio : this optional parameter provides an ordering weight for the layer in the layer selection control, which orders from lowest to highest layerprio (and then alphabetically for equal priority layers). Default is 2.
-
minzoom : this optional parameter provides an option to hide outlines below a given zoom-in level. Maximum zoom out is 0, and each step in adds 1. Default is 0 (which means the outlines always show).
-