forked from SteamWar/SteamWar
Merge branch 'KotlinCore/message-update' into TNTLeague/finish
This commit is contained in:
@@ -26,9 +26,9 @@ tasks.compileJava {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(":CommonCore"))
|
||||
compileOnly(project(":CommandFramework"))
|
||||
compileOnly(project(":SpigotCore:CRIUDummy"))
|
||||
compileOnly(project(":CommonCore", "default"))
|
||||
compileOnly(project(":CommandFramework", "default"))
|
||||
compileOnly(project(":SpigotCore:CRIUDummy", "default"))
|
||||
|
||||
compileOnly(libs.worldedit12)
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@@ -102,7 +103,7 @@ public class TinyProtocol implements Listener {
|
||||
}
|
||||
|
||||
public void addFilter(Class<?> packetType, BiFunction<Player, Object, Object> filter) {
|
||||
packetFilters.computeIfAbsent(packetType, c -> Collections.synchronizedList(new ArrayList<>(1))).add(filter);
|
||||
packetFilters.computeIfAbsent(packetType, c -> new CopyOnWriteArrayList<>()).add(filter);
|
||||
}
|
||||
|
||||
public void removeFilter(Class<?> packetType, BiFunction<Player, Object, Object> filter) {
|
||||
|
||||
Reference in New Issue
Block a user