mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Fix event registration and listener subscriptions (#251)
Co-authored-by: Riley Park <[email protected]>
This commit is contained in:
1 parent
c716fcac3b
commit
9cb0795379
17 files changed
+61
-92
No files matched your search
@@ -49,7 +49,7 @@ public interface CarbonEventHandler {
|
||||
* Includes extra values to control when the consumer is executed.
|
||||
*
|
||||
* @param eventClass the class to listen for
|
||||
* @param priority the priority of the consumer
|
||||
* @param order the order of the consumer
|
||||
* @param acceptsCancelled if the consumer should be executed if the event is cancelled early
|
||||
* @param consumer the consumer that's executed when the event is emitted
|
||||
* @param <T> the class to listen for
|
||||
@@ -58,7 +58,7 @@ public interface CarbonEventHandler {
|
||||
*/
|
||||
<T extends CarbonEvent> EventSubscription<T> subscribe(
|
||||
final Class<T> eventClass,
|
||||
final int priority,
|
||||
final int order,
|
||||
final boolean acceptsCancelled,
|
||||
final Consumer<T> consumer
|
||||
);
|
||||
|
||||
@@ -22,7 +22,6 @@ package net.draycia.carbon.api.users;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.util.InventorySlot;
|
||||
@@ -34,7 +33,6 @@ import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Generic abstraction for players.
|
||||
|
||||
Reference in new issue
Block a user