mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
Update event to 3.0.0
This commit is contained in:
parent
68ec6e2a37
commit
fec87d4c6a
@ -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')
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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<P> 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<P> implements EventBus, AutoCloseable {
|
||||
|
||||
private static final class Bus extends SimpleEventBus<LuckPermsEvent> {
|
||||
|
||||
@Override
|
||||
public void unregisterMatching(@Nonnull Predicate<EventSubscriber<?>> predicate) {
|
||||
super.unregisterMatching(predicate);
|
||||
}
|
||||
|
||||
public void unregisterAll() {
|
||||
super.unregisterAll();
|
||||
public Bus() {
|
||||
super(LuckPermsEvent.class);
|
||||
}
|
||||
|
||||
public <T extends LuckPermsEvent> Set<EventHandler<T>> getHandlers(Class<T> eventClass) {
|
||||
|
Loading…
Reference in New Issue
Block a user