1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +02:00

Mod Logs command, change chat and menu colors

This commit is contained in:
Shy
2024-06-08 18:44:56 +02:00
parent 582f1c41bf
commit b0cc014154
6 changed files with 117 additions and 17 deletions
@@ -4,6 +4,7 @@ import de.shiewk.smoderation.punishments.Punishment;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
@@ -39,6 +40,16 @@ public class PunishmentContainer {
return null;
}
public @NotNull List<Punishment> findAll(Predicate<Punishment> predicate){
List<Punishment> found = new ArrayList<>();
for (Punishment punishment : new CopyOnWriteArrayList<>(punishments)) {
if (predicate.test(punishment)){
found.add(punishment);
}
}
return found;
}
public List<CommandSender> collectBroadcastTargets(){
ArrayList<CommandSender> senders = new ArrayList<>();
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {