Search in sources :

Example 6 with Permission

use of org.cubeengine.libcube.service.permission.Permission in project modules-extra by CubeEngine.

the class Rulebook method onEnable.

@Listener
public void onEnable(GamePreInitializationEvent event) {
    this.folder = mm.getPathFor(Rulebook.class);
    // this.getCore().getFileManager().dropResources(RulebookResource.values());
    Permission getOtherPerm = pm.register(Rulebook.class, "command.get.other", "Allows adding a rulebook to another players inventory", null);
    this.rulebookManager = new RulebookManager(this, i18n);
    cm.addCommand(new RulebookCommands(cm, this, getOtherPerm, i18n));
    em.registerListener(Rulebook.class, new RulebookListener(this, i18n));
}
Also used : Permission(org.cubeengine.libcube.service.permission.Permission) RulebookManager(org.cubeengine.module.rulebook.bookManagement.RulebookManager) RulebookCommands(org.cubeengine.module.rulebook.bookManagement.RulebookCommands) Listener(org.spongepowered.api.event.Listener)

Aggregations

Permission (org.cubeengine.libcube.service.permission.Permission)6 AliasCommand (org.cubeengine.butler.alias.AliasCommand)2 RawPermission (org.cubeengine.libcube.service.command.property.RawPermission)2 EntityType (org.spongepowered.api.entity.EntityType)2 Listener (org.spongepowered.api.event.Listener)2 CommandBase (org.cubeengine.butler.CommandBase)1 CommandPermission (org.cubeengine.libcube.service.command.annotation.CommandPermission)1 PermissionManager (org.cubeengine.libcube.service.permission.PermissionManager)1 RulebookCommands (org.cubeengine.module.rulebook.bookManagement.RulebookCommands)1 RulebookManager (org.cubeengine.module.rulebook.bookManagement.RulebookManager)1 CommandMapping (org.spongepowered.api.command.CommandMapping)1 EntityArchetype (org.spongepowered.api.entity.EntityArchetype)1 ItemStack (org.spongepowered.api.item.inventory.ItemStack)1 WeightedTable (org.spongepowered.api.util.weighted.WeightedTable)1 World (org.spongepowered.api.world.World)1