small fixes

This commit is contained in:
Paul Schulze 2013-03-19 12:02:01 +01:00
parent 9b17060d32
commit 3c229acf31
2 changed files with 7 additions and 5 deletions

View File

@ -30,11 +30,13 @@ public class Messages
private static String makeCmd( Player player, String command, String explanation, String[] permissions, private static String makeCmd( Player player, String command, String explanation, String[] permissions,
String... args ) String... args )
{ {
for ( String perm : permissions ) if (permissions != null) {
{ for ( String perm : permissions )
if ( !player.hasPermission(perm) )
{ {
return ""; if ( !player.hasPermission(perm) )
{
return "";
}
} }
} }

View File

@ -66,7 +66,7 @@ public class Replicator implements ConfigurationSerializable
/** /**
* List of all replicators accessible by center location. * List of all replicators accessible by center location.
*/ */
private static HashMap<Location, Replicator> allReplicators; private static HashMap<Location, Replicator> allReplicators = new HashMap<Location, Replicator>();
private static File replicatorsFile = new File(Plugin.instance.getDataFolder(), dataFileName); private static File replicatorsFile = new File(Plugin.instance.getDataFolder(), dataFileName);
private static FileConfiguration replicatorsFileConf = YamlConfiguration.loadConfiguration(replicatorsFile); private static FileConfiguration replicatorsFileConf = YamlConfiguration.loadConfiguration(replicatorsFile);