Permission node simplification.

This commit is contained in:
Olof Larsson 2014-04-03 17:21:07 +02:00
parent 1bb7d0a1d5
commit 722ce6b2a7
26 changed files with 108 additions and 109 deletions

View File

@ -10,29 +10,29 @@ permissions:
# THE REAL NODES # THE REAL NODES
# -------------------------------------------- # # -------------------------------------------- #
# cmd # cmd
mcore.cmd.mcore: {description: use the mcore command, default: false} mcore.basecommand: {description: use the MCore base command, default: false}
mcore.cmd.mcore.id: {description: see the server id, default: false} mcore.id: {description: see the server id, default: false}
mcore.cmd.mcore.version: {description: diplay plugin version, default: false} mcore.version: {description: diplay plugin version, default: false}
mcore.cmd.mcore.hearsound: {description: hear a sound, default: false} mcore.hearsound: {description: hear a sound, default: false}
mcore.cmd.mcore.mstore: {description: use the mstore command, default: false} mcore.mstore: {description: use the mstore command, default: false}
mcore.cmd.mcore.mstore.stats: {description: show mstore statistics, default: false} mcore.mstore.stats: {description: show mstore statistics, default: false}
mcore.cmd.mcore.mstore.listcolls: {description: list collections in a database, default: false} mcore.mstore.listcolls: {description: list collections in a database, default: false}
mcore.cmd.mcore.mstore.copydb: {description: copy database content, default: false} mcore.mstore.copydb: {description: copy database content, default: false}
mcore.cmd.mcore.usys: {description: use the usys command, default: false} mcore.usys: {description: use the usys command, default: false}
mcore.cmd.mcore.usys.multiverse: {description: manage multiverses, default: false} mcore.usys.multiverse: {description: manage multiverses, default: false}
mcore.cmd.mcore.usys.multiverse.list: {description: list multiverses, default: false} mcore.usys.multiverse.list: {description: list multiverses, default: false}
mcore.cmd.mcore.usys.multiverse.show: {description: show multiverse, default: false} mcore.usys.multiverse.show: {description: show multiverse, default: false}
mcore.cmd.mcore.usys.multiverse.new: {description: create new multiverse, default: false} mcore.usys.multiverse.new: {description: create new multiverse, default: false}
mcore.cmd.mcore.usys.multiverse.del: {description: delete multiverse, default: false} mcore.usys.multiverse.del: {description: delete multiverse, default: false}
mcore.cmd.mcore.usys.universe: {description: manage universes, default: false} mcore.usys.universe: {description: manage universes, default: false}
mcore.cmd.mcore.usys.universe.new: {description: create new universe in multiverse, default: false} mcore.usys.universe.new: {description: create new universe in multiverse, default: false}
mcore.cmd.mcore.usys.universe.del: {description: delete universe in multiverse, default: false} mcore.usys.universe.del: {description: delete universe in multiverse, default: false}
mcore.cmd.mcore.usys.universe.clear: {description: clear universe in multiverse, default: false} mcore.usys.universe.clear: {description: clear universe in multiverse, default: false}
mcore.cmd.mcore.usys.world: {description: set a worlds universe in a multiverse, default: false} mcore.usys.world: {description: set a worlds universe in a multiverse, default: false}
mcore.cmd.mcore.usys.aspect: {description: manage aspects, default: false} mcore.usys.aspect: {description: manage aspects, default: false}
mcore.cmd.mcore.usys.aspect.list: {description: list aspects, default: false} mcore.usys.aspect.list: {description: list aspects, default: false}
mcore.cmd.mcore.usys.aspect.show: {description: show aspect, default: false} mcore.usys.aspect.show: {description: show aspect, default: false}
mcore.cmd.mcore.usys.aspect.use: {description: set multiverse for aspect, default: false} mcore.usys.aspect.use: {description: set multiverse for aspect, default: false}
# misc # misc
mcore.notpdelay: {description: teleport without delay, default: false} mcore.notpdelay: {description: teleport without delay, default: false}
# -------------------------------------------- # # -------------------------------------------- #
@ -41,29 +41,29 @@ permissions:
mcore.*: mcore.*:
default: false default: false
children: children:
mcore.cmd.mcore: true mcore.basecommand: true
mcore.cmd.mcore.id: true mcore.id: true
mcore.cmd.mcore.version: true mcore.version: true
mcore.cmd.mcore.hearsound: true mcore.hearsound: true
mcore.cmd.mcore.mstore: true mcore.mstore: true
mcore.cmd.mcore.mstore.stats: true mcore.mstore.stats: true
mcore.cmd.mcore.mstore.listcolls: true mcore.mstore.listcolls: true
mcore.cmd.mcore.mstore.copydb: true mcore.mstore.copydb: true
mcore.cmd.mcore.usys: true mcore.usys: true
mcore.cmd.mcore.usys.multiverse: true mcore.usys.multiverse: true
mcore.cmd.mcore.usys.multiverse.list: true mcore.usys.multiverse.list: true
mcore.cmd.mcore.usys.multiverse.show: true mcore.usys.multiverse.show: true
mcore.cmd.mcore.usys.multiverse.new: true mcore.usys.multiverse.new: true
mcore.cmd.mcore.usys.multiverse.del: true mcore.usys.multiverse.del: true
mcore.cmd.mcore.usys.universe: true mcore.usys.universe: true
mcore.cmd.mcore.usys.universe.new: true mcore.usys.universe.new: true
mcore.cmd.mcore.usys.universe.del: true mcore.usys.universe.del: true
mcore.cmd.mcore.usys.universe.clear: true mcore.usys.universe.clear: true
mcore.cmd.mcore.usys.world: true mcore.usys.world: true
mcore.cmd.mcore.usys.aspect: true mcore.usys.aspect: true
mcore.cmd.mcore.usys.aspect.list: true mcore.usys.aspect.list: true
mcore.cmd.mcore.usys.aspect.show: true mcore.usys.aspect.show: true
mcore.cmd.mcore.usys.aspect.use: true mcore.usys.aspect.use: true
mcore.notpdelay: true mcore.notpdelay: true
# -------------------------------------------- # # -------------------------------------------- #
# KITS # KITS
@ -84,24 +84,24 @@ permissions:
default: false default: false
children: children:
mcore.kit.rank0: true mcore.kit.rank0: true
mcore.cmd.mcore.id: true mcore.id: true
mcore.cmd.mcore.mstore: true mcore.mstore: true
mcore.cmd.mcore.mstore.stats: true mcore.mstore.stats: true
mcore.cmd.mcore.mstore.listcolls: true mcore.mstore.listcolls: true
mcore.cmd.mcore.usys: true mcore.usys: true
mcore.cmd.mcore.usys.multiverse: true mcore.usys.multiverse: true
mcore.cmd.mcore.usys.multiverse.list: true mcore.usys.multiverse.list: true
mcore.cmd.mcore.usys.multiverse.show: true mcore.usys.multiverse.show: true
mcore.cmd.mcore.usys.aspect: true mcore.usys.aspect: true
mcore.cmd.mcore.usys.aspect.list: true mcore.usys.aspect.list: true
mcore.cmd.mcore.usys.aspect.show: true mcore.usys.aspect.show: true
mcore.notpdelay: true mcore.notpdelay: true
mcore.kit.rank0: mcore.kit.rank0:
default: false default: false
children: children:
mcore.cmd.mcore: true mcore.basecommand: true
mcore.cmd.mcore.hearsound: true mcore.hearsound: true
mcore.cmd.mcore.version: true mcore.version: true
mcore.kit.default: mcore.kit.default:
default: true default: true
children: children:

View File

@ -10,30 +10,29 @@ public enum MCorePerm
// ENUM // ENUM
// -------------------------------------------- // // -------------------------------------------- //
CMD_MCORE("cmd.mcore"), BASECOMMAND("basecommand"),
CMD_MCORE_ID("cmd.mcore.id"), ID("id"),
CMD_MCORE_VERSION("cmd.mcore.version"), VERSION("version"),
CMD_MCORE_HEARSOUND("cmd.mcore.hearsound"), HEARSOUND("hearsound"),
CMD_MCORE_MSTORE("cmd.mcore.mstore"), MSTORE("mstore"),
CMD_MCORE_MSTORE_STATS("cmd.mcore.mstore.stats"), MSTORE_STATS("mstore.stats"),
CMD_MCORE_MSTORE_LISTCOLLS("cmd.mcore.mstore.listcolls"), MSTORE_LISTCOLLS("mstore.listcolls"),
CMD_MCORE_MSTORE_COPYDB("cmd.mcore.mstore.copydb"), MSTORE_COPYDB("mstore.copydb"),
CMD_MCORE_USYS("cmd.mcore.usys"), USYS("usys"),
CMD_MCORE_USYS_MULTIVERSE("cmd.mcore.usys.multiverse"), USYS_MULTIVERSE("usys.multiverse"),
CMD_MCORE_USYS_MULTIVERSE_LIST("cmd.mcore.usys.multiverse.list"), USYS_MULTIVERSE_LIST("usys.multiverse.list"),
CMD_MCORE_USYS_MULTIVERSE_SHOW("cmd.mcore.usys.multiverse.show"), USYS_MULTIVERSE_SHOW("usys.multiverse.show"),
CMD_MCORE_USYS_MULTIVERSE_NEW("cmd.mcore.usys.multiverse.new"), USYS_MULTIVERSE_NEW("usys.multiverse.new"),
CMD_MCORE_USYS_MULTIVERSE_DEL("cmd.mcore.usys.multiverse.del"), USYS_MULTIVERSE_DEL("usys.multiverse.del"),
CMD_MCORE_USYS_UNIVERSE("cmd.mcore.usys.universe"), USYS_UNIVERSE("usys.universe"),
CMD_MCORE_USYS_UNIVERSE_NEW("cmd.mcore.usys.universe.new"), USYS_UNIVERSE_NEW("usys.universe.new"),
CMD_MCORE_USYS_UNIVERSE_DEL("cmd.mcore.usys.universe.del"), USYS_UNIVERSE_DEL("usys.universe.del"),
CMD_MCORE_USYS_UNIVERSE_CLEAR("cmd.mcore.usys.universe.clear"), USYS_UNIVERSE_CLEAR("usys.universe.clear"),
CMD_MCORE_USYS_WORLD("cmd.mcore.usys.world"), USYS_WORLD("usys.world"),
CMD_MCORE_USYS_ASPECT("cmd.mcore.usys.aspect"), USYS_ASPECT("usys.aspect"),
CMD_MCORE_USYS_ASPECT_LIST("cmd.mcore.usys.aspect.list"), USYS_ASPECT_LIST("usys.aspect.list"),
CMD_MCORE_USYS_ASPECT_SHOW("cmd.mcore.usys.aspect.show"), USYS_ASPECT_SHOW("usys.aspect.show"),
CMD_MCORE_USYS_ASPECT_USE("cmd.mcore.usys.aspect.use"), USYS_ASPECT_USE("usys.aspect.use"),
NOTPDELAY("notpdelay"), NOTPDELAY("notpdelay"),
// END OF LIST // END OF LIST

View File

@ -36,7 +36,7 @@ public class ARAspect extends ARAbstractSelect<Aspect>
@Override @Override
public boolean canList(CommandSender sender) public boolean canList(CommandSender sender)
{ {
return MCorePerm.CMD_MCORE_USYS_ASPECT_LIST.has(sender, false); return MCorePerm.USYS_ASPECT_LIST.has(sender, false);
} }
@Override @Override

View File

@ -36,7 +36,7 @@ public class ARMultiverse extends ARAbstractSelect<Multiverse>
@Override @Override
public boolean canList(CommandSender sender) public boolean canList(CommandSender sender)
{ {
return MCorePerm.CMD_MCORE_USYS_MULTIVERSE_LIST.has(sender, false); return MCorePerm.USYS_MULTIVERSE_LIST.has(sender, false);
} }
@Override @Override

View File

@ -16,7 +16,7 @@ public class CmdMCore extends MCommand
public CmdMCoreMStore cmdMCoreMStore = new CmdMCoreMStore(); public CmdMCoreMStore cmdMCoreMStore = new CmdMCoreMStore();
public CmdMCoreId cmdMCoreId = new CmdMCoreId(); public CmdMCoreId cmdMCoreId = new CmdMCoreId();
public CmdMCoreHearsound cmdMCoreHearsound = new CmdMCoreHearsound(); public CmdMCoreHearsound cmdMCoreHearsound = new CmdMCoreHearsound();
public VersionCommand cmdMCoreVersion = new VersionCommand(MCore.get(), MCorePerm.CMD_MCORE_VERSION.node, "v", "version"); public VersionCommand cmdMCoreVersion = new VersionCommand(MCore.get(), MCorePerm.VERSION.node, "v", "version");
// -------------------------------------------- // // -------------------------------------------- //
// CONSTRUCT // CONSTRUCT
@ -32,7 +32,7 @@ public class CmdMCore extends MCommand
this.addSubCommand(this.cmdMCoreVersion); this.addSubCommand(this.cmdMCoreVersion);
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.BASECOMMAND.node));
} }
} }

View File

@ -25,7 +25,7 @@ public class CmdMCoreHearsound extends MCommand
this.setErrorOnToManyArgs(false); this.setErrorOnToManyArgs(false);
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_HEARSOUND.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.HEARSOUND.node));
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }

View File

@ -17,7 +17,7 @@ public class CmdMCoreId extends MCommand
this.addAliases("id"); this.addAliases("id");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_ID.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.ID.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -29,7 +29,7 @@ public class CmdMCoreMStore extends MCommand
this.addAliases("mstore"); this.addAliases("mstore");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_MSTORE.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.MSTORE.node));
} }
} }

View File

@ -30,7 +30,7 @@ public class CmdMCoreMStoreCopydb extends MCommand
this.addRequiredArg("to"); this.addRequiredArg("to");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_MSTORE_COPYDB.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.MSTORE_COPYDB.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -29,7 +29,7 @@ public class CmdMCoreMStoreListcolls extends MCommand
this.addOptionalArg("db", ConfServer.dburi); this.addOptionalArg("db", ConfServer.dburi);
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_MSTORE_LISTCOLLS.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.MSTORE_LISTCOLLS.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -26,7 +26,7 @@ public class CmdMCoreMStoreStats extends MCommand
this.addOptionalArg("coll", Coll.TOTAL); this.addOptionalArg("coll", Coll.TOTAL);
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_MSTORE_STATS.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.MSTORE_STATS.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -31,7 +31,7 @@ public class CmdMCoreUsys extends MCommand
this.addAliases("usys"); this.addAliases("usys");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS.node));
} }
} }

View File

@ -29,7 +29,7 @@ public class CmdMCoreUsysAspect extends MCommand
this.addAliases("a", "aspect"); this.addAliases("a", "aspect");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_ASPECT.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_ASPECT.node));
} }
} }

View File

@ -26,7 +26,7 @@ public class CmdMCoreUsysAspectList extends MCommand
this.addOptionalArg("page", "1"); this.addOptionalArg("page", "1");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_ASPECT_LIST.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_ASPECT_LIST.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -22,7 +22,7 @@ public class CmdMCoreUsysAspectShow extends MCommand
this.addRequiredArg("aspect"); this.addRequiredArg("aspect");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_ASPECT_SHOW.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_ASPECT_SHOW.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -24,7 +24,7 @@ public class CmdMCoreUsysAspectUse extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_ASPECT_USE.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_ASPECT_USE.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -31,7 +31,7 @@ public class CmdMCoreUsysMultiverse extends MCommand
this.addAliases("m", "multiverse"); this.addAliases("m", "multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE.node));
} }
} }

View File

@ -22,7 +22,7 @@ public class CmdMCoreUsysMultiverseDel extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE_DEL.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE_DEL.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -26,7 +26,7 @@ public class CmdMCoreUsysMultiverseList extends MCommand
this.addOptionalArg("page", "1"); this.addOptionalArg("page", "1");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE_LIST.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE_LIST.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -20,7 +20,7 @@ public class CmdMCoreUsysMultiverseNew extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE_NEW.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE_NEW.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -27,7 +27,7 @@ public class CmdMCoreUsysMultiverseShow extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE_SHOW.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE_SHOW.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -29,7 +29,7 @@ public class CmdMCoreUsysUniverse extends MCommand
this.addAliases("u", "universe"); this.addAliases("u", "universe");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_UNIVERSE.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_UNIVERSE.node));
} }
} }

View File

@ -23,7 +23,7 @@ public class CmdMCoreUsysUniverseClear extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_UNIVERSE_CLEAR.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_UNIVERSE_CLEAR.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -23,7 +23,7 @@ public class CmdMCoreUsysUniverseDel extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_MULTIVERSE_DEL.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_MULTIVERSE_DEL.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -22,7 +22,7 @@ public class CmdMCoreUsysUniverseNew extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_UNIVERSE_NEW.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_UNIVERSE_NEW.node));
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -23,7 +23,7 @@ public class CmdMCoreUsysWorld extends MCommand
this.addRequiredArg("multiverse"); this.addRequiredArg("multiverse");
// Requirements // Requirements
this.addRequirements(ReqHasPerm.get(MCorePerm.CMD_MCORE_USYS_WORLD.node)); this.addRequirements(ReqHasPerm.get(MCorePerm.USYS_WORLD.node));
} }
// -------------------------------------------- // // -------------------------------------------- //