mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 20:55:41 +01:00
Make list mutable.
This commit is contained in:
parent
8e40bf9dcf
commit
0f89de6c2a
@ -4,6 +4,7 @@ import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
@ -77,7 +78,7 @@ public class SettingsTab implements Tab, ClickHandler {
|
||||
List<Flag> flags = plugin.getFlagsManager().getFlags().stream().filter(f -> f.getType().equals(type))
|
||||
// We're stripping colors to avoid weird sorting issues
|
||||
.sorted(Comparator.comparing(flag -> ChatColor.stripColor(user.getTranslation(flag.getNameReference()))))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
// Remove any that are not for this game mode
|
||||
plugin.getIWM().getAddon(world).ifPresent(gm -> flags.removeIf(f -> !f.getGameModes().isEmpty() && !f.getGameModes().contains(gm)));
|
||||
// Remove any that are the wrong rank or that will be on the top row
|
||||
|
Loading…
Reference in New Issue
Block a user