mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Rename Priority to PostOrder
This commit is contained in:
parent
30303d5f16
commit
2277b98dfd
4 changed files with 14 additions and 17 deletions
|
@ -47,7 +47,7 @@ public class GeyserEventBus implements EventBus {
|
|||
@NonNull
|
||||
@Override
|
||||
public <T extends Event> EventSubscription<T> subscribe(@NonNull Extension extension, @NonNull Class<T> eventClass, @NonNull Consumer<? super T> consumer) {
|
||||
return this.subscribe(eventClass, consumer, extension, Subscribe.Priority.NORMAL);
|
||||
return this.subscribe(eventClass, consumer, extension, Subscribe.PostOrder.NORMAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,7 +78,7 @@ public class GeyserEventBus implements EventBus {
|
|||
} catch (IllegalAccessException | InvocationTargetException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}, extension, subscribe.priority());
|
||||
}, extension, subscribe.postOrder());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,8 @@ public class GeyserEventBus implements EventBus {
|
|||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
private <T extends Event> EventSubscription<T> subscribe(Class<T> eventClass, Consumer<? super T> handler, Extension extension, Subscribe.Priority priority) {
|
||||
GeyserEventSubscription<T> eventSubscription = new GeyserEventSubscription<>(this, eventClass, handler, extension, priority);
|
||||
private <T extends Event> EventSubscription<T> subscribe(Class<T> eventClass, Consumer<? super T> handler, Extension extension, Subscribe.PostOrder postOrder) {
|
||||
GeyserEventSubscription<T> eventSubscription = new GeyserEventSubscription<>(this, eventClass, handler, extension, postOrder);
|
||||
this.bus.register(eventClass, eventSubscription);
|
||||
return eventSubscription;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class GeyserEventSubscription<T extends Event> implements EventSubscripti
|
|||
private final Class<T> eventClass;
|
||||
private final Consumer<? super T> eventConsumer;
|
||||
private final Extension owner;
|
||||
private final Subscribe.Priority priority;
|
||||
private final Subscribe.PostOrder order;
|
||||
@Getter(AccessLevel.NONE) private boolean active;
|
||||
|
||||
@Override
|
||||
|
@ -77,6 +77,6 @@ public class GeyserEventSubscription<T extends Event> implements EventSubscripti
|
|||
|
||||
@Override
|
||||
public int postOrder() {
|
||||
return this.priority.postOrder();
|
||||
return this.order.postOrder();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue