Shift spigot version to more appropriate path

This commit is contained in:
Mike Primm 2018-08-23 23:14:55 -05:00
parent c90d157231
commit 1babea2ace
21 changed files with 2 additions and 27 deletions

View file

@ -0,0 +1,24 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}/core</directory>
<outputDirectory>/dynmap</outputDirectory></fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/dynmap</outputDirectory>
<includes>
<include>LICENSE</include></includes></fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/${artifactId}-${version}.jar</source>
<outputDirectory>/</outputDirectory>
<destName>dynmap.jar</destName>
</file>
</files>
</assembly>

View file

@ -0,0 +1,43 @@
package org.dynmap.bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
public class Armor {
/**
* http://www.minecraftwiki.net/wiki/Item_Durability#Armor_durability
* We rely on getArmorContents() to return 4 armor pieces in the order
* of: boots, pants, chest, helmet
*/
private static final int armorPoints[] = {3, 6, 8, 3};
public static final int getArmorPoints(Player player) {
int currentDurability = 0;
int baseDurability = 0;
int baseArmorPoints = 0;
ItemStack[] itm = new ItemStack[4];
PlayerInventory inv = player.getInventory();
itm[0] = inv.getBoots();
itm[1]= inv.getLeggings();
itm[2] = inv.getChestplate();
itm[3] = inv.getHelmet();
for(int i = 0; i < 4; i++) {
if(itm[i] == null) continue;
int dur = itm[i].getDurability();
int max = itm[i].getType().getMaxDurability();
if(max <= 0) continue;
if(i == 2)
max = max + 1; /* Always 1 too low for chestplate */
else
max = max - 3; /* Always 3 too high, versus how client calculates it */
baseDurability += max;
currentDurability += max - dur;
baseArmorPoints += armorPoints[i];
}
int ap = 0;
if(baseDurability > 0)
ap = ((baseArmorPoints - 1) * currentDurability) / baseDurability + 1;
return ap;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
package org.dynmap.bukkit;
import org.bukkit.Bukkit;
import org.dynmap.Log;
import org.dynmap.bukkit.helper.BukkitVersionHelper;
import org.dynmap.bukkit.helper.BukkitVersionHelperCB;
import org.dynmap.bukkit.helper.BukkitVersionHelperGlowstone;
import org.dynmap.bukkit.helper.v113.BukkitVersionHelperSpigot113;
public class Helper {
public static final BukkitVersionHelper getHelper() {
if (BukkitVersionHelper.helper == null) {
String v = Bukkit.getServer().getVersion();
Log.info("version=" + v);
if (v.contains("MCPC")) {
Log.severe("*********************************************************************************");
Log.severe("* MCPC-Plus is no longer supported via the Bukkit version of Dynmap. *");
Log.severe("* Install the appropriate Forge version of Dynmap. *");
Log.severe("* Add the DynmapCBBridge plugin to enable support for Dynmap-compatible plugins *");
Log.severe("*********************************************************************************");
}
else if(v.contains("BukkitForge")) {
Log.severe("*********************************************************************************");
Log.severe("* BukkitForge is not supported via the Bukkit version of Dynmap. *");
Log.severe("* Install the appropriate Forge version of Dynmap. *");
Log.severe("* Add the DynmapCBBridge plugin to enable support for Dynmap-compatible plugins *");
Log.severe("*********************************************************************************");
}
else if(Bukkit.getServer().getClass().getName().contains("GlowServer")) {
Log.info("Loading Glowstone support");
BukkitVersionHelper.helper = new BukkitVersionHelperGlowstone();
}
else if (v.contains("(MC: 1.13)")) {
BukkitVersionHelper.helper = new BukkitVersionHelperSpigot113();
}
else {
BukkitVersionHelper.helper = new BukkitVersionHelperCB();
}
}
return BukkitVersionHelper.helper;
}
}

View file

@ -0,0 +1,69 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.dynmap.Log;
public class BukkitPermissions implements PermissionProvider {
protected String name;
protected Map<String, Boolean> pd;
public static BukkitPermissions create(String name, Map<String,Boolean> pd) {
try {
Class.forName("org.bukkit.permissions.PermissibleBase"); /* See if class exists */
} catch (ClassNotFoundException cnfx) {
return null;
}
Log.info("Using Bukkit Permissions (superperms) for access control");
Log.info("Web interface permissions only available for online users");
return new BukkitPermissions(name, pd);
}
public BukkitPermissions(String name, Map<String, Boolean> pd) {
this.name = name;
this.pd = pd;
}
@Override
public boolean has(CommandSender sender, String permission) {
Player player = sender instanceof Player ? (Player) sender : null;
return player != null
? player.hasPermission(name + "." + permission) || player.hasPermission(name + ".*")
: true;
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
Player p = Bukkit.getPlayerExact(player);
HashSet<String> hasperms = null;
if (p != null) {
hasperms = new HashSet<String>();
for(String perm : perms) {
if (p.hasPermission(name + "." + perm)) {
hasperms.add(perm);
}
}
}
return hasperms;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
Player p = Bukkit.getPlayerExact(player);
if (p != null) {
return p.hasPermission(name + "." + perm);
}
else {
OfflinePlayer op = Bukkit.getOfflinePlayer(player);
if((op != null) && op.isOp()) {
return true;
}
return false;
}
}
}

View file

@ -0,0 +1,66 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.dynmap.Log;
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder;
import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler;
public class GroupManagerPermissions implements PermissionProvider {
String name;
GroupManager gm;
WorldsHolder wh;
public static GroupManagerPermissions create(Server server, String name) {
Plugin permissionsPlugin = server.getPluginManager().getPlugin("GroupManager");
if (permissionsPlugin == null)
return null;
server.getPluginManager().enablePlugin(permissionsPlugin);
if(permissionsPlugin.isEnabled() == false)
return null;
Log.info("Using GroupManager " + permissionsPlugin.getDescription().getVersion() + " for access control");
return new GroupManagerPermissions(name, permissionsPlugin);
}
public GroupManagerPermissions(String name, Plugin permissionsPlugin) {
this.name = name;
gm = (GroupManager)permissionsPlugin;
wh = gm.getWorldsHolder();
}
@Override
public boolean has(CommandSender sender, String permission) {
Player player = sender instanceof Player ? (Player) sender : null;
boolean rslt = (player != null) ? gm.getWorldsHolder().getDefaultWorld().getPermissionsHandler().permission(player, name + "." + permission) : true;
return rslt;
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
HashSet<String> hasperms = new HashSet<String>();
AnjoPermissionsHandler apm = gm.getWorldsHolder().getDefaultWorld().getPermissionsHandler();
if (apm != null) {
for (String pp : perms) {
if (apm.permission(player, name + "." + pp)) {
hasperms.add(pp);
}
}
}
return hasperms;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
AnjoPermissionsHandler apm = gm.getWorldsHolder().getDefaultWorld().getPermissionsHandler();
boolean rslt = false;
if(apm != null) {
rslt = apm.permission(player, name + "." + perm);
}
return rslt;
}
}

View file

@ -0,0 +1,71 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.dynmap.Log;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
public class NijikokunPermissions implements PermissionProvider {
String name;
PermissionHandler permissions;
Plugin plugin;
String defworld;
public static NijikokunPermissions create(Server server, String name) {
Plugin permissionsPlugin = server.getPluginManager().getPlugin("Permissions");
if (permissionsPlugin == null)
return null;
server.getPluginManager().enablePlugin(permissionsPlugin);
if(permissionsPlugin.isEnabled() == false)
return null;
Log.info("Using Permissions " + permissionsPlugin.getDescription().getVersion() + " for access control");
return new NijikokunPermissions(permissionsPlugin, name);
}
public NijikokunPermissions(Plugin permissionsPlugin, String name) {
this.name = name;
plugin = permissionsPlugin;
defworld = Bukkit.getServer().getWorlds().get(0).getName();
}
@Override
public boolean has(CommandSender sender, String permission) {
if(permissions == null)
permissions = ((Permissions)plugin).getHandler();
Player player = sender instanceof Player ? (Player) sender : null;
return player != null
? permissions.has(player, name + "." + permission) || permissions.has(player, name + ".*")
: true;
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
if(permissions == null)
permissions = ((Permissions)plugin).getHandler();
HashSet<String> hasperms = new HashSet<String>();
for (String pp : perms) {
if (permissions.has(defworld, player, name + "." + pp)) {
hasperms.add(pp);
}
}
return hasperms;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
if(permissions == null)
permissions = ((Permissions)plugin).getHandler();
return permissions.has(defworld, player, name + "." + perm);
}
}

View file

@ -0,0 +1,36 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.dynmap.Log;
public class OpPermissions implements PermissionProvider {
public HashSet<String> opCommands = new HashSet<String>();
public OpPermissions(String[] opCommands) {
for (String opCommand : opCommands) {
this.opCommands.add(opCommand);
}
Log.info("Using ops.txt for access control");
}
@Override
public boolean has(CommandSender sender, String permission) {
return (sender instanceof Player)
? opCommands.contains(permission)
? ((Player) sender).isOp()
: true
: true;
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
return null;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
return false;
}
}

View file

@ -0,0 +1,66 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.dynmap.Log;
import ru.tehkode.permissions.PermissionManager;
import ru.tehkode.permissions.PermissionUser;
import ru.tehkode.permissions.bukkit.PermissionsEx;
public class PEXPermissions implements PermissionProvider {
String name;
PermissionManager pm;
public static PEXPermissions create(Server server, String name) {
Plugin permissionsPlugin = server.getPluginManager().getPlugin("PermissionsEx");
if (permissionsPlugin == null)
return null;
server.getPluginManager().enablePlugin(permissionsPlugin);
if(permissionsPlugin.isEnabled() == false)
return null;
//Broken in new dev builds, apparently
//if(PermissionsEx.isAvailable() == false)
// return null;
Log.info("Using PermissionsEx " + permissionsPlugin.getDescription().getVersion() + " for access control");
return new PEXPermissions(name);
}
public PEXPermissions(String name) {
this.name = name;
pm = PermissionsEx.getPermissionManager();
}
@Override
public boolean has(CommandSender sender, String permission) {
Player player = sender instanceof Player ? (Player) sender : null;
return (player != null) ? pm.has(player, name + "." + permission) : true;
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
HashSet<String> hasperms = new HashSet<String>();
PermissionUser pu = pm.getUser(player);
if(pu != null) {
for (String pp : perms) {
if (pu.has(name + "." + pp)) {
hasperms.add(pp);
}
}
}
return hasperms;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
PermissionUser pu = pm.getUser(player);
if(pu != null) {
return pu.has(name + "." + perm);
}
return false;
}
}

View file

@ -0,0 +1,34 @@
package org.dynmap.bukkit.permissions;
import java.util.Map;
import org.bukkit.Server;
import org.bukkit.plugin.Plugin;
import org.dynmap.Log;
import com.platymuus.bukkit.permissions.PermissionsPlugin;
public class PermBukkitPermissions extends BukkitPermissions {
PermissionsPlugin plugin;
Map<String, Boolean> pd;
public static PermBukkitPermissions create(Server server, String name, Map<String, Boolean> pd) {
Plugin permissionsPlugin = server.getPluginManager().getPlugin("PermissionsBukkit");
if (permissionsPlugin == null)
return null;
server.getPluginManager().enablePlugin(permissionsPlugin);
if(permissionsPlugin.isEnabled() == false)
return null;
Log.info("Using PermissionsBukkit " + permissionsPlugin.getDescription().getVersion() + " for access control");
Log.info("Web interface permissions only available for online users");
return new PermBukkitPermissions(permissionsPlugin, name, pd);
}
public PermBukkitPermissions(Plugin permissionsPlugin, String name, Map<String, Boolean> pd) {
super(name, pd);
plugin = (PermissionsPlugin) permissionsPlugin;
this.pd = pd;
}
}

View file

@ -0,0 +1,14 @@
package org.dynmap.bukkit.permissions;
import java.util.Set;
import org.bukkit.command.CommandSender;
public interface PermissionProvider {
boolean has(CommandSender sender, String permission);
Set<String> hasOfflinePermissions(String player, Set<String> perms);
boolean hasOfflinePermission(String player, String perm);
}

View file

@ -0,0 +1,82 @@
package org.dynmap.bukkit.permissions;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.bukkit.Server;
import org.bukkit.plugin.Plugin;
import org.dynmap.Log;
import de.bananaco.bpermissions.api.User;
import de.bananaco.bpermissions.api.WorldManager;
public class bPermPermissions extends BukkitPermissions {
WorldManager wm;
public static bPermPermissions create(Server server, String name, Map<String,Boolean> pd) {
Plugin permissionsPlugin = server.getPluginManager().getPlugin("bPermissions");
if (permissionsPlugin == null)
return null;
server.getPluginManager().enablePlugin(permissionsPlugin);
if(permissionsPlugin.isEnabled() == false)
return null;
Log.info("Using bPermissions " + permissionsPlugin.getDescription().getVersion() + " for access control");
return new bPermPermissions(name, pd);
}
public bPermPermissions(String name, Map<String,Boolean> pd) {
super(name, pd);
wm = WorldManager.getInstance();
}
@Override
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
HashSet<String> hasperms = new HashSet<String>();
User usr = wm.getDefaultWorld().getUser(player);
if(usr != null) {
try { usr.calculateEffectivePermissions(); } catch (Exception x) {}
Map<String,Boolean> p = usr.getMappedPermissions();
for (String pp : perms) {
String permval = name + "." + pp;
Boolean v = p.get(permval);
if (v != null) {
if(v.booleanValue())
hasperms.add(permval);
}
else {
v = pd.get(permval);
if((v != null) && v.booleanValue())
hasperms.add(permval);
}
}
}
return hasperms;
}
@Override
public boolean hasOfflinePermission(String player, String perm) {
boolean rslt;
String permval = name + "." + perm;
User usr = wm.getDefaultWorld().getUser(player);
if(usr != null) {
try { usr.calculateEffectivePermissions(); } catch (Exception x) {}
if(usr.getMappedPermissions().containsKey(permval)) {
rslt = usr.hasPermission(permval);
}
else {
Boolean v = pd.get(permval);
if(v != null)
rslt = v;
else
rslt = false;
}
}
else {
rslt = false;
}
return rslt;
}
}

View file

@ -0,0 +1,464 @@
# All paths in this configuration file are relative to Dynmap's data-folder: minecraft_server/plugins/dynmap/
# All map templates are defined in the templates directory
# To use the HDMap very-low-res (2 ppb) map templates as world defaults, set value to vlowres
# The definitions of these templates are in normal-vlowres.txt, nether-vlowres.txt, and the_end-vlowres.txt
# To use the HDMap low-res (4 ppb) map templates as world defaults, set value to lowres
# The definitions of these templates are in normal-lowres.txt, nether-lowres.txt, and the_end-lowres.txt
# To use the HDMap hi-res (16 ppb) map templates (these can take a VERY long time for initial fullrender), set value to hires
# The definitions of these templates are in normal-hires.txt, nether-hires.txt, and the_end-hires.txt
# To use the HDMap low-res (4 ppb) map templates, with support for boosting resolution selectively to hi-res (16 ppb), set value to low_boost_hi
# The definitions of these templates are in normal-low_boost_hi.txt, nether-low_boost_hi.txt, and the_end-low_boost_hi.txt
# To use the HDMap hi-res (16 ppb) map templates, with support for boosting resolution selectively to vhi-res (32 ppb), set value to hi_boost_vhi
# The definitions of these templates are in normal-hi_boost_vhi.txt, nether-hi_boost_vhi.txt, and the_end-hi_boost_vhi.txt
# To use the HDMap hi-res (16 ppb) map templates, with support for boosting resolution selectively to xhi-res (64 ppb), set value to hi_boost_xhi
# The definitions of these templates are in normal-hi_boost_xhi.txt, nether-hi_boost_xhi.txt, and the_end-hi_boost_xhi.txt
deftemplatesuffix: hires
# Map storage scheme: only uncomment one 'type' value
# filetree: classic and default scheme: tree of files, with all map data under the directory indicated by 'tilespath' setting
# sqlite: single SQLite database file (this can get VERY BIG), located at 'dbfile' setting (default is file dynmap.db in data directory)
# mysql: MySQL database, at hostname:port in database, accessed via userid with password
storage:
# Filetree storage (standard tree of image files for maps)
type: filetree
# SQLite db for map storage (uses dbfile as storage location)
#type: sqlite
#dbfile: dynmap.db
# MySQL DB for map storage (at 'hostname':'port' in database 'database' using user 'userid' password 'password' and table prefix 'prefix'
#type: mysql
#hostname: localhost
#port: 3306
#database: dynmap
#userid: dynmap
#password: dynmap
#prefix: ""
components:
- class: org.dynmap.ClientConfigurationComponent
- class: org.dynmap.InternalClientUpdateComponent
sendhealth: true
sendposition: true
allowwebchat: true
webchat-interval: 5
hidewebchatip: false
trustclientname: false
includehiddenplayers: false
# (optional) if true, color codes in player display names are used
use-name-colors: false
# (optional) if true, player login IDs will be used for web chat when their IPs match
use-player-login-ip: true
# (optional) if use-player-login-ip is true, setting this to true will cause chat messages not matching a known player IP to be ignored
require-player-login-ip: false
# (optional) block player login IDs that are banned from chatting
block-banned-player-chat: true
# Require login for web-to-server chat (requires login-enabled: true)
webchat-requires-login: false
# If set to true, users must have dynmap.webchat permission in order to chat
webchat-permissions: false
# Limit length of single chat messages
chatlengthlimit: 256
# # Optional - make players hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky)
# hideifshadow: 4
# # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
# hideifundercover: 14
# # (Optional) if true, players that are crouching/sneaking will be hidden
hideifsneaking: false
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
protected-player-info: false
# If true, hide players with invisibility potion effects active
hide-if-invisiblity-potion: true
# If true, player names are not shown on map, chat, list
hidenames: false
#- class: org.dynmap.JsonFileClientUpdateComponent
# writeinterval: 1
# sendhealth: true
# sendposition: true
# allowwebchat: true
# webchat-interval: 5
# hidewebchatip: false
# includehiddenplayers: false
# use-name-colors: false
# use-player-login-ip: false
# require-player-login-ip: false
# block-banned-player-chat: true
# hideifshadow: 0
# hideifundercover: 0
# hideifsneaking: false
# # Require login for web-to-server chat (requires login-enabled: true)
# webchat-requires-login: false
# # If set to true, users must have dynmap.webchat permission in order to chat
# webchat-permissions: false
# # Limit length of single chat messages
# chatlengthlimit: 256
# hide-if-invisiblity-potion: true
# hidenames: false
- class: org.dynmap.SimpleWebChatComponent
allowchat: true
# If true, web UI users can supply name for chat using 'playername' URL parameter. 'trustclientname' must also be set true.
allowurlname: false
# Note: this component is needed for the dmarker commands, and for the Marker API to be available to other plugins
- class: org.dynmap.MarkersComponent
type: markers
showlabel: false
enablesigns: false
# Default marker set for sign markers
default-sign-set: markers
# (optional) add spawn point markers to standard marker layer
showspawn: true
spawnicon: world
spawnlabel: "Spawn"
# (optional) layer for showing offline player's positions (for 'maxofflinetime' minutes after logoff)
showofflineplayers: false
offlinelabel: "Offline"
offlineicon: offlineuser
offlinehidebydefault: true
offlineminzoom: 0
maxofflinetime: 30
# (optional) layer for showing player's spawn beds
showspawnbeds: false
spawnbedlabel: "Spawn Beds"
spawnbedicon: bed
spawnbedhidebydefault: true
spawnbedminzoom: 0
spawnbedformat: "%name%'s bed"
# (optional) show world border (vanilla 1.8+)
showworldborder: true
- class: org.dynmap.ClientComponent
type: chat
allowurlname: false
- class: org.dynmap.ClientComponent
type: chatballoon
focuschatballoons: false
- class: org.dynmap.ClientComponent
type: chatbox
showplayerfaces: true
messagettl: 5
# Optional: set number of lines in scrollable message history: if set, messagettl is not used to age out messages
#scrollback: 100
# Optiona; set maximum number of lines visible for chatbox
#visiblelines: 10
# Optional: send push button
sendbutton: false
- class: org.dynmap.ClientComponent
type: playermarkers
showplayerfaces: true
showplayerhealth: true
# If true, show player body too (only valid if showplayerfaces=true
showplayerbody: false
# Option to make player faces small - don't use with showplayerhealth
smallplayerfaces: false
# Optional - make player faces layer hidden by default
hidebydefault: false
# Optional - ordering priority in layer menu (low goes before high - default is 0)
layerprio: 0
# Optional - label for player marker layer (default is 'Players')
label: "Players"
#- class: org.dynmap.ClientComponent
# type: digitalclock
- class: org.dynmap.ClientComponent
type: link
- class: org.dynmap.ClientComponent
type: timeofdayclock
showdigitalclock: true
showweather: true
# Mouse pointer world coordinate display
- class: org.dynmap.ClientComponent
type: coord
label: "Location"
hidey: false
show-mcr: false
# Note: more than one logo component can be defined
#- class: org.dynmap.ClientComponent
# type: logo
# text: "Dynmap"
# #logourl: "images/block_surface.png"
# linkurl: "http://forums.bukkit.org/threads/dynmap.489/"
# # Valid positions: top-left, top-right, bottom-left, bottom-right
# position: bottom-right
#- class: org.dynmap.ClientComponent
# type: inactive
# timeout: 1800 # in seconds (1800 seconds = 30 minutes)
# redirecturl: inactive.html
# #showmessage: 'You were inactive for too long.'
#- class: org.dynmap.TestComponent
# stuff: "This is some configuration-value"
# Treat hiddenplayers.txt as a whitelist for players to be shown on the map? (Default false)
display-whitelist: false
# How often a tile gets rendered (in seconds).
renderinterval: 1
# How many tiles on update queue before accelerate render interval
renderacceleratethreshold: 60
# How often to render tiles when backlog is above renderacceleratethreshold
renderaccelerateinterval: 0.2
# How many update tiles to work on at once (if not defined, default is 1/2 the number of cores)
tiles-rendered-at-once: 2
# If true, use normal priority threads for rendering (versus low priority) - this can keep rendering
# from starving on busy Windows boxes (Linux JVMs pretty much ignore thread priority), but may result
# in more competition for CPU resources with other processes
usenormalthreadpriority: true
# Save and restore pending tile renders - prevents their loss on server shutdown or /reload
saverestorepending: true
# Save period for pending jobs (in seconds): periodic saving for crash recovery of jobs
save-pending-period: 900
# Zoom-out tile update period - how often to scan for and process tile updates into zoom-out tiles (in seconds)
zoomoutperiod: 30
# Control whether zoom out tiles are validated on startup (can be needed if zoomout processing is interrupted, but can be expensive on large maps)
initial-zoomout-validate: true
# Default delay on processing of updated tiles, in seconds. This can reduce potentially expensive re-rendering
# of frequently updated tiles (such as due to machines, pistons, quarries or other automation). Values can
# also be set on individual worlds and individual maps.
tileupdatedelay: 30
# Tile hashing is used to minimize tile file updates when no changes have occurred - set to false to disable
enabletilehash: true
# Optional - hide ores: render as normal stone (so that they aren't revealed by maps)
#hideores: true
# Optional - enabled BetterGrass style rendering of grass and snow block sides
#better-grass: true
# Optional - enable smooth lighting by default on all maps supporting it (can be set per map as lighting option)
smooth-lighting: true
# Optional - use world provider lighting table (good for custom worlds with custom lighting curves, like nether)
# false=classic Dynmap lighting curve
use-brightness-table: true
# Optional - render specific block IDs using the texures and models of another block ID: can be used to hide/disguise specific
# blocks (e.g. make ores look like stone, hide chests) or to provide simple support for rendering unsupported custom blocks
block-id-alias:
# "14": 1
# "15": 1
# "16": 1
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100)
# Has no effect on maps with explicit format settings
image-format: png
# use-generated-textures: if true, use generated textures (same as client); false is static water/lava textures
# correct-water-lighting: if true, use corrected water lighting (same as client); false is legacy water (darker)
# transparent-leaves: if true, leaves are transparent (lighting-wise): false is needed for some Spout versions that break lighting on leaf blocks
use-generated-textures: true
correct-water-lighting: true
transparent-leaves: true
# ctm-support: if true, Connected Texture Mod (CTM) in texture packs is enabled (default)
ctm-support: true
# custom-colors-support: if true, Custom Colors in texture packs is enabled (default)
custom-colors-support: true
# Control loading of player faces (if set to false, skins are never fetched)
#fetchskins: false
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
render-triggers:
#- playermove
#- playerjoin
- blockplaced
- blockbreak
- leavesdecay
- blockburn
- chunkgenerated
- blockformed
- blockfaded
- blockspread
- pistonmoved
- explosion
#- blockfromto
#- blockphysics
- structuregrow
- blockgrow
#- blockredstone
# Title for the web page - if not specified, defaults to the server's name (unless it is the default of 'Unknown Server')
#webpage-title: "My Awesome Server Map"
# The path where the tile-files are placed.
tilespath: web/tiles
# The path where the web-files are located.
webpath: web
# The path were the /dynmapexp command exports OBJ ZIP files
exportpath: export
# The network-interface the webserver will bind to (0.0.0.0 for all interfaces, 127.0.0.1 for only local access).
# If not set, uses same setting as server in server.properties (or 0.0.0.0 if not specified)
#webserver-bindaddress: 0.0.0.0
# The TCP-port the webserver will listen on.
webserver-port: 8123
# Maximum concurrent session on internal web server - limits resources used in Bukkit server
max-sessions: 30
# Disables Webserver portion of Dynmap (Advanced users only)
disable-webserver: false
# Enable/disable having the web server allow symbolic links (true=compatible with existing code, false=more secure (default))
allow-symlinks: true
# Enable login support
login-enabled: false
# Require login to access website (requires login-enabled: true)
login-required: false
# Period between tile renders for fullrender, in seconds (non-zero to pace fullrenders, lessen CPU load)
timesliceinterval: 0.0
# Maximum chunk loads per server tick (1/20th of a second) - reducing this below 90 will impact render performance, but also will reduce server thread load
maxchunkspertick: 200
# Progress report interval for fullrender/radiusrender, in tiles. Must be 100 or greater
progressloginterval: 100
# Parallel fullrender: if defined, number of concurrent threads used for fullrender or radiusrender
# Note: setting this will result in much more intensive CPU use, some additional memory use. Caution should be used when
# setting this to equal or exceed the number of physical cores on the system.
#parallelrendercnt: 4
# Interval the browser should poll for updates.
updaterate: 2000
# If nonzero, server will pause fullrender/radiusrender processing when 'fullrenderplayerlimit' or more users are logged in
fullrenderplayerlimit: 0
# If nonzero, server will pause update render processing when 'updateplayerlimit' or more users are logged in
updateplayerlimit: 0
# Target limit on server thread use - msec per tick
per-tick-time-limit: 50
# If TPS of server is below this setting, update renders processing is paused
update-min-tps: 18.0
# If TPS of server is below this setting, full/radius renders processing is paused
fullrender-min-tps: 18.0
# If TPS of server is below this setting, zoom out processing is paused
zoomout-min-tps: 18.0
showplayerfacesinmenu: true
# Control whether players that are hidden or not on current map are grayed out (true=yes)
grayplayerswhenhidden: true
# Use player permissions to order player list: first to last, players are ordered by first permission listed that they have
# That is, anyone with first listed permission goes before anyone with second, etc, with users with none of the nodes going last
player-sort-permission-nodes:
- bukkit.command.op
# Set sidebaropened: 'true' to pin menu sidebar opened permanently, 'pinned' to default the sidebar to pinned, but allow it to unpin
#sidebaropened: true
# Customized HTTP response headers - add 'id: value' pairs to all HTTP response headers (internal web server only)
#http-response-headers:
# Access-Control-Allow-Origin: "my-domain.com"
# X-Custom-Header-Of-Mine: "MyHeaderValue"
# Trusted proxies for web server - which proxy addresses are trusted to supply valid X-Forwarded-For fields
trusted-proxies:
- "127.0.0.1"
- "0:0:0:0:0:0:0:1"
# Join/quit message format for web chat: set to "" to disable notice on web UI
joinmessage: "%playername% joined"
quitmessage: "%playername% quit"
spammessage: "You may only chat once every %interval% seconds."
# format for messages from web: %playername% substitutes sender ID (typically IP), %message% includes text
webmsgformat: "&color;2[WEB] %playername%: &color;f%message%"
# Control whether layer control is presented on the UI (default is true)
showlayercontrol: true
# Enable checking for banned IPs via banned-ips.txt (internal web server only)
check-banned-ips: true
# Default selection when map page is loaded
defaultzoom: 0
defaultworld: world
defaultmap: flat
# (optional) Zoom level and map to switch to when following a player, if possible
#followzoom: 3
#followmap: surface
# If true, make persistent record of IP addresses used by player logins, to support web IP to player matching
persist-ids-by-ip: true
# If true, map text to cyrillic
cyrillic-support: false
# If true, coordinates will be rounded
round-coordinates: true
# Messages to customize
msg:
maptypes: "Map Types"
players: "Players"
chatrequireslogin: "Chat Requires Login"
chatnotallowed: "You are not permitted to send chat messages"
hiddennamejoin: "Player joined"
hiddennamequit: "Player quit"
# URL for client configuration (only need to be tailored for proxies or other non-standard configurations)
url:
# configuration URL
#configuration: "up/configuration"
# update URL
#update: "up/world/{world}/{timestamp}"
# sendmessage URL
#sendmessage: "up/sendmessage"
# login URL
#login: "up/login"
# register URL
#register: "up/register"
# tiles base URL
#tiles: "tiles/"
# markers base URL
#markers: "tiles/"
# Customization commands - allows scripts to be run before/after certain events
custom-commands:
image-updates:
# Command run just before any image file is written or updated: run with single parameter with fully qualified file name
preupdatecommand: ""
# Command run just after any image file is written or updated: run with single parameter with fully qualified file name
postupdatecommand: ""
# Snapshot cache size, in chunks
snapshotcachesize: 500
# Snapshot cache uses soft references (true), else weak references (false)
soft-ref-cache: true
# Set to true to enable verbose startup messages - can help with debugging map configuration problems
# Set to false for a much quieter startup log
verbose: false
# Enables debugging.
#debuggers:
# - class: org.dynmap.debug.LogDebugger
# Debug: dump blocks missing render data
dump-missing-blocks: false

View file

@ -0,0 +1,382 @@
name: dynmap
main: org.dynmap.bukkit.DynmapPlugin
version: "${version}-${buildnumber}"
authors: [mikeprimm]
website: "http://www.minecraftforum.net/topic/1543523-dynmap-dynamic-web-based-maps-for-minecraft/"
softdepend: [ Permissions, PermissionEx, bPermissions, PermissionsBukkit, GroupManager ]
commands:
dynmap:
description: Controls Dynmap.
usage: |
/<command> hide - hides the player from the map.
/<command> hide TheDude - hides the player 'TheDude' on the map.
/<command> show - shows the player on the map.
/<command> show TheDude - shows the player 'TheDude' on the map.
/<command> render - Renders the tile at your location.
/<command> fullrender - Render all maps for entire world from your location.
/<command> fullrender world - Render all maps for entire world 'world'.
/<command> fullrender world:mapname - Render map 'mapname' of world 'world'.
/<command> radiusrender ## - Render at least ## block radius from your location on all maps.
/<command> radiusrender ## mapname - Render at least ## block radius from your location on map 'mapname'
/<command> radiusrender worldname x z ## - Render at least ## block radius from location x,z on world 'worldname'
/<command> radiusrender worldname x z ## mapname - Render at least ## block radius from location x,z on world 'worldname' on map 'mapname'
/<command> updaterender - Render updates starting at your location on all maps.
/<command> updaterender mapname - Render updates starting at your location on give map
/<command> updaterender worldname x z mapname - Render updates starting at location x,z on world 'worldname' for given map
/<command> cancelrender - Cancels any active renders on current world
/<command> cancelrender world - Cancels any active renders of world 'world'
/<command> stats - Show render statistics.
/<command> triggerstats - Show render trigger statistics
/<command> resetstats - Reset render statistics.
/<command> sendtoweb msg - Send message to web users
/<command> purgequeue - Set tile update queue to empty
/<command> purgequeue worldname - Set tile update queue to empty for world 'worldname'
/<command> purgemap worldname mapname - Delete all the tiles for map 'mapname' of world 'worldname'
/<command> purgeworld worldname - Delete all the files for world 'worldname'
/<command> pause - Show render pause state
/<command> pause <all|none|full|update> - Set render pause state
/<command> quiet - Stop progress messages from active jobs
/<command> ids-for-ip <ipaddress> - Show player IDs that have logged in from given IP address
/<command> ips-for-id <playerid> - Show IP addresses that have been used for the given player ID
/<command> add-id-for-ip <playerid> <ipaddress> - Add player ID to given IP address
/<command> del-id-for-ip <playerid> <ipaddress> - Delete player ID from given IP address
/<command> webregister - Start registration process for creating web login account
dmarker:
description: Manipulate map markers
usage: |
/<command> add <label> - add new marker with given label at current location (use double-quotes if spaces needed)
/<command> add id:<id> <label> - add new marker with given ID at current location (use double-quotes if spaces needed)
/<command> movehere <label> - move marker with given label to current location
/<command> movehere id:<id> - move marker with given ID to current location
/<command> update <label> icon:<icon> newlabel:<newlabel>- update marker with given ID with new label and/or icon
/<command> delete <label> - delete marker with given label
/<command> delete id:<id> - delete marker with given ID
/<command> list - list details of all markers
/<command> icons - list details of all icons
/<command> addset <label> - add marker set with given label (ID=label)
/<command> addset id:<id> <label> - add marker set with given ID and label
/<command> updateset id:<id> newlabel:<label> - update marker set with given ID
/<command> updateset <label> newlabel:<label> - update marker set with given label
/<command> deleteset <label> - delete marker set with given label
/<command> deleteset id:<id> - delete marker set with given ID
/<command> listsets - list all marker sets
/<command> addicon id:<id> <label> file:"filename" - install new icon
/<command> updateicon id:<id> newlabel:<label> file:"filename" - update existing icon
/<command> updateicon <label> newlabel:<label> file:"filename" - update existing icon
/<command> deleteicon id:<id> - remove icon
/<command> deleteicon <label> - remove icon
/<command> addcorner - add corner to corner list using current location
/<command> addcorner <x> <y> <z> <world> - add corner with given x, y and z coordinate on given world to corner list
/<command> clearcorners - clear corner list
/<command> addarea <label> - add new area with given label using corner list
/<command> addarea id:<id> <label> - add new area with given ID using corner list
/<command> deletearea <label> - delete area with given label
/<command> deletearea id:<id> <label> - delete area with given ID
/<command> listareas - list details of all areas
/<command> updatearea <label> <arg>:<value> ... - update attributes of area with given label
/<command> updatearea id:<id> <arg>:<value> ... - update attributes of area with given ID
/<command> addline <label> - add new poly-line with given label using corner list
/<command> addline id:<id> <label> - add new poly-line with given ID using corner list
/<command> deleteline <label> - delete poly-line with given label
/<command> deleteline id:<id> <label> - delete poly-line with given ID
/<command> listlines - list details of all poly-lines
/<command> updateline <label> <arg>:<value> ... - update attributes of poly-line with given label
/<command> updateline id:<id> <arg>:<value> ... - update attributes of poly-line with given ID
/<command> addcircle <label> radius:<rad> - add new circle centered at current location with given radius and label
/<command> addcircle id:<id> <label> radius:<rad> - add new circle centered at current location with given radius and ID
/<command> addcircle <label> radius:<rad> x:<x> y:<y> z:<z> world:<world> - add new circle centered at given coordinates with given radius and label
/<command> deletecircle <label> - delete circle with given label
/<command> deletecircle id:<id> <label> - delete circle with given ID
/<command> listcircles - list details of all circles
/<command> updatecircle <label> <arg>:<value> ... - update attributes of circle with given label
/<command> updatecircle id:<id> <arg>:<value> ... - update attributes of circle with given ID
/<command> getdesc id:<id> type:<icon|area|circle|line> - get description for marker with given ID
/<command> getdesc <label> type:<icon|area|circle|line> - get description for marker with given label
/<command> resetdesc id:<id> type:<icon|area|circle|line> - clear description for marker with given ID
/<command> resetdesc <label> type:<icon|area|circle|line> - clear description for marker with given label
/<command> appenddesc id:<id> type:<icon|area|circle|line> desc:"text" - append text line to description for marker with given ID
/<command> appenddesc <label> type:<icon|area|circle|line> desc:"text" - append text line to description for marker with given label
/<command> importdesc id:<id> type:<icon|area|circle|line> file:<filename> - import description from given file for marker with given ID
/<command> importdesc <label> type:<icon|area|circle|line> file:<filename> - import description from given file for marker with given label
/<command> importlabel id:<id> type:<icon|area|circle|line> file:<filename> - import label with markup from given file for marker with given ID
/<command> importlabel <label> type:<icon|area|circle|line> file:<filename> - import label with markup from given file for marker with given label
/<command> getlabel id:<id> type:<icon|area|circle|line> - get label for marker with given ID
dmap:
description: List and modify dynmap configuration
usage: |
/<command> worldlist - list all worlds configured (enabled or disabled)
/<command> worldset worldname enabled:<true|false> - enable or disable a world
/<command> worldset worldname center:<x/y/z|here|default> - set map center for given world
/<command> worldset worldname extrazoomout:<N> - set extra zoom out levels for given world
/<command> maplist worldname - list all maps for given world
/<command> mapdelete worldname:mapname - delete given map of given world
/<command> mapadd worldname:mapname attrib:value attrib:value - create map on given world with given attributes
/<command> mapset worldname:mapname attrib:value attrib:value - update given map on given world with given attributes
/<command> worldreset worldname - reset given world to default template for world type
/<command> worldreset worldname templatename - reset given world to given template
dynmapexp:
description: Map export commands
usage: |
/<command> shader <shadername> - Export material library for shader <shadername>
permissions:
dynmap.*:
description: Gives access to all dynmap functions
children:
dynmap.render: true
dynmap.show.self: true
dynmap.show.others: true
dynmap.hide.self: true
dynmap.hide.others: true
dynmap.fullrender: true
dynmap.radiusrender: true
dynmap.updaterender: true
dynmap.cancelrender: true
dynmap.reload: true
dynmap.stats: true
dynmap.resetstats: true
dynmap.sendtoweb: true
dynmap.purgequeue: true
dynmap.purgemap: true
dynmap.purgeworld: true
dynmap.quiet: true
dynmap.ids-for-ip: true
dynmap.ips-for-id: true
dynmap.webregister: true
dynmap.webregister.other: true
dynmap.pause: true
dynmap.marker.add: true
dynmap.marker.update: true
dynmap.marker.movehere: true
dynmap.marker.delete: true
dynmap.marker.list: true
dynmap.marker.icons: true
dynmap.marker.sign: true
dynmap.marker.addset: true
dynmap.marker.updateset: true
dynmap.marker.deleteset: true
dynmap.marker.listsets: true
dynmap.marker.addicon: true
dynmap.marker.updateicon: true
dynmap.marker.deleteicon: true
dynmap.marker.addarea: true
dynmap.marker.updatearea: true
dynmap.marker.listareas: true
dynmap.marker.deletearea: true
dynmap.marker.addcircle: true
dynmap.marker.updatecircle: true
dynmap.marker.listcircles: true
dynmap.marker.deletecircle: true
dynmap.marker.getdesc: true
dynmap.marker.resetdesc: true
dynmap.marker.appenddesc: true
dynmap.marker.importdesc: true
dynmap.marker.getlabel: true
dynmap.marker.importlabel: true
dynmap.dmap.worldlist: true
dynmap.dmap.worldset: true
dynmap.dmap.worldreset: true
dynmap.dmap.mapdelete: true
dynmap.dmap.mapset: true
dynmap.dmap.mapadd: true
dynmap.dmap.perspectivelist: true
dynmap.dmap.shaderlist: true
dynmap.dmap.lightinglist: true
dynmap.playermarkers.seeall: true
dynmap.render:
description: Allows /dynmap render command
default: true
dynmap.show.self:
description: Allows /dynmap show (on self)
default: true
dynmap.show.others:
description: Allows /dynmap show <player>
default: op
dynmap.hide.self:
description: Allows /dynmap hide (on self)
default: true
dynmap.hide.others:
description: Allows /dynmap hide <player>
default: op
dynmap.fullrender:
description: Allows /dynmap fullrender or /dynmap fullrender <world>
default: op
dynmap.radiusrender:
description: Allows /dynmap radiusrender
default: op
dynmap.updaterender:
description: Allows /dynmap updaterender
default: op
dynmap.cancelrender:
description: Allows /dynmap cancelrender <world>
default: op
dynmap.reload:
description: Allows /dynmap reload
default: op
dynmap.stats:
description: Allows /dynmap stats, /dynmap stats <world>, or /dynmap triggerstats
default: true
dynmap.resetstats:
description: Allows /dynmap resetstats or /dynmap resetstats <world>
default: op
dynmap.sendtoweb:
description: Allows /dynmap sendtoweb
default: op
dynmap.purgequeue:
description: Allows /dynmap purgequeue
default: op
dynmap.purgemap:
description: Allows /dynmap purgemap
default: op
dynmap.purgeworld:
description: Allows /dynmap purgeworld
default: op
dynmap.pause:
description: Allows /dynmap pause
default: op
dynmap.quiet:
description: Allows /dynmap quiet
default: true
dynmap.ids-for-ip:
description: Allows /dynmap ids-for-ip
default: op
dynmap.ips-for-id:
description: Allows /dynmap ips-for-id
default: op
dynmap.webregister:
description: Allows /dynmap webregister
default: true
dynmap.webregister.other:
description: Allows /dynmap webregister userid
default: op
dynmap.marker.add:
description: Allows /dmarker add
default: op
dynmap.marker.update:
description: Allows /dmarker update
default: op
dynmap.marker.movehere:
description: Allows /dmarker movehere
default: op
dynmap.marker.delete:
description: Allows /dmarker delete
default: op
dynmap.marker.list:
description: Allows /dmarker list
default: true
dynmap.marker.icons:
description: Allows /dmarker icons
default: true
dynmap.marker.sign:
description: Allows creation of markers using signs
default: op
dynmap.marker.addset:
description: Allows /dmarker addset
default: op
dynmap.marker.updateset:
description: Allows /dmarker updateset
default: op
dynmap.marker.deleteset:
description: Allows /dmarker deleteset
default: op
dynmap.marker.listsets:
description: Allows /dmarker listsets
default: true
dynmap.marker.addicon:
description: Allows /dmarker addicon
default: op
dynmap.marker.updateicon:
description: Allows /dmarker updateicon
default: op
dynmap.marker.deleteicon:
description: Allows /dmarker deleteicon
default: op
dynmap.marker.addarea:
description: Allows /dmarker addarea, /dmarker addcorner, /dmarker clearcorners
default: op
dynmap.marker.updatearea:
description: Allows /dmarker updatearea
default: op
dynmap.marker.listareas:
description: Allows /dmarker listareas
default: op
dynmap.marker.deletearea:
description: Allows /dmarker deletearea
default: op
dynmap.marker.addline:
description: Allows /dmarker addline
default: op
dynmap.marker.updateline:
description: Allows /dmarker updateline
default: op
dynmap.marker.listlines:
description: Allows /dmarker listlines
default: op
dynmap.marker.deleteline:
description: Allows /dmarker deleteline
default: op
dynmap.marker.addcircle:
description: Allows /dmarker addcircle
default: op
dynmap.marker.updatecircle:
description: Allows /dmarker updatecircle
default: op
dynmap.marker.listcircles:
description: Allows /dmarker listcircles
default: op
dynmap.marker.deletecircle:
description: Allows /dmarker deletecircle
default: op
dynmap.marker.getdesc:
description: Allows /dmarker getdesc
default: op
dynmap.marker.resetdesc:
description: Allows /dmarker resetdesc
default: op
dynmap.marker.appenddesc:
description: Allows /dmarker appenddesc
default: op
dynmap.marker.importdesc:
description: Allows /dmarker importdesc
default: op
dynmap.marker.getlabel:
description: Allows /dmarker getlabel
default: op
dynmap.marker.importlabel:
description: Allows /dmarker importlabel
default: op
dynmap.dmap.worldlist:
description: Allows /dmap worldlist
default: op
dynmap.dmap.worldset:
description: Allows /dmap worldset
default: op
dynmap.dmap.worldreset:
description: Allows /dmap worldreset
default: op
dynmap.dmap.mapdelete:
description: Allows /dmap mapdelete
default: op
dynmap.dmap.mapset:
description: Allows /dmap mapset
default: op
dynmap.dmap.mapadd:
description: Allows /dmap mapadd
default: op
dynmap.dmap.perspectivelist:
description: Allows /dmap perspectivelist
default: op
dynmap.dmap.shaderlist:
description: Allows /dmap shaderlist
default: op
dynmap.dmap.lightinglist:
description: Allows /dmap lightinglist
default: op
dynmap.webchat:
description: Allows web chat (if login required for webchat)
default: true
dynmap.playermarkers.seeall:
description: Allow all players to be seen by user on web UI
default: op