diff --git a/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java b/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java index d958594..0271a60 100644 --- a/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java +++ b/src/main/java/net/frozenorb/apiv3/model/ServerGroup.java @@ -1,6 +1,7 @@ package net.frozenorb.apiv3.model; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.mongodb.async.SingleResultCallback; import com.mongodb.async.client.MongoCollection; import fr.javatic.mongo.jacksonCodec.Entity; @@ -73,7 +74,11 @@ public final class ServerGroup { } public Map calculatePermissions(Rank rank) { - return PermissionUtils.mergeUpTo(permissions, rank); + if (permissions == null) { + return ImmutableMap.of(); + } else { + return PermissionUtils.mergeUpTo(permissions, rank); + } } public void insert(SingleResultCallback callback) {