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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user