mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:58:35 +00:00
some codestyle application
This commit is contained in:
@ -68,9 +68,11 @@ class Int2BaseBlockMap extends AbstractInt2ObjectMap<BaseBlock> {
|
||||
}
|
||||
|
||||
private final Int2IntMap commonMap = new Int2IntOpenHashMap(64, 0.9f);
|
||||
|
||||
{
|
||||
commonMap.defaultReturnValue(BlockStateIdAccess.invalidId());
|
||||
}
|
||||
|
||||
private final Int2ObjectMap<BaseBlock> uncommonMap = new Int2ObjectOpenHashMap<>(1, 0.75f);
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,12 @@ class AnnotatedSubscriberFinder implements SubscriberFindingStrategy {
|
||||
throw new IllegalArgumentException("Method " + method + " failed to unreflect.", e);
|
||||
}
|
||||
|
||||
EventHandler handler = new MethodHandleEventHandler(annotation.priority(), listener, handle, method.getName());
|
||||
EventHandler handler = new MethodHandleEventHandler(
|
||||
annotation.priority(),
|
||||
listener,
|
||||
handle,
|
||||
method.getName()
|
||||
);
|
||||
methodsInListener.put(eventType, handler);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class MethodEventHandler extends EventHandler {
|
||||
* Create a new event handler.
|
||||
*
|
||||
* @param priority the priority
|
||||
* @param method the method
|
||||
* @param method the method
|
||||
*/
|
||||
public MethodEventHandler(Priority priority, Object object, Method method) {
|
||||
super(priority);
|
||||
@ -83,4 +83,5 @@ public class MethodEventHandler extends EventHandler {
|
||||
result = 31 * result + method.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ public class MethodHandleEventHandler extends EventHandler {
|
||||
/**
|
||||
* Create a new event handler that uses MethodHandles to dispatch.
|
||||
*
|
||||
* @param priority the priority
|
||||
* @param object The object to invoke it on
|
||||
* @param priority the priority
|
||||
* @param object The object to invoke it on
|
||||
* @param methodHandle The handle to invoke
|
||||
* @param methodName The name of the method (for equality checks)
|
||||
* @param methodName The name of the method (for equality checks)
|
||||
*/
|
||||
protected MethodHandleEventHandler(Priority priority, Object object, MethodHandle methodHandle, String methodName) {
|
||||
super(priority);
|
||||
@ -79,4 +79,5 @@ public class MethodHandleEventHandler extends EventHandler {
|
||||
|
||||
return Objects.equals(object, that.object);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user