001 package org.bukkit.util.permissions; 002 003 import org.bukkit.permissions.Permission; 004 import org.bukkit.permissions.PermissionDefault; 005 006 public final class BroadcastPermissions { 007 private static final String ROOT = "bukkit.broadcast"; 008 private static final String PREFIX = ROOT + "."; 009 010 private BroadcastPermissions() {} 011 012 public static Permission registerPermissions(Permission parent) { 013 Permission broadcasts = DefaultPermissions.registerPermission(ROOT, "Allows the user to receive all broadcast messages", parent); 014 015 DefaultPermissions.registerPermission(PREFIX + "admin", "Allows the user to receive administrative broadcasts", PermissionDefault.OP, broadcasts); 016 DefaultPermissions.registerPermission(PREFIX + "user", "Allows the user to receive user broadcasts", PermissionDefault.TRUE, broadcasts); 017 018 broadcasts.recalculatePermissibles(); 019 020 return broadcasts; 021 } 022 }