Add tm ready permission to defaults

This commit is contained in:
Pablete1234 2017-02-05 02:28:38 +01:00
parent 91846d0a9e
commit 292d7c3f47
No known key found for this signature in database
GPG Key ID: DAFF9A337EF9A5FA
2 changed files with 10 additions and 4 deletions

View File

@ -12,11 +12,19 @@ import com.google.common.collect.ImmutableMap;
*/
public class DefaultPermissions {
public static final Map<String, Boolean> DEFAULT_PERMISSIONS;
public static final Map<String, Boolean> PARTICIPANT_PERMISSIONS;
public static final Map<String, Boolean> OBSERVER_PERMISSIONS;
public static final Map<String, Boolean> MAPMAKER_PERMISSIONS;
static {
DEFAULT_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>()
// Global
.put("ocn.login", true)
// Tournament
.put("tourney.ready", true)
.build();
PARTICIPANT_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>()
// Global
.put("worldedit.navigation.jumpto.tool", false)
@ -67,7 +75,6 @@ public class DefaultPermissions {
.put("worldedit.navigation.*" , true)
.build();
MAPMAKER_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>()
// Public
.put("map.rating.view.live", true)

View File

@ -14,6 +14,7 @@ import tc.oc.api.docs.PlayerId;
import tc.oc.api.docs.SimplePlayerId;
import tc.oc.api.docs.User;
import tc.oc.api.docs.virtual.UserDoc;
import tc.oc.api.minecraft.servers.DefaultPermissions;
import tc.oc.api.util.Permissions;
import tc.oc.api.util.UUIDs;
import tc.oc.minecraft.api.entity.OfflinePlayer;
@ -90,9 +91,7 @@ public class LocalUserDocument extends SimplePlayerId implements User {
@Override
public Map<String, Map<String, Boolean>> mc_permissions_by_realm() {
return ImmutableMap.of(
"global", ImmutableMap.of(
Permissions.LOGIN, true
)
"global", DefaultPermissions.DEFAULT_PERMISSIONS
);
}