All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bukkit.util.permissions.CommandPermissions Maven / Gradle / Ivy

package org.bukkit.util.permissions;

import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionDefault;

public final class CommandPermissions {
  private static final String ROOT = "bukkit.command";
  private static final String PREFIX = ROOT + ".";

  private CommandPermissions() {
  }

  public static Permission registerPermissions(Permission parent) {
    Permission commands = DefaultPermissions.registerPermission(ROOT, "Gives the user the ability to use all CraftBukkit commands", parent);

    DefaultPermissions.registerPermission(PREFIX + "help", "Allows the user to view the vanilla help menu", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "plugins", "Allows the user to view the list of plugins running on this server", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "reload", "Allows the user to reload the server settings", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "version", "Allows the user to view the version of the server", PermissionDefault.TRUE, commands);

    commands.recalculatePermissibles();
    return commands;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy