org.bukkit.Bukkit.broadcast()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(211)

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

Bukkit.broadcast介绍

暂无

代码示例

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

@Override
public void broadcastNotification(String message) {
  Bukkit.broadcast(message, "worldguard.notify");
  Set<Permissible> subs = Bukkit.getPluginManager().getPermissionSubscriptions("worldguard.notify");
  for (Player player : Bukkit.getServer().getOnlinePlayers()) {
    if (!(subs.contains(player) && player.hasPermission("worldguard.notify")) &&
        WorldGuardPlugin.inst().hasPermission(player, "worldguard.notify")) { // Make sure the player wasn't already broadcasted to.
      player.sendMessage(message);
    }
  }
  WorldGuard.logger.info(message);
}

代码示例来源:origin: Dytanic/CloudNet

CloudAPI.getInstance().dispatchConsoleMessage("In order to prevent issues, the name (+ tagID) of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!");
CloudAPI.getInstance().dispatchConsoleMessage("Please fix this issue by changing the name of the group in your perms.yml");
Bukkit.broadcast("In order to prevent issues, the name (+ tagID) of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!", "cloudnet.notify");
Bukkit.broadcast("Please fix this issue by changing the name of the group in your perms.yml", "cloudnet.notify");
CloudAPI.getInstance().dispatchConsoleMessage("In order to prevent issues, the prefix of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!");
CloudAPI.getInstance().dispatchConsoleMessage("Please fix this issue by changing the prefix in your perms.yml");
Bukkit.broadcast("In order to prevent issues, the prefix of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!", "cloudnet.notify");
Bukkit.broadcast("Please fix this issue by changing the prefix in your perms.yml", "cloudnet.notify");
CloudAPI.getInstance().dispatchConsoleMessage("In order to prevent issues, the suffix of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!");
CloudAPI.getInstance().dispatchConsoleMessage("Please fix this issue by changing the suffix in your perms.yml");
Bukkit.broadcast("In order to prevent issues, the suffix of the group " + permissionGroup.getName() + " was temporarily shortened to 16 characters!", "cloudnet.notify");
Bukkit.broadcast("Please fix this issue by changing the suffix in your perms.yml", "cloudnet.notify");

相关文章