Package org.bukkit.permissions

Examples of org.bukkit.permissions.Permission


        Permission perm = registerPermission(new Permission(name, desc));
        return perm;
    }

    public static Permission registerPermission(String name, String desc, Permission parent) {
        Permission perm = registerPermission(name, desc);
        parent.getChildren().put(perm.getName(), true);
        return perm;
    }
View Full Code Here


        parent.getChildren().put(perm.getName(), true);
        return perm;
    }

    public static Permission registerPermission(String name, String desc, PermissionDefault def) {
        Permission perm = registerPermission(new Permission(name, desc, def));
        return perm;
    }
View Full Code Here

        Permission perm = registerPermission(new Permission(name, desc, def));
        return perm;
    }

    public static Permission registerPermission(String name, String desc, PermissionDefault def, Permission parent) {
        Permission perm = registerPermission(name, desc, def);
        parent.getChildren().put(perm.getName(), true);
        return perm;
    }
View Full Code Here

        parent.getChildren().put(perm.getName(), true);
        return perm;
    }

    public static Permission registerPermission(String name, String desc, PermissionDefault def, Map<String, Boolean> children) {
        Permission perm = registerPermission(new Permission(name, desc, def, children));
        return perm;
    }
View Full Code Here

        Permission perm = registerPermission(new Permission(name, desc, def, children));
        return perm;
    }

    public static Permission registerPermission(String name, String desc, PermissionDefault def, Map<String, Boolean> children, Permission parent) {
        Permission perm = registerPermission(name, desc, def, children);
        parent.getChildren().put(perm.getName(), true);
        return perm;
    }
View Full Code Here

        parent.getChildren().put(perm.getName(), true);
        return perm;
    }

    public static void registerCorePermissions() {
        Permission parent = registerPermission(ROOT, "Gives the user the ability to use all CraftBukkit utilities and commands");

        CommandPermissions.registerPermissions(parent);
        BroadcastPermissions.registerPermissions(parent);

        parent.recalculatePermissibles();
    }
View Full Code Here

    private static final String PREFIX = ROOT + ".";

    private BroadcastPermissions() {}

    public static Permission registerPermissions(Permission parent) {
        Permission broadcasts = DefaultPermissions.registerPermission(ROOT, "Allows the user to receive all broadcast messages", parent);

        DefaultPermissions.registerPermission(PREFIX + "admin", "Allows the user to receive administrative broadcasts", PermissionDefault.OP, broadcasts);
        DefaultPermissions.registerPermission(PREFIX + "user", "Allows the user to receive user broadcasts", PermissionDefault.TRUE, broadcasts);

        broadcasts.recalculatePermissibles();

        return broadcasts;
    }
View Full Code Here

    private static final String PREFIX = ROOT + ".";

    private CommandPermissions() {}

    private static Permission registerWhitelist(Permission parent) {
        Permission whitelist = DefaultPermissions.registerPermission(PREFIX + "whitelist", "Allows the user to modify the server whitelist", PermissionDefault.OP, parent);

        DefaultPermissions.registerPermission(PREFIX + "whitelist.add", "Allows the user to add a player to the server whitelist", whitelist);
        DefaultPermissions.registerPermission(PREFIX + "whitelist.remove", "Allows the user to remove a player from the server whitelist", whitelist);
        DefaultPermissions.registerPermission(PREFIX + "whitelist.reload", "Allows the user to reload the server whitelist", whitelist);
        DefaultPermissions.registerPermission(PREFIX + "whitelist.enable", "Allows the user to enable the server whitelist", whitelist);
        DefaultPermissions.registerPermission(PREFIX + "whitelist.disable", "Allows the user to disable the server whitelist", whitelist);
        DefaultPermissions.registerPermission(PREFIX + "whitelist.list", "Allows the user to list all the users on the server whitelist", whitelist);

        whitelist.recalculatePermissibles();

        return whitelist;
    }
View Full Code Here

        return whitelist;
    }

    private static Permission registerBan(Permission parent) {
        Permission ban = DefaultPermissions.registerPermission(PREFIX + "ban", "Allows the user to ban people", PermissionDefault.OP, parent);

        DefaultPermissions.registerPermission(PREFIX + "ban.player", "Allows the user to ban players", ban);
        DefaultPermissions.registerPermission(PREFIX + "ban.ip", "Allows the user to ban IP addresses", ban);

        ban.recalculatePermissibles();

        return ban;
    }
View Full Code Here

        return ban;
    }

    private static Permission registerUnban(Permission parent) {
        Permission unban = DefaultPermissions.registerPermission(PREFIX + "unban", "Allows the user to unban people", PermissionDefault.OP, parent);

        DefaultPermissions.registerPermission(PREFIX + "unban.player", "Allows the user to unban players", unban);
        DefaultPermissions.registerPermission(PREFIX + "unban.ip", "Allows the user to unban IP addresses", unban);

        unban.recalculatePermissibles();

        return unban;
    }
View Full Code Here

TOP

Related Classes of org.bukkit.permissions.Permission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.