本文整理了Java中org.bukkit.command.Command.setPermission()
方法的一些代码示例,展示了Command.setPermission()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Command.setPermission()
方法的具体详情如下:
包路径:org.bukkit.command.Command
类名称:Command
方法名:setPermission
[英]Sets the permission required by users to be able to perform this command
[中]设置用户执行此命令所需的权限
代码示例来源:origin: EngineHub/WorldEdit
public void setPermissions(String[] permissions) {
this.permissions = permissions;
if (permissions != null) {
super.setPermission(StringUtil.joinString(permissions, ";"));
}
}
代码示例来源:origin: Bukkit/Bukkit
newCmd.setPermission(permission.toString());
代码示例来源:origin: NoCheatPlus/NoCheatPlus
public void restore() {
// (Don't skip resetting, as there could be fall-back aliases.)
// Command registered = CommandUtil.getCommand(label);
// if (registered == null || registered != command) return;
if (!label.equalsIgnoreCase(command.getLabel().trim().toLowerCase())) {
command.setLabel(label);
}
command.setPermission(permission);
if (permission != null && permissionDefault != null) {
Permission perm = Bukkit.getPluginManager().getPermission(permission);
if (perm != null && perm.getDefault() != permissionDefault) {
perm.setDefault(permissionDefault);
}
}
command.setPermissionMessage(permissionMessage);
}
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public MCCommand setPermission(String perm) {
cmd.setPermission(perm);
return this;
}
代码示例来源:origin: SpigotMC/Spigot-API
newCmd.setPermission(permission.toString());
代码示例来源:origin: OvercastNetwork/sk89q-command-framework
public void setPermissions(String[] permissions) {
this.permissions = permissions;
if (permissions != null) {
super.setPermission(StringUtil.joinString(permissions, ";"));
}
}
代码示例来源:origin: NoCheatPlus/NoCheatPlus
command.setPermission(cmdPermName);
cmdHadPerm = false;
内容来源于网络,如有侵权,请联系作者删除!