|
| 1 | +package tc.oc.api.minecraft.servers; |
| 2 | + |
| 3 | +import java.util.Map; |
| 4 | + |
| 5 | +import com.google.common.collect.ImmutableMap; |
| 6 | + |
| 7 | +/** |
| 8 | + * This is a hard-coded list of permissions, that add the basic functionality. |
| 9 | + * To be replaced when a proper rank/group & permission system |
| 10 | + * |
| 11 | + * The list of permissions have been copied from what they used to be on ocn, removing blatantly outdated ones. |
| 12 | + */ |
| 13 | +public class DefaultPermissions { |
| 14 | + |
| 15 | + public static final Map<String, Boolean> PARTICIPANT_PERMISSIONS; |
| 16 | + public static final Map<String, Boolean> OBSERVER_PERMISSIONS; |
| 17 | + public static final Map<String, Boolean> MAPMAKER_PERMISSIONS; |
| 18 | + |
| 19 | + static { |
| 20 | + PARTICIPANT_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>() |
| 21 | + // Global |
| 22 | + .put("worldedit.navigation.jumpto.tool", false) |
| 23 | + .put("worldedit.navigation.thru.tool" , false) |
| 24 | + // Untourney |
| 25 | + .put("bukkit.command.kill" , false) |
| 26 | + .put("bukkit.command.me" , false) |
| 27 | + .put("bukkit.command.tell" , false) |
| 28 | + .put("commandbook.pong" , false) |
| 29 | + .put("commandbook.speed.flight", false) |
| 30 | + .put("commandbook.speed.walk" , false) |
| 31 | + .put("chat.global.receive" , true) |
| 32 | + .put("commandbook.motd" , true) |
| 33 | + .put("commandbook.msg" , true) |
| 34 | + .put("commandbook.rules" , true) |
| 35 | + .put("commandbook.time.check" , true) |
| 36 | + .put("commandbook.who" , true) |
| 37 | + .put("pgm.chat.report" , true) |
| 38 | + .put("pgm.class" , true) |
| 39 | + .put("pgm.class.list" , true) |
| 40 | + .put("pgm.class.select" , true) |
| 41 | + .put("pgm.join" , true) |
| 42 | + .put("pgm.myteam" , true) |
| 43 | + .build(); |
| 44 | + |
| 45 | + OBSERVER_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>() |
| 46 | + // Untourney |
| 47 | + .put("bukkit.command.kill" , false) |
| 48 | + .put("bukkit.command.me" , false) |
| 49 | + .put("bukkit.command.tell" , false) |
| 50 | + .put("commandbook.pong" , false) |
| 51 | + .put("worldedit.navigation.ceiling", false) |
| 52 | + .put("worldedit.navigation.up" , false) |
| 53 | + .put("commandbook.motd" , true) |
| 54 | + .put("commandbook.msg" , true) |
| 55 | + .put("commandbook.rules" , true) |
| 56 | + .put("commandbook.teleport" , true) |
| 57 | + .put("commandbook.time.check" , true) |
| 58 | + .put("commandbook.who" , true) |
| 59 | + .put("ocn.teleport" , true) |
| 60 | + .put("pgm.chat.report" , true) |
| 61 | + .put("pgm.class" , true) |
| 62 | + .put("pgm.class.list" , true) |
| 63 | + .put("pgm.class.select" , true) |
| 64 | + .put("pgm.inventory" , true) |
| 65 | + .put("pgm.join" , true) |
| 66 | + .put("pgm.myteam" , true) |
| 67 | + .put("worldedit.navigation.*" , true) |
| 68 | + .build(); |
| 69 | + |
| 70 | + |
| 71 | + MAPMAKER_PERMISSIONS = new ImmutableMap.Builder<String, Boolean>() |
| 72 | + // Public |
| 73 | + .put("map.rating.view.live", true) |
| 74 | + .put("pgm.fullserver" , true) |
| 75 | + .put("pgm.join.choose" , true) |
| 76 | + .put("pgm.join.full" , true) |
| 77 | + .build(); |
| 78 | + } |
| 79 | + |
| 80 | +} |
0 commit comments