diff --git a/src/main/java/de/craftinc/replicator/Messages.java b/src/main/java/de/craftinc/replicator/Messages.java index 5a5df3b..b319011 100644 --- a/src/main/java/de/craftinc/replicator/Messages.java +++ b/src/main/java/de/craftinc/replicator/Messages.java @@ -30,11 +30,13 @@ public class Messages private static String makeCmd( Player player, String command, String explanation, String[] permissions, String... args ) { - for ( String perm : permissions ) - { - if ( !player.hasPermission(perm) ) + if (permissions != null) { + for ( String perm : permissions ) { - return ""; + if ( !player.hasPermission(perm) ) + { + return ""; + } } } diff --git a/src/main/java/de/craftinc/replicator/Replicator.java b/src/main/java/de/craftinc/replicator/Replicator.java index 6d01aad..25e0ae5 100644 --- a/src/main/java/de/craftinc/replicator/Replicator.java +++ b/src/main/java/de/craftinc/replicator/Replicator.java @@ -66,7 +66,7 @@ public class Replicator implements ConfigurationSerializable /** * List of all replicators accessible by center location. */ - private static HashMap allReplicators; + private static HashMap allReplicators = new HashMap(); private static File replicatorsFile = new File(Plugin.instance.getDataFolder(), dataFileName); private static FileConfiguration replicatorsFileConf = YamlConfiguration.loadConfiguration(replicatorsFile);