org.bukkit.command.Command.setPermissionMessage()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.bukkit.command.Command.setPermissionMessage()方法的一些代码示例,展示了Command.setPermissionMessage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Command.setPermissionMessage()方法的具体详情如下:
包路径:org.bukkit.command.Command
类名称:Command
方法名:setPermissionMessage

Command.setPermissionMessage介绍

[英]Sets the message sent when a permission check fails
[中]设置权限检查失败时发送的消息

代码示例

代码示例来源:origin: Bukkit/Bukkit

newCmd.setPermissionMessage(permissionMessage.toString());

代码示例来源:origin: EngineHub/CommandHelper

@Override
public MCCommand setPermissionMessage(String permmsg) {
  cmd.setPermissionMessage(permmsg);
  return this;
}

代码示例来源:origin: SpigotMC/Spigot-API

newCmd.setPermissionMessage(permissionMessage.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: NoCheatPlus/NoCheatPlus

command.setPermissionMessage(permissionMessage);

相关文章