mirror of
https://github.com/encounter/dynmap.git
synced 2026-03-30 11:08:39 -07:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d154f23bab | |||
| 0b38a4cec8 | |||
| 02aedc9478 | |||
| 3702e07210 | |||
| 6afb0d9b92 | |||
| 1d6cedeeb0 | |||
| a3528e9937 | |||
| bae2a48a83 | |||
| 11b2123f14 | |||
| f93f37deea | |||
| cf5e2e00e6 | |||
| 121c1050ce | |||
| 4f6dd1d778 | |||
| 3ed44ee905 | |||
| 8f9d2c01c2 | |||
| faa1948225 | |||
| 67e0bd2f2c | |||
| 4fc8a53eb0 | |||
| 1c1937c80c | |||
| f24dfd6c3e | |||
| 86b87e78e3 | |||
| 34fe8316c3 | |||
| 387844b9dc | |||
| a493f85bcf | |||
| 1ab7a8ddbf | |||
| bdb2620ca9 | |||
| d8812ce575 | |||
| 6c618fa727 | |||
| a9214502cf | |||
| ef0ad40496 | |||
| 2628559b55 | |||
| 11021720c7 | |||
| de4fdb2b0c | |||
| ecdb50920e | |||
| 50f7382b7a | |||
| 56875a05d4 | |||
| f392eb1344 | |||
| a41e052f51 | |||
| 0e97fedd6b | |||
| 9d97f86b7f | |||
| 516125e87b | |||
| e52234336e | |||
| af10e942a9 | |||
| 1e52061b27 | |||
| b0ca796213 | |||
| cac8527d76 | |||
| 35cf3ed8fa | |||
| 888051d497 | |||
| 559bc0ef55 | |||
| b85bd1dce7 | |||
| 87bbd3023e | |||
| fa80af8e81 | |||
| 0c9057949d | |||
| f95a832cae | |||
| 2e2fbec8f9 | |||
| 63a638f96e | |||
| bcf679b078 | |||
| 5ad4ba285b | |||
| 71185b06d6 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap</artifactId>
|
||||
<version>0.32</version>
|
||||
<version>0.36.3</version>
|
||||
<name>dynmap</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -133,7 +133,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>[1.1-R1-SNAPSHOT,)</version>
|
||||
<version>[1.1-R5-SNAPSHOT,1.7)</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -144,21 +144,6 @@
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>8.0.1.v20110908</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>8.0.1.v20110908</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dynmap</groupId>
|
||||
@@ -173,5 +158,26 @@
|
||||
<version>dev-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.tehkode</groupId>
|
||||
<artifactId>PermissionsEx</artifactId>
|
||||
<version>1.19.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/PermissionsEx.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.bananaco</groupId>
|
||||
<artifactId>bPermissions</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/bpermissions.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.platymuus.bukkit.permissions</groupId>
|
||||
<artifactId>PermissionsBukkit</artifactId>
|
||||
<version>1.6</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/PermissionsBukkit.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
package org.dynmap.bukkit;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.dynmap.Log;
|
||||
|
||||
/**
|
||||
* Wrapper for accessing raw light levels for given block
|
||||
*/
|
||||
public class BlockLightLevel {
|
||||
private Method gethandle;
|
||||
private Method getrawlight;
|
||||
private Object enum_sky;
|
||||
private Object enum_block;
|
||||
private boolean ready;
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public BlockLightLevel() {
|
||||
/* Get CraftChunk.getChunkSnapshot(boolean,boolean,boolean) and CraftChunk.getHandle() */
|
||||
try {
|
||||
Class c = Class.forName("org.bukkit.craftbukkit.CraftChunk");
|
||||
gethandle = c.getDeclaredMethod("getHandle", new Class[0]);
|
||||
Class enumskyblock = Class.forName("net.minecraft.server.EnumSkyBlock");
|
||||
Object[] enumvals = enumskyblock.getEnumConstants();
|
||||
for(int i = 0; i < enumvals.length; i++) {
|
||||
String ev = enumvals[i].toString();
|
||||
if(ev.equals("Sky")) {
|
||||
enum_sky = enumvals[i];
|
||||
}
|
||||
else if(ev.equals("Block")) {
|
||||
enum_block = enumvals[i];
|
||||
}
|
||||
}
|
||||
Class cc = Class.forName("net.minecraft.server.Chunk");
|
||||
getrawlight = cc.getDeclaredMethod("a", new Class[] { enumskyblock, int.class, int.class, int.class });
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
if((gethandle != null) && (enum_sky != null) && (enum_block != null) && (getrawlight != null)) {
|
||||
ready = true;
|
||||
}
|
||||
else {
|
||||
Log.warning("Block raw light level API not available");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isReady() {
|
||||
return ready;
|
||||
}
|
||||
|
||||
public int getSkyLightLevel(Block b) {
|
||||
try {
|
||||
Object hand = gethandle.invoke(b.getChunk());
|
||||
if(hand != null) {
|
||||
Integer v = (Integer)getrawlight.invoke(hand, enum_sky, b.getX() & 0xF, b.getY() & 0x7F, b.getZ() & 0xF);
|
||||
return v;
|
||||
}
|
||||
} catch (InvocationTargetException itx) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (IllegalAccessException e) {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int getBlockLightLevel(Block b) {
|
||||
try {
|
||||
Object hand = gethandle.invoke(b.getChunk());
|
||||
if(hand != null) {
|
||||
Integer v = (Integer)getrawlight.invoke(hand, enum_block, b.getX() & 0xF, b.getY() & 0x7F, b.getZ() & 0xF);
|
||||
return v;
|
||||
}
|
||||
} catch (InvocationTargetException itx) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (IllegalAccessException e) {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,9 @@ import org.dynmap.utils.MapChunkCache;
|
||||
|
||||
public class BukkitWorld extends DynmapWorld {
|
||||
private World world;
|
||||
private static BlockLightLevel bll = new BlockLightLevel();
|
||||
|
||||
public BukkitWorld(World w) {
|
||||
super(w.getName(), w.getMaxHeight());
|
||||
super(w.getName(), w.getMaxHeight(), w.getSeaLevel());
|
||||
|
||||
world = w;
|
||||
}
|
||||
@@ -31,7 +30,7 @@ public class BukkitWorld extends DynmapWorld {
|
||||
DynmapLocation dloc = new DynmapLocation();
|
||||
Location sloc = world.getSpawnLocation();
|
||||
dloc.x = sloc.getBlockX(); dloc.y = sloc.getBlockY();
|
||||
dloc.z = sloc.getBlockZ(); dloc.world = sloc.getWorld().getName();
|
||||
dloc.z = sloc.getBlockZ(); dloc.world = normalizeWorldName(sloc.getWorld().getName());
|
||||
return dloc;
|
||||
}
|
||||
/* Get world time */
|
||||
@@ -67,12 +66,12 @@ public class BukkitWorld extends DynmapWorld {
|
||||
/* Test if sky light level is requestable */
|
||||
@Override
|
||||
public boolean canGetSkyLightLevel() {
|
||||
return bll.isReady();
|
||||
return true;
|
||||
}
|
||||
/* Return sky light level */
|
||||
@Override
|
||||
public int getSkyLightLevel(int x, int y, int z) {
|
||||
return bll.getSkyLightLevel(world.getBlockAt(x, y, z));
|
||||
return world.getBlockAt(x, y, z).getLightFromSky();
|
||||
}
|
||||
/**
|
||||
* Get world environment ID (lower case - normal, the_end, nether)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.dynmap.Log;
|
||||
import org.getspout.spoutapi.block.design.BlockDesign;
|
||||
import org.getspout.spoutapi.block.design.GenericBlockDesign;
|
||||
@@ -73,6 +74,7 @@ public class SpoutPluginBlocks {
|
||||
for(CustomBlock b : cb) {
|
||||
BlockDesign bd = b.getBlockDesign();
|
||||
String blkid = bd.getTexturePlugin() + "." + b.getName();
|
||||
blkid = blkid.replace(' ', '_');
|
||||
/* If not GenericCubiodBlockDesign, we don't handle it */
|
||||
if((bd instanceof GenericCuboidBlockDesign) == false) {
|
||||
Log.info("Block " + blkid + " not suppored - only cubiod blocks");
|
||||
@@ -166,7 +168,7 @@ public class SpoutPluginBlocks {
|
||||
blks.add(b);
|
||||
|
||||
sb.append("block:id=" + b.getCustomId() + ",data=*,bottom=" + txtidx[0] + ",west=" +txtidx[1] + ",south=" + txtidx[2] + ",east=" + txtidx[3] + ",north="+txtidx[4]+",top="+txtidx[5]);
|
||||
if(b.isOpaque() == false)
|
||||
if(b.getBlockId() == Material.GLASS.getId())
|
||||
sb.append(",transparency=TRANSPARENT");
|
||||
sb.append(",txtid=" + txfileid + "\n");
|
||||
cnt++;
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
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 {
|
||||
String name;
|
||||
protected String name;
|
||||
protected Map<String, Boolean> pd;
|
||||
|
||||
public static BukkitPermissions create(String name) {
|
||||
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");
|
||||
return new BukkitPermissions(name);
|
||||
Log.info("Web interface permissions only available for online users");
|
||||
return new BukkitPermissions(name, pd);
|
||||
}
|
||||
|
||||
public BukkitPermissions(String name) {
|
||||
public BukkitPermissions(String name, Map<String, Boolean> pd) {
|
||||
this.name = name;
|
||||
this.pd = pd;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -28,4 +37,33 @@ public class BukkitPermissions implements PermissionProvider {
|
||||
? player.hasPermission(name + "." + permission) || player.hasPermission(name + ".*")
|
||||
: true;
|
||||
}
|
||||
@Override
|
||||
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
||||
Player p = Bukkit.getPlayerExact(name);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
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;
|
||||
@@ -13,6 +17,7 @@ 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");
|
||||
@@ -20,6 +25,9 @@ public class NijikokunPermissions implements PermissionProvider {
|
||||
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);
|
||||
}
|
||||
@@ -27,6 +35,7 @@ public class NijikokunPermissions implements PermissionProvider {
|
||||
public NijikokunPermissions(Plugin permissionsPlugin, String name) {
|
||||
this.name = name;
|
||||
plugin = permissionsPlugin;
|
||||
defworld = Bukkit.getServer().getWorlds().get(0).getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,4 +47,25 @@ public class NijikokunPermissions implements PermissionProvider {
|
||||
? 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.dynmap.bukkit.permissions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -24,4 +25,12 @@ public class OpPermissions implements PermissionProvider {
|
||||
: true
|
||||
: true;
|
||||
}
|
||||
@Override
|
||||
public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public boolean hasOfflinePermission(String player, String perm) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.dynmap.bukkit.permissions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
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 com.nijiko.permissions.PermissionHandler;
|
||||
import com.platymuus.bukkit.permissions.PermissionInfo;
|
||||
import com.platymuus.bukkit.permissions.PermissionsPlugin;
|
||||
|
||||
import de.bananaco.bpermissions.api.ApiLayer;
|
||||
import de.bananaco.bpermissions.api.util.CalculableType;
|
||||
import de.bananaco.bpermissions.api.util.Permission;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +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);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package org.dynmap.bukkit.permissions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
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.permissions.PermissionDefault;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.dynmap.Log;
|
||||
|
||||
import ru.tehkode.permissions.bukkit.PermissionsEx;
|
||||
|
||||
import de.bananaco.bpermissions.api.ApiLayer;
|
||||
import de.bananaco.bpermissions.api.User;
|
||||
import de.bananaco.bpermissions.api.WorldManager;
|
||||
import de.bananaco.bpermissions.api.util.CalculableType;
|
||||
import de.bananaco.bpermissions.api.util.Permission;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,305 +0,0 @@
|
||||
package org.dynmap.herochat;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.event.CustomEventListener;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.event.server.ServerListener;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.dynmap.Client;
|
||||
import org.dynmap.ConfigurationNode;
|
||||
import org.dynmap.DynmapCore;
|
||||
import org.dynmap.Log;
|
||||
import org.dynmap.bukkit.DynmapPlugin;
|
||||
|
||||
/**
|
||||
* Bukkit specific module - alternate chat handler for interfacing with HeroChat
|
||||
*/
|
||||
public class HeroChatHandler {
|
||||
private static final String DEF_CHANNEL = "Global";
|
||||
private static final List<String> DEF_CHANNELS = Collections
|
||||
.singletonList(DEF_CHANNEL);
|
||||
|
||||
private List<String> hcchannels;
|
||||
private String hcwebinputchannel;
|
||||
private DynmapCore core;
|
||||
private HeroChatChannel hcwebinputchan;
|
||||
|
||||
private class OurPluginListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPluginEnable(PluginEnableEvent event) {
|
||||
Plugin plugin = event.getPlugin();
|
||||
String name = plugin.getDescription().getName();
|
||||
|
||||
if (name.equals("HeroChat")) {
|
||||
activateHeroChat(plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reflection-based access wrapper for ChannelChatEvent from HeroChat */
|
||||
private static class HeroChatChannelChatEvent {
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static Class channelchatevent;
|
||||
private static Method getsource;
|
||||
private static Method getmessage;
|
||||
private static Method issentbyplayer;
|
||||
private static boolean isgood = false;
|
||||
private Event evt;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static boolean initialize() {
|
||||
try {
|
||||
channelchatevent = Class
|
||||
.forName("com.herocraftonline.dthielke.herochat.event.ChannelChatEvent");
|
||||
getsource = channelchatevent.getMethod("getSource", new Class[0]);
|
||||
getmessage = channelchatevent.getMethod("getMessage", new Class[0]);
|
||||
issentbyplayer = channelchatevent.getMethod("isSentByPlayer", new Class[0]);
|
||||
isgood = true;
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
return isgood;
|
||||
}
|
||||
|
||||
public HeroChatChannelChatEvent(Event evt) {
|
||||
this.evt = evt;
|
||||
}
|
||||
|
||||
public static boolean isInstance(Event evt) {
|
||||
return channelchatevent.isInstance(evt);
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
try {
|
||||
return (String) getsource.invoke(evt);
|
||||
} catch (Exception x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
try {
|
||||
return (String) getmessage.invoke(evt);
|
||||
} catch (Exception x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSentByPlayer() {
|
||||
try {
|
||||
return (Boolean) issentbyplayer.invoke(evt);
|
||||
} catch (Exception x) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reflection-based access wrapper for ChannelEvent from HeroChat */
|
||||
private static class HeroChatChannelEvent {
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static Class channelevent;
|
||||
private static Method getchannel;
|
||||
private static Method iscancelled;
|
||||
private static boolean isgood = false;
|
||||
private Event evt;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static boolean initialize() {
|
||||
try {
|
||||
channelevent = Class
|
||||
.forName("com.herocraftonline.dthielke.herochat.event.ChannelEvent");
|
||||
getchannel = channelevent.getMethod("getChannel", new Class[0]);
|
||||
iscancelled = channelevent.getMethod("isCancelled", new Class[0]);
|
||||
isgood = true;
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
}
|
||||
return isgood;
|
||||
}
|
||||
|
||||
public HeroChatChannelEvent(Event evt) {
|
||||
this.evt = evt;
|
||||
}
|
||||
|
||||
public static boolean isInstance(Event evt) {
|
||||
return channelevent.isInstance(evt);
|
||||
}
|
||||
|
||||
public HeroChatChannel getChannel() {
|
||||
try {
|
||||
Object o;
|
||||
o = getchannel.invoke(evt);
|
||||
if (o != null) {
|
||||
return new HeroChatChannel(o);
|
||||
}
|
||||
} catch (Exception x) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
try {
|
||||
return (Boolean) iscancelled.invoke(evt);
|
||||
} catch (Exception x) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reflection-based access wrapper for Channel from HeroChat */
|
||||
private static class HeroChatChannel {
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static Class channel;
|
||||
private static Method getname;
|
||||
private static Method getnick;
|
||||
private static Method sendmessage;
|
||||
private static boolean isgood = false;
|
||||
private Object chan;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static boolean initialize() {
|
||||
try {
|
||||
channel = Class
|
||||
.forName("com.herocraftonline.dthielke.herochat.channels.Channel");
|
||||
getname = channel.getMethod("getName");
|
||||
getnick = channel.getMethod("getNick", new Class[0]);
|
||||
sendmessage = channel.getMethod("sendMessage", new Class[] {
|
||||
String.class, String.class, String.class, boolean.class } );
|
||||
isgood = true;
|
||||
} catch (ClassNotFoundException cnfx) {
|
||||
} catch (NoSuchMethodException nsmx) {
|
||||
Log.severe(nsmx);
|
||||
}
|
||||
return isgood;
|
||||
}
|
||||
|
||||
public HeroChatChannel(Object chan) {
|
||||
this.chan = chan;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
try {
|
||||
return (String) getname.invoke(chan);
|
||||
} catch (Exception x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
try {
|
||||
return (String) getnick.invoke(chan);
|
||||
} catch (Exception x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void sendMessage(String source, String msg, String format, boolean sentByPlayer) {
|
||||
try {
|
||||
sendmessage.invoke(chan, source, msg, format, sentByPlayer);
|
||||
} catch (Exception x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class OurEventListener extends CustomEventListener {
|
||||
/**
|
||||
* Handle custom events
|
||||
*/
|
||||
@EventHandler
|
||||
public void onCustomEvent(Event event) {
|
||||
if (HeroChatChannelEvent.isInstance(event)) {
|
||||
HeroChatChannelEvent ce = new HeroChatChannelEvent(event);
|
||||
/* Snoop for our web channel - we'll need it, and we'll see it before it matters,
|
||||
* since anyone that joins the channel will give us an event (and reflection on
|
||||
* the plugin class to get the manager didn't work, due to a dependency on the IRC
|
||||
* plugin that may not be present....)
|
||||
*/
|
||||
HeroChatChannel c = ce.getChannel();
|
||||
if (ce.isCancelled())
|
||||
return;
|
||||
if((hcwebinputchannel != null) && ((hcwebinputchannel.equals(c.getName())) ||
|
||||
(hcwebinputchannel.equals(c.getNick())))) {
|
||||
hcwebinputchan = c;
|
||||
}
|
||||
if (HeroChatChannelChatEvent.isInstance(event)) {
|
||||
HeroChatChannelChatEvent cce = new HeroChatChannelChatEvent(
|
||||
event);
|
||||
/* Match on name or nickname of channel */
|
||||
if (hcchannels.contains(c.getName()) ||
|
||||
hcchannels.contains(c.getNick())) {
|
||||
if(cce.isSentByPlayer()) { /* Player message? */
|
||||
org.bukkit.entity.Player p = DynmapPlugin.plugin.getServer().getPlayer(cce.getSource());
|
||||
if((p != null) && (core.mapManager != null)) {
|
||||
core.mapManager.pushUpdate(new Client.ChatMessage("player",
|
||||
c.getNick(),
|
||||
p.getDisplayName(),
|
||||
cce.getMessage(),
|
||||
p.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HeroChatHandler(ConfigurationNode cfg, DynmapCore core) {
|
||||
/* If we're enabling hero chat support */
|
||||
Log.verboseinfo("HeroChat support configured");
|
||||
this.core = core;
|
||||
/* Now, get the monitored channel list */
|
||||
hcchannels = cfg.getStrings("herochatchannels", DEF_CHANNELS);
|
||||
/* And get channel to send web messages */
|
||||
hcwebinputchannel = cfg.getString("herochatwebchannel", DEF_CHANNEL);
|
||||
Plugin hc = DynmapPlugin.plugin.getServer().getPluginManager().getPlugin("HeroChat");
|
||||
if(hc != null) {
|
||||
activateHeroChat(hc);
|
||||
}
|
||||
else {
|
||||
/* Set up to hear when HeroChat is enabled */
|
||||
DynmapPlugin.plugin.pm.registerEvents(new OurPluginListener(), DynmapPlugin.plugin);
|
||||
}
|
||||
}
|
||||
|
||||
private void activateHeroChat(Plugin herochat) {
|
||||
if (HeroChatChannelChatEvent.initialize() == false) {
|
||||
Log.severe("Cannot load HeroChat chat event class!");
|
||||
return;
|
||||
}
|
||||
if (HeroChatChannel.initialize() == false) {
|
||||
Log.severe("Cannot load HeroChat channel class!");
|
||||
return;
|
||||
}
|
||||
if (HeroChatChannelEvent.initialize() == false) {
|
||||
Log.severe("Cannot load HeroChat channel event class!");
|
||||
return;
|
||||
}
|
||||
/* Register event handler */
|
||||
DynmapPlugin.plugin.pm.registerEvent(Event.Type.CUSTOM_EVENT, new OurEventListener(), Event.Priority.Monitor, DynmapPlugin.plugin);
|
||||
|
||||
Log.verboseinfo("HeroChat integration active");
|
||||
}
|
||||
/**
|
||||
* Send message from web to appropriate HeroChat channel
|
||||
* @param sender - sender ID
|
||||
* @param message - message
|
||||
* @return true if herochat is handling this, false if not
|
||||
*/
|
||||
public boolean sendWebMessageToHeroChat(String sender, String message) {
|
||||
if(hcwebinputchannel != null) { /* Are we handling them? */
|
||||
if(hcwebinputchan != null) { /* Have we seen it yet? Maybe no if nobody has logged on or
|
||||
* joined it, but then who would see it anyway?
|
||||
*/
|
||||
hcwebinputchan.sendMessage(sender, message, "{default}", false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package org.dynmap.herochat;
|
||||
|
||||
import static org.dynmap.JSONUtils.s;
|
||||
|
||||
import org.dynmap.ChatEvent;
|
||||
import org.dynmap.Client;
|
||||
import org.dynmap.Component;
|
||||
import org.dynmap.ConfigurationNode;
|
||||
import org.dynmap.DynmapCore;
|
||||
import org.dynmap.Event;
|
||||
import org.dynmap.common.DynmapListenerManager;
|
||||
import org.dynmap.common.DynmapListenerManager.EventType;
|
||||
import org.dynmap.common.DynmapPlayer;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class HeroWebChatComponent extends Component {
|
||||
HeroChatHandler handler;
|
||||
public HeroWebChatComponent(final DynmapCore plugin, ConfigurationNode configuration) {
|
||||
super(plugin, configuration);
|
||||
handler = new HeroChatHandler(configuration, plugin);
|
||||
plugin.events.addListener("webchat", new Event.Listener<ChatEvent>() {
|
||||
@Override
|
||||
public void triggered(ChatEvent t) {
|
||||
if(plugin.getServer().sendWebChatEvent(t.source, t.name, t.message)) {
|
||||
/* Let HeroChat take a look - only broadcast to players if it doesn't handle it */
|
||||
if (!handler.sendWebMessageToHeroChat(t.name, t.message)) {
|
||||
String msg;
|
||||
String msgfmt = plugin.configuration.getString("webmsgformat", null);
|
||||
if(msgfmt != null) {
|
||||
msgfmt = unescapeString(msgfmt);
|
||||
msg = msgfmt.replace("%playername%", t.name).replace("%message%", t.message);
|
||||
}
|
||||
else {
|
||||
msg = unescapeString(plugin.configuration.getString("webprefix", "\u00A72[WEB] ")) + t.name + ": " + unescapeString(plugin.configuration.getString("websuffix", "\u00A7f")) + t.message;
|
||||
}
|
||||
plugin.getServer().broadcastMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
plugin.events.addListener("buildclientconfiguration", new Event.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void triggered(JSONObject t) {
|
||||
s(t, "allowchat", true);
|
||||
}
|
||||
});
|
||||
|
||||
// Also make HeroChat announce joins and quits.
|
||||
core.listenerManager.addListener(EventType.PLAYER_JOIN, new DynmapListenerManager.PlayerEventListener() {
|
||||
@Override
|
||||
public void playerEvent(DynmapPlayer p) {
|
||||
if((core.mapManager != null) && (core.playerList != null) && (core.playerList.isVisiblePlayer(p.getName()))) {
|
||||
core.mapManager.pushUpdate(new Client.PlayerJoinMessage(p.getDisplayName(), p.getName()));
|
||||
}
|
||||
}
|
||||
});
|
||||
core.listenerManager.addListener(EventType.PLAYER_QUIT, new DynmapListenerManager.PlayerEventListener() {
|
||||
@Override
|
||||
public void playerEvent(DynmapPlayer p) {
|
||||
if((core.mapManager != null) && (core.playerList != null) && (core.playerList.isVisiblePlayer(p.getName()))) {
|
||||
core.mapManager.pushUpdate(new Client.PlayerQuitMessage(p.getDisplayName(), p.getName()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,12 @@ components:
|
||||
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)
|
||||
@@ -48,19 +54,17 @@ components:
|
||||
# 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
|
||||
|
||||
- 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
|
||||
#- class: org.dynmap.herochat.HeroWebChatComponent
|
||||
# # Control which HeroChat channel messages from web are directed to
|
||||
# herochatwebchannel: Global
|
||||
# # Control which channels are monitored and reported to the web
|
||||
# herochatchannels:
|
||||
# - Global
|
||||
# #- Trade
|
||||
# #- Haggle
|
||||
|
||||
# Note: this component is needed for the dmarker commands, and for the Marker API to be available to other plugins
|
||||
- class: org.dynmap.MarkersComponent
|
||||
@@ -98,6 +102,10 @@ components:
|
||||
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
|
||||
@@ -173,32 +181,23 @@ zoomoutperiod: 30
|
||||
# Tile hashing is used to minimize tile file updates when no changes have occurred - set to false to disable
|
||||
enabletilehash: true
|
||||
|
||||
# Optional - control darkening of biome-shaded colors in swamp biomes (1.9+) - default is true for 1.9+, false for 1.8.x
|
||||
#swampshaded: false
|
||||
# Optional - control biome shading of water (1.9+) - default is true for 1.9+, false for 1.8.x
|
||||
#waterbiomeshaded: false
|
||||
|
||||
# Optional - hide ores: render as normal stone (so that they aren't revealed by maps)
|
||||
#hideores: true
|
||||
|
||||
# Optional - control rendering of fences (joining to blocks, as in 1.9+) - default is true for 1.9+, false for 1.8.x
|
||||
#fence-to-block-join: 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: false
|
||||
|
||||
# Pre 0.29 render options - set all three to false if you want same results as 0.28 (i.e. you have existing maps and don't want to render)
|
||||
# use-generated-textures: if true, use generated textures (same as client); false is static, pre 0.29 textures
|
||||
# correct-water-lighting: if true, use corrected water lighting (same as client); false is legacy, pre 0.29 water (darker)
|
||||
# correct-biome-shading: if true, use fixed color mappings for birch, pine, lily, and proper water shading (same as client); false is pre 0.29
|
||||
# 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)
|
||||
use-generated-textures: true
|
||||
correct-water-lighting: true
|
||||
correct-biome-shading: true
|
||||
# To enable smooth biome shading (as done in MC 1.1.0+), set this to true (this does increase render processing about 10%)
|
||||
smooth-biome-shading: true
|
||||
|
||||
# Control loading of player faces (if set to false, skins are never fetched)
|
||||
#fetchskins: false
|
||||
@@ -206,8 +205,8 @@ smooth-biome-shading: true
|
||||
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
|
||||
#refreshskins: false
|
||||
|
||||
# Control behavior for new (1.9+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)
|
||||
# default is 'pre19' for 1.8 server (existing orientation), 'newrose' for 1.9+ (preserve maps, rotate rose)
|
||||
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)
|
||||
# default is 'newrose' (preserve pre-1.0 maps, rotate rose)
|
||||
# 'newnorth' is used to rotate maps and rose (requires fullrender of any HDMap map - same as 'newrose' for FlatMap or KzedMap)
|
||||
compass-mode: newnorth
|
||||
|
||||
@@ -232,6 +231,9 @@ compass-mode: newnorth
|
||||
# Enable Kaevator's Superslopes block rendering support
|
||||
#superslopes-support: true
|
||||
|
||||
# Enabled ComputerCraft block rendering support
|
||||
#computercraft-support: true
|
||||
|
||||
render-triggers:
|
||||
#- playermove
|
||||
#- playerjoin
|
||||
@@ -248,6 +250,7 @@ render-triggers:
|
||||
- blockfromto
|
||||
- blockphysics
|
||||
- structuregrow
|
||||
- blockgrow
|
||||
|
||||
# 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"
|
||||
@@ -273,6 +276,11 @@ 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
|
||||
|
||||
@@ -336,6 +344,8 @@ persist-ids-by-ip: true
|
||||
msg:
|
||||
maptypes: "Map Types"
|
||||
players: "Players"
|
||||
chatrequireslogin: "Chat Requires Login"
|
||||
chatnotallowed: "You are not permitted to send chat messages"
|
||||
|
||||
# Set to true to enable verbose startup messages - can help with debugging map configuration problems
|
||||
# Set to false for a much quieter startup log
|
||||
|
||||
@@ -21,15 +21,12 @@ commands:
|
||||
/<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 - Render updates starting at location x,z on world 'worldname' for all maps
|
||||
/<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> stats world - Show render statistics for maps on world 'world'.
|
||||
/<command> triggerstats - Show render trigger statistics
|
||||
/<command> resetstats - Reset render statistics.
|
||||
/<command> resetstats world - Reset render statistics for maps on world 'world'.
|
||||
/<command> sendtoweb msg - Send message to web users
|
||||
/<command> purgequeue - Set tile update queue to empty
|
||||
/<command> pause - Show render pause state
|
||||
@@ -38,7 +35,8 @@ commands:
|
||||
/<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: |
|
||||
@@ -80,6 +78,15 @@ commands:
|
||||
/<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
|
||||
|
||||
dmap:
|
||||
description: List and modify dynmap configuration
|
||||
usage: |
|
||||
@@ -114,6 +121,8 @@ permissions:
|
||||
dynmap.purgequeue: 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
|
||||
@@ -133,6 +142,10 @@ permissions:
|
||||
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.dmap.worldlist: true
|
||||
dynmap.dmap.worldset: true
|
||||
dynmap.dmap.worldreset: true
|
||||
@@ -193,6 +206,12 @@ permissions:
|
||||
dynmap.ips-for-id:
|
||||
description: Allows /dynmap ips-for-id
|
||||
default: op
|
||||
dynmap.webregister:
|
||||
description: Allows /dynmap webregister
|
||||
default: true
|
||||
dynmao,webregister.other:
|
||||
description: Allows /dynmap webregister userid
|
||||
default: op
|
||||
dynmap.marker.add:
|
||||
description: Allows /dmarker add
|
||||
default: op
|
||||
@@ -259,6 +278,18 @@ permissions:
|
||||
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.dmap.worldlist:
|
||||
description: Allows /dmap worldlist
|
||||
default: op
|
||||
@@ -286,4 +317,6 @@ permissions:
|
||||
dynmap.dmap.lightinglist:
|
||||
description: Allows /dmap lightinglist
|
||||
default: op
|
||||
|
||||
dynmap.webchat:
|
||||
description: Allows web chat (if login required for webchat)
|
||||
default: true
|
||||
|
||||
Reference in New Issue
Block a user