mirror of
https://github.com/encounter/dynmap.git
synced 2026-03-30 11:08:39 -07:00
Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2401eff676 | |||
| b5700bd462 | |||
| 5d9677b350 | |||
| cf77737f85 | |||
| 8a03a29f0a | |||
| 8031110a59 | |||
| cf0c60d877 | |||
| 0a4761f525 | |||
| ab46d250b1 | |||
| df8013489d | |||
| 133d3078d7 | |||
| 2a056033b8 | |||
| a5428b56f1 | |||
| ff79c2f4fc | |||
| 18462b5caf | |||
| ebfa3eaec1 | |||
| 96673f0fb3 | |||
| fc451fd002 | |||
| 2f1b1789fd | |||
| 01b054e972 | |||
| 5d35205cae | |||
| 58c7d6378c | |||
| d95213e7dd | |||
| 4f5063155e | |||
| 2d4e233005 | |||
| afc0d9bd6b | |||
| 267b423ff1 | |||
| d523ce8a41 | |||
| ee7e6eedc8 | |||
| 4d6d156e9c | |||
| 177310a949 | |||
| 0707953718 | |||
| 8546b2205e | |||
| 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 |
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
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.34</version>
|
||||
<version>0.60</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-R5-SNAPSHOT,1.7)</version>
|
||||
<version>[1.2.5-R4.0,1.7)</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -158,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>
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
<includes>
|
||||
<include>version.js</include></includes>
|
||||
<filtered>true</filtered></fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/dynmap</outputDirectory>
|
||||
<includes>
|
||||
<include>LICENSE</include></includes></fileSet>
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
import org.dynmap.DynmapChunk;
|
||||
import org.dynmap.DynmapLocation;
|
||||
import org.dynmap.DynmapWorld;
|
||||
@@ -13,16 +15,20 @@ import org.dynmap.utils.MapChunkCache;
|
||||
|
||||
public class BukkitWorld extends DynmapWorld {
|
||||
private World world;
|
||||
private World.Environment env;
|
||||
private boolean skylight;
|
||||
|
||||
public BukkitWorld(World w) {
|
||||
super(normalizeWorldName(w.getName()), w.getMaxHeight(), w.getSeaLevel());
|
||||
|
||||
super(w.getName(), w.getMaxHeight(), w.getSeaLevel());
|
||||
world = w;
|
||||
env = world.getEnvironment();
|
||||
skylight = (env == World.Environment.NORMAL);
|
||||
new Permission("dynmap.world." + getName(), "Dynmap access for world " + getName(), PermissionDefault.OP);
|
||||
}
|
||||
/* Test if world is nether */
|
||||
@Override
|
||||
public boolean isNether() {
|
||||
return world.getEnvironment() == World.Environment.NETHER;
|
||||
return env == World.Environment.NETHER;
|
||||
}
|
||||
/* Get world spawn location */
|
||||
@Override
|
||||
@@ -66,7 +72,7 @@ public class BukkitWorld extends DynmapWorld {
|
||||
/* Test if sky light level is requestable */
|
||||
@Override
|
||||
public boolean canGetSkyLightLevel() {
|
||||
return true;
|
||||
return skylight;
|
||||
}
|
||||
/* Return sky light level */
|
||||
@Override
|
||||
@@ -78,7 +84,7 @@ public class BukkitWorld extends DynmapWorld {
|
||||
*/
|
||||
@Override
|
||||
public String getEnvironment() {
|
||||
return world.getEnvironment().name().toLowerCase();
|
||||
return env.name().toLowerCase();
|
||||
}
|
||||
/**
|
||||
* Get map chunk cache for world
|
||||
@@ -93,8 +99,4 @@ public class BukkitWorld extends DynmapWorld {
|
||||
public World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
public static String normalizeWorldName(String n) {
|
||||
return n.replace('/', '-');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ package org.dynmap.bukkit;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.Future;
|
||||
@@ -34,6 +36,7 @@ import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.BlockRedstoneEvent;
|
||||
import org.bukkit.event.block.BlockSpreadEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
import org.bukkit.event.block.SignChangeEvent;
|
||||
@@ -48,11 +51,14 @@ import org.bukkit.event.world.SpawnChangeEvent;
|
||||
import org.bukkit.event.world.StructureGrowEvent;
|
||||
import org.bukkit.event.world.WorldLoadEvent;
|
||||
import org.bukkit.event.world.WorldUnloadEvent;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.dynmap.DynmapAPI;
|
||||
import org.dynmap.DynmapChunk;
|
||||
import org.dynmap.DynmapCore;
|
||||
import org.dynmap.DynmapLocation;
|
||||
import org.dynmap.DynmapWebChatEvent;
|
||||
@@ -63,13 +69,17 @@ import org.dynmap.PlayerList;
|
||||
import org.dynmap.bukkit.permissions.BukkitPermissions;
|
||||
import org.dynmap.bukkit.permissions.NijikokunPermissions;
|
||||
import org.dynmap.bukkit.permissions.OpPermissions;
|
||||
import org.dynmap.bukkit.permissions.PEXPermissions;
|
||||
import org.dynmap.bukkit.permissions.PermBukkitPermissions;
|
||||
import org.dynmap.bukkit.permissions.PermissionProvider;
|
||||
import org.dynmap.bukkit.permissions.bPermPermissions;
|
||||
import org.dynmap.common.BiomeMap;
|
||||
import org.dynmap.common.DynmapCommandSender;
|
||||
import org.dynmap.common.DynmapPlayer;
|
||||
import org.dynmap.common.DynmapServerInterface;
|
||||
import org.dynmap.common.DynmapListenerManager.EventType;
|
||||
import org.dynmap.markers.MarkerAPI;
|
||||
import org.dynmap.utils.MapChunkCache;
|
||||
|
||||
public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
private DynmapCore core;
|
||||
@@ -100,6 +110,11 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
* Server access abstraction class
|
||||
*/
|
||||
public class BukkitServer implements DynmapServerInterface {
|
||||
/* Chunk load handling */
|
||||
private Object loadlock = new Object();
|
||||
private int chunks_in_cur_tick = 0;
|
||||
private long cur_tick;
|
||||
|
||||
@Override
|
||||
public void scheduleServerTask(Runnable run, long delay) {
|
||||
getServer().getScheduler().scheduleSyncDelayedTask(DynmapPlugin.this, run, delay);
|
||||
@@ -161,7 +176,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
break;
|
||||
case WORLD_SPAWN_CHANGE:
|
||||
pm.registerEvents(new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onSpawnChange(SpawnChangeEvent evt) {
|
||||
DynmapWorld w = new BukkitWorld(evt.getWorld());
|
||||
@@ -175,7 +189,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
break;
|
||||
case PLAYER_BED_LEAVE:
|
||||
pm.registerEvents(new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerBedLeave(PlayerBedLeaveEvent evt) {
|
||||
DynmapPlayer p = new BukkitPlayer(evt.getPlayer());
|
||||
@@ -185,7 +198,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
break;
|
||||
case PLAYER_CHAT:
|
||||
pm.registerEvents(new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerChat(PlayerChatEvent evt) {
|
||||
if(evt.isCancelled()) return;
|
||||
@@ -198,10 +210,11 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
break;
|
||||
case BLOCK_BREAK:
|
||||
pm.registerEvents(new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockBreak(BlockBreakEvent evt) {
|
||||
if(evt.isCancelled()) return;
|
||||
Block b = evt.getBlock();
|
||||
if(b == null) return; /* Work around for stupid mods.... */
|
||||
Location l = b.getLocation();
|
||||
core.listenerManager.processBlockEvent(EventType.BLOCK_BREAK, b.getType().getId(),
|
||||
BukkitWorld.normalizeWorldName(l.getWorld().getName()), l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
@@ -210,9 +223,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
break;
|
||||
case SIGN_CHANGE:
|
||||
pm.registerEvents(new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onSignChange(SignChangeEvent evt) {
|
||||
if(evt.isCancelled()) return;
|
||||
Block b = evt.getBlock();
|
||||
Location l = b.getLocation();
|
||||
String[] lines = evt.getLines(); /* Note: changes to this change event - intentional */
|
||||
@@ -273,6 +286,98 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Set<String> checkPlayerPermissions(String player, Set<String> perms) {
|
||||
OfflinePlayer p = getServer().getOfflinePlayer(player);
|
||||
if(p.isBanned())
|
||||
return new HashSet<String>();
|
||||
Set<String> rslt = permissions.hasOfflinePermissions(player, perms);
|
||||
if (rslt == null) {
|
||||
rslt = new HashSet<String>();
|
||||
if(p.isOp()) {
|
||||
rslt.addAll(perms);
|
||||
}
|
||||
}
|
||||
return rslt;
|
||||
}
|
||||
@Override
|
||||
public boolean checkPlayerPermission(String player, String perm) {
|
||||
OfflinePlayer p = getServer().getOfflinePlayer(player);
|
||||
if(p.isBanned())
|
||||
return false;
|
||||
return permissions.hasOfflinePermission(player, perm);
|
||||
}
|
||||
/**
|
||||
* Render processor helper - used by code running on render threads to request chunk snapshot cache from server/sync thread
|
||||
*/
|
||||
@Override
|
||||
public MapChunkCache createMapChunkCache(DynmapWorld w, List<DynmapChunk> chunks,
|
||||
boolean blockdata, boolean highesty, boolean biome, boolean rawbiome) {
|
||||
MapChunkCache c = w.getChunkCache(chunks);
|
||||
if(w.visibility_limits != null) {
|
||||
for(MapChunkCache.VisibilityLimit limit: w.visibility_limits) {
|
||||
c.setVisibleRange(limit);
|
||||
}
|
||||
c.setHiddenFillStyle(w.hiddenchunkstyle);
|
||||
c.setAutoGenerateVisbileRanges(w.do_autogenerate);
|
||||
}
|
||||
if(w.hidden_limits != null) {
|
||||
for(MapChunkCache.VisibilityLimit limit: w.hidden_limits) {
|
||||
c.setHiddenRange(limit);
|
||||
}
|
||||
c.setHiddenFillStyle(w.hiddenchunkstyle);
|
||||
}
|
||||
if(c.setChunkDataTypes(blockdata, biome, highesty, rawbiome) == false) {
|
||||
Log.severe("CraftBukkit build does not support biome APIs");
|
||||
}
|
||||
if(chunks.size() == 0) { /* No chunks to get? */
|
||||
c.loadChunks(0);
|
||||
return c;
|
||||
}
|
||||
|
||||
final MapChunkCache cc = c;
|
||||
|
||||
while(!cc.isDoneLoading()) {
|
||||
synchronized(loadlock) {
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
if(cur_tick != (now/50)) { /* New tick? */
|
||||
chunks_in_cur_tick = mapManager.getMaxChunkLoadsPerTick();
|
||||
cur_tick = now/50;
|
||||
}
|
||||
}
|
||||
Future<Boolean> f = core.getServer().callSyncMethod(new Callable<Boolean>() {
|
||||
public Boolean call() throws Exception {
|
||||
boolean exhausted;
|
||||
synchronized(loadlock) {
|
||||
if(chunks_in_cur_tick > 0)
|
||||
chunks_in_cur_tick -= cc.loadChunks(chunks_in_cur_tick);
|
||||
exhausted = (chunks_in_cur_tick == 0);
|
||||
}
|
||||
return exhausted;
|
||||
}
|
||||
});
|
||||
Boolean delay;
|
||||
try {
|
||||
delay = f.get();
|
||||
} catch (Exception ix) {
|
||||
Log.severe(ix);
|
||||
return null;
|
||||
}
|
||||
if((delay != null) && delay.booleanValue()) {
|
||||
try { Thread.sleep(25); } catch (InterruptedException ix) {}
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
@Override
|
||||
public int getMaxPlayers() {
|
||||
return getServer().getMaxPlayers();
|
||||
}
|
||||
@Override
|
||||
public int getCurrentPlayers() {
|
||||
return getServer().getOnlinePlayers().length;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Player access abstraction class
|
||||
@@ -314,7 +419,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
if(player == null) {
|
||||
return null;
|
||||
}
|
||||
Location loc = player.getLocation();
|
||||
Location loc = player.getEyeLocation(); // Use eye location, since we show head
|
||||
return toLoc(loc);
|
||||
}
|
||||
@Override
|
||||
@@ -417,9 +522,22 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
/* Set up player login/quit event handler */
|
||||
registerPlayerLoginListener();
|
||||
|
||||
permissions = NijikokunPermissions.create(getServer(), "dynmap");
|
||||
/* Build default permissions from our plugin */
|
||||
Map<String, Boolean> perdefs = new HashMap<String, Boolean>();
|
||||
List<Permission> pd = plugin.getDescription().getPermissions();
|
||||
for(Permission p : pd) {
|
||||
perdefs.put(p.getName(), p.getDefault() == PermissionDefault.TRUE);
|
||||
}
|
||||
|
||||
permissions = PEXPermissions.create(getServer(), "dynmap");
|
||||
if (permissions == null)
|
||||
permissions = BukkitPermissions.create("dynmap");
|
||||
permissions = bPermPermissions.create(getServer(), "dynmap", perdefs);
|
||||
if (permissions == null)
|
||||
permissions = PermBukkitPermissions.create(getServer(), "dynmap", perdefs);
|
||||
if (permissions == null)
|
||||
permissions = NijikokunPermissions.create(getServer(), "dynmap");
|
||||
if (permissions == null)
|
||||
permissions = BukkitPermissions.create("dynmap", perdefs);
|
||||
if (permissions == null)
|
||||
permissions = new OpPermissions(new String[] { "fullrender", "cancelrender", "radiusrender", "resetstats", "reload", "purgequeue", "pause", "ips-for-id", "ids-for-ip", "add-id-for-ip", "del-id-for-ip" });
|
||||
/* Get and initialize data folder */
|
||||
@@ -610,18 +728,16 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
}
|
||||
|
||||
private static DynmapLocation toLoc(Location l) {
|
||||
return new DynmapLocation(BukkitWorld.normalizeWorldName(l.getWorld().getName()), l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
return new DynmapLocation(DynmapWorld.normalizeWorldName(l.getWorld().getName()), l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
}
|
||||
|
||||
private void registerPlayerLoginListener() {
|
||||
Listener pl = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerJoin(PlayerJoinEvent evt) {
|
||||
DynmapPlayer dp = new BukkitPlayer(evt.getPlayer());
|
||||
core.listenerManager.processPlayerEvent(EventType.PLAYER_JOIN, dp);
|
||||
}
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerQuit(PlayerQuitEvent evt) {
|
||||
DynmapPlayer dp = new BukkitPlayer(evt.getPlayer());
|
||||
@@ -690,6 +806,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
private boolean onexplosion;
|
||||
private boolean onstructuregrow;
|
||||
private boolean onblockgrow;
|
||||
private boolean onblockredstone;
|
||||
|
||||
private void registerEvents() {
|
||||
|
||||
@@ -705,10 +822,10 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
onblockphysics = core.isTrigger("blockphysics");
|
||||
onpiston = core.isTrigger("pistonmoved");
|
||||
onblockfade = core.isTrigger("blockfaded");
|
||||
onblockredstone = core.isTrigger("blockredstone");
|
||||
|
||||
if(onplace) {
|
||||
Listener placelistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockPlace(BlockPlaceEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -724,12 +841,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onbreak) {
|
||||
Listener breaklistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockBreak(BlockBreakEvent event) {
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Location loc = event.getBlock().getLocation();
|
||||
Block b = event.getBlock();
|
||||
if(b == null) return; /* Stupid mod workaround */
|
||||
Location loc = b.getLocation();
|
||||
String wn = BukkitWorld.normalizeWorldName(loc.getWorld().getName());
|
||||
sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockbreak");
|
||||
@@ -740,7 +858,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onleaves) {
|
||||
Listener leaveslistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onLeavesDecay(LeavesDecayEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -758,7 +875,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onburn) {
|
||||
Listener burnlistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockBurn(BlockBurnEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -776,13 +892,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onblockphysics) {
|
||||
Listener physlistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockPhysics(BlockPhysicsEvent event) {
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Block b = event.getBlock();
|
||||
Material m = b.getType();
|
||||
if(m == null) return;
|
||||
switch(m) {
|
||||
case STATIONARY_WATER:
|
||||
case WATER:
|
||||
@@ -790,7 +906,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
case LAVA:
|
||||
case GRAVEL:
|
||||
case SAND:
|
||||
checkBlock(event.getBlock(), "blockphysics");
|
||||
checkBlock(b, "blockphysics");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -800,17 +918,18 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onblockfromto) {
|
||||
Listener fromtolistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockFromTo(BlockFromToEvent event) {
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Material m = event.getBlock().getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE))
|
||||
checkBlock(event.getBlock(), "blockfromto");
|
||||
m = event.getToBlock().getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE))
|
||||
checkBlock(event.getToBlock(), "blockfromto");
|
||||
Block b = event.getBlock();
|
||||
Material m = b.getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
||||
checkBlock(b, "blockfromto");
|
||||
b = event.getToBlock();
|
||||
m = b.getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
||||
checkBlock(b, "blockfromto");
|
||||
}
|
||||
};
|
||||
pm.registerEvents(fromtolistener, this);
|
||||
@@ -818,7 +937,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onpiston) {
|
||||
Listener pistonlistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -845,7 +963,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -877,7 +994,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onblockspread) {
|
||||
Listener spreadlistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockSpread(BlockSpreadEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -893,7 +1009,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onblockform) {
|
||||
Listener formlistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockForm(BlockFormEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -909,7 +1024,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onblockfade) {
|
||||
Listener fadelistener = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockFade(BlockFadeEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -929,7 +1043,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
try {
|
||||
Class.forName("org.bukkit.event.block.BlockGrowEvent");
|
||||
Listener growTrigger = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockGrow(BlockGrowEvent event) {
|
||||
if(event.isCancelled())
|
||||
@@ -946,9 +1059,21 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
}
|
||||
}
|
||||
|
||||
if(onblockredstone) {
|
||||
Listener redstoneTrigger = new Listener() {
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onBlockRedstone(BlockRedstoneEvent event) {
|
||||
Location loc = event.getBlock().getLocation();
|
||||
String wn = BukkitWorld.normalizeWorldName(loc.getWorld().getName());
|
||||
sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockredstone");
|
||||
}
|
||||
};
|
||||
pm.registerEvents(redstoneTrigger, this);
|
||||
}
|
||||
|
||||
/* Register player event trigger handlers */
|
||||
Listener playerTrigger = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
if(onplayerjoin) {
|
||||
@@ -964,7 +1089,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
if(onplayermove) {
|
||||
Listener playermove = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onPlayerMove(PlayerMoveEvent event) {
|
||||
Location loc = event.getPlayer().getLocation();
|
||||
@@ -976,7 +1100,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
}
|
||||
/* Register entity event triggers */
|
||||
Listener entityTrigger = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onEntityExplode(EntityExplodeEvent event) {
|
||||
Location loc = event.getLocation();
|
||||
@@ -1010,7 +1133,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
/* Register world event triggers */
|
||||
Listener worldTrigger = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
core.updateConfigHashcode();
|
||||
@@ -1018,7 +1140,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
if(core.processWorldLoad(w)) /* Have core process load first - fire event listeners if good load after */
|
||||
core.listenerManager.processWorldEvent(EventType.WORLD_LOAD, w);
|
||||
}
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onWorldUnload(WorldUnloadEvent event) {
|
||||
core.updateConfigHashcode();
|
||||
@@ -1026,7 +1147,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
if(w != null)
|
||||
core.listenerManager.processWorldEvent(EventType.WORLD_UNLOAD, w);
|
||||
}
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onStructureGrow(StructureGrowEvent event) {
|
||||
Location loc = event.getLocation();
|
||||
@@ -1061,7 +1181,6 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
ongeneratechunk = core.isTrigger("chunkgenerated");
|
||||
if(ongeneratechunk) {
|
||||
Listener chunkTrigger = new Listener() {
|
||||
@SuppressWarnings("unused")
|
||||
@EventHandler(priority=EventPriority.MONITOR)
|
||||
public void onChunkPopulate(ChunkPopulateEvent event) {
|
||||
Chunk c = event.getChunk();
|
||||
@@ -1077,7 +1196,10 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
|
||||
private boolean detectSpout() {
|
||||
Plugin p = this.getServer().getPluginManager().getPlugin("Spout");
|
||||
return (p != null);
|
||||
if(p != null) {
|
||||
return p.isEnabled();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasSpout() {
|
||||
@@ -1111,5 +1233,12 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
public boolean setDisableChatToWebProcessing(boolean disable) {
|
||||
return core.setDisableChatToWebProcessing(disable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean testIfPlayerVisibleToPlayer(String player, String player_to_see) {
|
||||
return core.testIfPlayerVisibleToPlayer(player, player_to_see);
|
||||
}
|
||||
@Override
|
||||
public boolean testIfPlayerInfoProtected() {
|
||||
return core.testIfPlayerInfoProtected();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,11 @@ import java.lang.reflect.Field;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
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 +73,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 +167,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,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;
|
||||
}
|
||||
}
|
||||
@@ -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,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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,12 +28,20 @@ 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)
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
# hideifsneaking: false
|
||||
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
|
||||
#- class: org.dynmap.JsonFileClientUpdateComponent
|
||||
# writeinterval: 1
|
||||
# sendhealth: true
|
||||
@@ -48,6 +56,12 @@ 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
|
||||
@@ -90,6 +104,8 @@ 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
|
||||
@@ -123,11 +139,14 @@ components:
|
||||
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
|
||||
@@ -167,17 +186,9 @@ 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
|
||||
|
||||
@@ -188,15 +199,10 @@ smooth-lighting: false
|
||||
# Has no effect on maps with explicit format settings
|
||||
image-format: png
|
||||
|
||||
# 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
|
||||
# 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
|
||||
@@ -204,34 +210,44 @@ 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)
|
||||
# Customize URL used for fetching player skins (%player% is macro for name)
|
||||
skin-url: "http://s3.amazonaws.com/MinecraftSkins/%player%.png"
|
||||
|
||||
# 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
|
||||
|
||||
# Enable Industrial Craft 2 block rendering support (core, Advanced Machines, Charging Bench, Power Converters)
|
||||
### Mod block support ###
|
||||
# Enable Industrial Craft 2 block rendering support (core, Advanced Machines, Charging Bench, Power Converters, Compact Solars, Nuclear Control)
|
||||
#ic2-support: true
|
||||
#ic2-advancesmachines-support: true
|
||||
#ic2-chargingbench-support: true
|
||||
#ic2-powerconverters-support: true
|
||||
|
||||
#ic2-compactsolars-support: true
|
||||
#ic2-nuclearcontrol-support: true
|
||||
# Enable BuildCraft block rendering support
|
||||
#buildcraft-support: true
|
||||
|
||||
# Enable RedPower2 block rendering support
|
||||
#redpower2-support: true
|
||||
|
||||
# Enable NetherOres block rendering support
|
||||
#netherores-support: true
|
||||
|
||||
# Enable RailCraft block rendering support
|
||||
#railcraft-support: true
|
||||
|
||||
# Enable Kaevator's Superslopes block rendering support
|
||||
#superslopes-support: true
|
||||
|
||||
# Enabled ComputerCraft block rendering support
|
||||
#computercraft-support: true
|
||||
# Enabled LC Trees++ block rendering support
|
||||
#lctrees-support: true
|
||||
# Enable Forestry block rending support
|
||||
#forestry-support: true
|
||||
# Enable IronCheck block rendering support
|
||||
#ironchest-support: true
|
||||
# Enable TubeCraft block rendering support
|
||||
#tubecraft-support: true
|
||||
# Enable Ender Storage block rendering support
|
||||
#enderstorage-support: true
|
||||
|
||||
render-triggers:
|
||||
#- playermove
|
||||
@@ -246,10 +262,11 @@ render-triggers:
|
||||
- blockspread
|
||||
- pistonmoved
|
||||
- explosion
|
||||
- blockfromto
|
||||
- blockphysics
|
||||
#- 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"
|
||||
@@ -275,6 +292,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
|
||||
|
||||
@@ -328,9 +350,6 @@ defaultmap: flat
|
||||
#followzoom: 3
|
||||
#followmap: surface
|
||||
|
||||
# Option to enable workaround for incorrectly encoded unicode in Cyrillic MC/Bukkit (not good for other code pages)
|
||||
cyrillic-support: false
|
||||
|
||||
# If true, make persistent record of IP addresses used by player logins, to support web IP to player matching
|
||||
persist-ids-by-ip: true
|
||||
|
||||
@@ -338,7 +357,26 @@ persist-ids-by-ip: true
|
||||
msg:
|
||||
maptypes: "Map Types"
|
||||
players: "Players"
|
||||
chatrequireslogin: "Chat Requires Login"
|
||||
chatnotallowed: "You are not permitted to send chat messages"
|
||||
|
||||
# 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/"
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
@@ -142,6 +155,7 @@ permissions:
|
||||
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
|
||||
@@ -193,6 +207,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 +279,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 +318,9 @@ permissions:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user