diff --git a/common/build.gradle b/common/build.gradle index 95571e8c..77586357 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -7,7 +7,7 @@ dependencies { exclude(module: 'guava') exclude(module: 'gson') } - compile('net.kyori:event-api:2.0.2') { + compile('net.kyori:event-api:3.0.0') { exclude(module: 'checker-qual') exclude(module: 'guava') } diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java index 0e4142c4..13caeea3 100644 --- a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java +++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java @@ -70,8 +70,8 @@ public enum Dependency { EVENT( "net{}kyori", "event-api", - "2.0.2", - "+69FXQhgPlBtg/OvEiB+hvpbdGyUquj4cORHV1gnN1w=", + "3.0.0", + "yjvdTdAyktl3iFEQFLHC3qYwwt7/DbCd7Zc8Q4SlIag=", Relocation.of("eventbus", "net{}kyori{}event") ), CAFFEINE( diff --git a/common/src/main/java/me/lucko/luckperms/common/event/AbstractEventBus.java b/common/src/main/java/me/lucko/luckperms/common/event/AbstractEventBus.java index 591ce1ee..77fa84ba 100644 --- a/common/src/main/java/me/lucko/luckperms/common/event/AbstractEventBus.java +++ b/common/src/main/java/me/lucko/luckperms/common/event/AbstractEventBus.java @@ -31,13 +31,11 @@ import me.lucko.luckperms.api.event.LuckPermsEvent; import me.lucko.luckperms.common.api.LuckPermsApiProvider; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; -import net.kyori.event.EventSubscriber; import net.kyori.event.SimpleEventBus; import java.util.Objects; import java.util.Set; import java.util.function.Consumer; -import java.util.function.Predicate; import java.util.stream.Collectors; import javax.annotation.Nonnull; @@ -137,7 +135,7 @@ public abstract class AbstractEventBus
implements EventBus, AutoCloseable { * @param plugin the plugin */ protected void unregisterHandlers(P plugin) { - this.bus.unregisterMatching(sub -> ((LuckPermsEventHandler) sub).getPlugin() == plugin); + this.bus.unregister(sub -> ((LuckPermsEventHandler) sub).getPlugin() == plugin); } @Override @@ -147,13 +145,8 @@ public abstract class AbstractEventBus
implements EventBus, AutoCloseable {
private static final class Bus extends SimpleEventBus