disabledcommands can now be empty.

This commit is contained in:
FrozenCow 2011-02-07 22:26:55 +01:00
parent 9be43dbef5
commit 2a521ed945

View file

@ -21,11 +21,13 @@ public class DynmapPlayerListener extends PlayerListener {
String[] split = event.getMessage().split(" "); String[] split = event.getMessage().split(" ");
if (split[0].equalsIgnoreCase("/dynmap")) { if (split[0].equalsIgnoreCase("/dynmap")) {
if (split.length > 1) { if (split.length > 1) {
if (configuration.getProperty("disabledcommands") instanceof Iterable<?>) {
for(String s : (Iterable<String>)configuration.getProperty("disabledcommands")) { for(String s : (Iterable<String>)configuration.getProperty("disabledcommands")) {
if (split[1].equals(s)) { if (split[1].equals(s)) {
return; return;
} }
} }
}
if (split[1].equals("render")) { if (split[1].equals("render")) {
Player player = event.getPlayer(); Player player = event.getPlayer();