1 package net.mograsim.plugin;
3 import java.util.Collection;
4 import java.util.HashSet;
6 import java.util.function.Consumer;
10 public static Set<String> ops = new HashSet<>();
11 public static Set<Consumer<Set<String>>> listeners = new HashSet<>();
21 public static void setWords(Collection<String> s)
23 if (ops.size() == s.size() && ops.containsAll(s))
30 public static void addListener(Consumer<Set<String>> con)
36 public static void removeListener(Consumer<Set<String>> con)
38 listeners.remove(con);
41 public static void update()
43 listeners.forEach(c -> c.accept(ops));