Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Small clean-ups in event manager.
Dieser Commit ist enthalten in:
Ursprung
4eb02c8d38
Commit
ffa78d2a92
@ -33,8 +33,9 @@ class EventTypeTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Collection<Class<?>> getFriendsOf(final Class<?> eventType) {
|
public Collection<Class<?>> getFriendsOf(final Class<?> eventType) {
|
||||||
if (friends.containsKey(eventType)) {
|
ImmutableSet<Class<?>> existingFriends = friends.get(eventType);
|
||||||
return friends.get(eventType);
|
if (existingFriends != null) {
|
||||||
|
return existingFriends;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Collection<Class<?>> types = getEventTypes(eventType);
|
final Collection<Class<?>> types = getEventTypes(eventType);
|
||||||
|
@ -156,17 +156,6 @@ public class VelocityEventManager implements EventManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum AsyncType {
|
|
||||||
/**
|
|
||||||
* The complete event will be handled on an async thread.
|
|
||||||
*/
|
|
||||||
ALWAYS,
|
|
||||||
/**
|
|
||||||
* The event will never run async, everything is handled on the netty thread.
|
|
||||||
*/
|
|
||||||
NEVER
|
|
||||||
}
|
|
||||||
|
|
||||||
static final class HandlersCache {
|
static final class HandlersCache {
|
||||||
|
|
||||||
final HandlerRegistration[] handlers;
|
final HandlerRegistration[] handlers;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren