Пример #1
0
  public static void devadminChatMessage(
      CommandSender sender, String message, boolean senderIsConsole) {
    String name =
        sender.getName() + " " + TFM_PlayerRank.fromSender(sender).getPrefix() + ChatColor.WHITE;
    TFM_Log.info("[Dev-Chat] " + name + ": " + message);

    for (Player player : Bukkit.getOnlinePlayers()) {
      if (!TFM_Util.DEVELOPERS.contains(sender.getName())) {
        player.sendMessage(
            "["
                + ChatColor.DARK_GREEN
                + "Dev-Chat"
                + ChatColor.WHITE
                + "] "
                + ChatColor.DARK_RED
                + name
                + ": "
                + ChatColor.GOLD
                + message);
      }
    }
  }
Пример #2
0
  public static void adminChatMessage(
      CommandSender sender, String message, boolean senderIsConsole) {
    String name =
        sender.getName() + " " + TFM_PlayerRank.fromSender(sender).getPrefix() + ChatColor.WHITE;
    TFM_Log.info("[ADMIN] " + name + ": " + message);

    for (Player player : Bukkit.getOnlinePlayers()) {
      if (TFM_AdminList.isSuperAdmin(player)) {
        player.sendMessage(
            "["
                + ChatColor.AQUA
                + "ADMIN"
                + ChatColor.WHITE
                + "] "
                + ChatColor.DARK_RED
                + name
                + ": "
                + ChatColor.AQUA
                + message);
      }
    }
  }