Spigot nvd ClearChat 1.1

Clear your chat with this small, efficient, and reliable tool!

  1. devonzimmi submitted a new resource:

    nvd ClearChat - Clear your chat with this small, efficient, and reliable tool!

    Read more about this resource...
     
  2. Code (Text):

    final HashSet<Player> allPlayers = new HashSet<Player>(Bukkit.getOnlinePlayers());
    allPlayers.forEach(player -> {
        if (!this.main.getConfig().getString("ClearChat.ClearMessage").isEmpty()) {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', this.main.getConfig().getString("ClearChat.ClearMessage")));
        }
       return;
    });
     
    can be replaced with
    Code (Text):

    for(Player player : Bukkit.getOnlinePlayers()) {
        if (!this.main.getConfig().getString("ClearChat.ClearMessage").isEmpty()) {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', this.main.getConfig().getString("ClearChat.ClearMessage")));
        }
    }
     
     
    • Informative Informative x 1
  3. I will be changing this, thank you! :)