Created Component Configuration (markdown)

mikeprimm 2011-08-22 22:28:52 -07:00
parent 1d8983a79a
commit 6845e4dfbe
1 changed files with 249 additions and 0 deletions

249
Component-Configuration.md Normal file

@ -0,0 +1,249 @@
The interface for Dynmap is defined via a set of components. Not all components can be enabled at once, and some are required. Details on the defined compnents, and their attributes, are in the following sections.
# Core Client Components
The following components defined the core of the client's interface with the Dynmap server. The Client Configuration Component, and at least one of the Client Update Components is required for any client functionality.
## Client Configuration Component
This component is defined by the following lines in the _components_ section:
- class: org.dynmap.ClientConfigurationComponent
This component is required, and has no settings.
## Internal Client Update Component
This component defines the primary interface for the web client via Dynmap's internal web server (which must be enabled for this component to function). It defines URLs for the client to use under the http://address:port/up/ path, including both fetching configuration data, and fetching map updates, player status and chat messages. The component is configured via the following lines in the _components_ section:
- class: org.dynmap.InternalClientUpdateComponent
sendhealth: true
sendposition: true
allowwebchat: true
webchat-interval: 5
hidewebchatip: false
trustclientname: false
The settings are defined as follows:
* _sendhealth_ : this controls whether or not the health data for players is reported to the web client. If it is disabled, other components that report player health will not have the needed data to do so, but player health information is also safe from being inspected. If enabled, health information may still be hidden for players located on specific worlds via the _sendhealth: false_ setting on those worlds.
* _sendpostiion_ : this controls whether or not the position data for players is reported to the web client. If it is disabled, other components that report position will not have the needed data to do so, but player position information is also safe from being inspected. If enabled, position information may still be hidden for players located on specific worlds via the _sendposition: false_ setting on those worlds.
* _allowwebchat_ : this setting controls whether or not the interface to allow chat messages to be sent from the web client to the server is enabled. If false, no web messages may be sent from the client.
* _webchat-interval_ : this controls the minimum period, in seconds, between consecutive chat messages from a given web client.
* _hidewebchatip_ : if set to true, this causes web chat messages to be reported via generic names versus the IP address of the sender.
* _trustclientname_ : if set to true, this causes the hostname/IP reported by the web client (which may be falsified) to be reported as the sender's address (versus using the address seen by the web server).
## JSON File Client Update Component
The alternative to using the internal web server is for all communications between Dynmap and the web client to be done via files served through an external web server. As this is done with files formatted using JSON (JavaScript Object Notation), this mode of operation is often referred to as "JSON File Mode". This mode allows the internal web server to be disabled, and is the alternative to using the Internal Client Update Component (only one of them may be enabled at a time). The component is defined by the following lines in the _components_ section:
- class: org.dynmap.JsonFileClientUpdateComponent
writeinterval: 1
sendhealth: true
sendposition: true
allowwebchat: false
webchat-interval: 5
hidewebchatip: false
The definitions of the attributes are the same as the corresponding attributes in the Internal Client Update Component. The additional attributes are as follows:
* _writeinterval_ : this is the period, in seconds, used by the component for writing updated configuration and map update files to the _webpath_/standalone directory. These are the files loaded by the web client via the external web server to receive the map configuration, as well as notifications of map updates, player position and health data, and chat messages.
# Server-Side Chat Components
These components control the server-side implementation of chat, including the sending of chat messages from the server to the client, as well as particulars of how chat messages from the client to the server are delivered to players on the server. Only one of these components should be defined at a time.
## Simple Chat Component
This component implements access to the standard Bukkit/Minecraft server's chat channel. When active, all chat messages are shared with the web client, and all messages received from the web client are sent to all players on the server (as well as all other web clients). This component is configured via the following lines in the _components_ section:
- class: org.dynmap.SimpleWebChatComponent
allowchat: true
The settings for the component include:
* _allowchat_ : if enabled, this setting determines if chat messages on the server are to be sent to the web clients. If set to 'false', no chat messages are sent to the web clients.
## HeroChat Chat Component
The HeroChat plugin implements channels and other behaviors that require special treatment. This component interfaces with HeroChat, and allows the selection of which HeroChat channels have their messages reported to the web clients, and which channel messages from the web clients are reported on. This component is configured via the following lines in the _components_ section:
- class: org.dynmap.herochat.HeroWebChatComponent
herochatwebchannel: Global
herochatchannels:
- Global
The settings for the component are as follows:
* _herochatwebchannel_ : this is the name of the HeroChat channel that will be used for any chat messages received from the web clients. Default value is 'Global'
* _herochatchannels_ : this is the list of HeroChat channel names that will be monitored for chat messages, which will then be shared with the web clients. Zero or more channels may be listed. The default is a single channel list containing 'Global'.
# Client-Side Chat Components
These components control the behavior and availability of the components of the web client used to support sending and receiving of chat messages. These components depend upon the corresponding server-side components being enabled and allowing the requested functions. The components can be defined individually or in any combination.
## Chat Client Component
This component enables the input field for chat messages, allowing the users to enter and send chat messages to the server from the web client. It is defined by the following lines:
- class: org.dynmap.ClientComponent
type: chat
It currently supports no settings.
## Chat Balloon Client Component
This component implements support for pop-up balloon messages, with the balloon being placed above the location of the sending player on the map, if any. The component is defined via the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: chatballoon
focuschatballoons: false
The component supports the following settings:
* _focuschatballoons_ : if enabled, this causes the map to pan to the chat balloon, if it is not currently visible on the map.
Note that placement of the word balloons requires that the position data for the speaking player is known, which may not be the case if _sendposition: false_ has been set for the player's current world, or globally via the active Client Update Component.
## Chat Box Client Component
This implements the box for viewing chat messages received from players on the server, as well as from other web clients. The component is defined via the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: chatbox
showplayerfaces: true
messagettl: 5
The settings for this component are as follows:
* _showplayerfaces_ : if enabled, the face icons for the player that sent a given chat message will be shown next to the message.
* _messagettl_ : this controls the number of seconds that a received chat message is shown on the screen before fading.
# Map Controls Components
These define additional map content, such as player markers, clocks, logos, etc. Any set of these components can be defined.
## Player Markers Component
This component is used to show player positions and names as markers on the displayed map. The player's position can only be shown if it is available (see the _sendposition_ setting, above). The component is defined by the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: playermarkers
showplayerfaces: true
showplayerhealth: true
smallplayerfaces: false
The settings for the component include the following:
* _showplayerfaces_ : if enabled, this causes the client to attempt to load the custom skin for the player (if any) and to show the face portion of that skin as the icon for the player. Otherwise, a small generic marker is shown instead.
* _showplayerhealth_ : if enabled, the client will attempt to show health and armor attributes for the player, as two rows of small icons below the player's name. This requires that the player's health information be available (see _sendhealth_, above).
* _smallplayerfaces_ : if enabled, player faces are shown (assuming _showplayerfaces_ is true), but at 1/2 the normal size (equivalent to the small generic markers used when _showplayerfaces_ is false).
## Digital Clock Component
This is used to display a simple digital clock, corresponding to the time on the world being displayed. The component is defined by the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: digitalclock
Only one clock component can be enabled at a time.
## Time Of Day Clock Component
This is a more sophisticated clock component, showing day and night via sun and moon icons that rise and set to match the time in the world being shown. The component is defined via the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: timeofdayclock
showdigitalclock: true
showweather: true
The settings for the component include the following:
* _showdigitalclock_ : if enabled, the digital clock is displayed (in addition to the sun and moon display)
* _showweather_ : if enabled, an icon is shown to indicate weather (rain, thunder) on the world being shown by the map.
## Logo Component
This component is used to allow an optional logo and link to be shown on the map. The component is defined via the following lines in the _components_ section:
- class: org.dynmap.ClientComponent
type: logo
text: "Dynmap"
linkurl: "http://forums.bukkit.org/threads/dynmap.489/"
The settings for the component are as follows:
* _text_ : the label shown for the logo
* _linkurl_ : the URL associated with the link tied to the displayed label
# Region Display Components
These components support the display of overlays on the present maps, corresponding to regions within the world in question. Regions defined by several different plugins are supported, and most of the settings for the components for these plugins are common, while some are quite specific to each component.
## WorldGuard Region Component
This component supports the display of regions defined in the WorldGuard plugin, including both rectangular and polygonal regions (found in WorldGuard 5). The WorldGuard component is defined via the following lines in the _components_ section:
- class: org.dynmap.regions.RegionsComponent
type: regions
name: WorldGuard
useworldpath: true
filename: regions.yml
basenode: regions
use3dregions: true
regionstyle:
strokeColor: "#FF0000"
strokeOpacity: 0.8
strokeWeight: 3
fillColor: "#FF0000"
fillOpacity: 0.35
visibleregions:
- homebase
- miningsite
hiddenregions:
- hiddenplace
- secretsite
customstyle:
homebase:
strokeColor: "#00FF00"
The settings for this component include the following:
* _name_ : For WorldGuard, this must be set to _WorldGuard_.
* _useworldpath_ : For WorldGuard, this must be set to _true_
* _filename_ : For WorldGuard, this must be set to _regions.yml_
* _basenode_ : For WorldGuard, this must be set to _regions_
* _use3dregions_ : If set to _true_, the regions will be presented with their vertical limits shown (as a cubiod or other volume). If set to _false_, the region is shown 2D at a position corresponding to average ground level (Y=64).
* _regionstyle_ : this is a map of attributes used for describing the coloring of the outline and fill for the regions being presented. 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)
* _visibleregions_ : this optional parameter, if defined, is used to provide a list of region names to be shown (any not on the list will not be shown). If the _visibleregions_ attribute is not defined (the default), all regions will be shown.
* _hiddenregions_ : this optional parameter, if defined, is used to provide a list of region names to NOT be shown.
* _customstyle_ : this optional parameter, if defined, allows the _regionstyle_ attributes used for specific regions to be overridden. The sections under the _customstyle_ correspond to the name of the region to be customized, and the attributes within that section are the style settings (_strokeColor_, _strokeOpacity_, _strokeWeight_, _fillColor_, _fillOpacity_) that will be used in place of the defaults from the _regionstyle_ setting.