Move logCall() invocation outside of Runnable
This ensures debug log messages are kept in order
This commit is contained in:
parent
e8b9642177
commit
f3acca7456
1 changed files with 4 additions and 4 deletions
|
@ -143,11 +143,11 @@ public class EventHelper {
|
||||||
* @since v1-alpha0
|
* @since v1-alpha0
|
||||||
*/
|
*/
|
||||||
public static void invokeAnnotatedMethods(@NotNull Class<? extends Event> event, Object... arguments) {
|
public static void invokeAnnotatedMethods(@NotNull Class<? extends Event> event, Object... arguments) {
|
||||||
Runnable eventCode = () -> {
|
|
||||||
LoggerInstance logger = new LoggerInstance(new LogIssuer(EventHelper.class, event.getName(), CodePart.ENGINE));
|
LoggerInstance logger = new LoggerInstance(new LogIssuer(EventHelper.class, event.getName(), CodePart.ENGINE));
|
||||||
if (event != LogEvent.class)
|
if (event != LogEvent.class)
|
||||||
logCall(event);
|
logCall(event);
|
||||||
|
|
||||||
|
Runnable eventCode = () -> {
|
||||||
for (ReflectionMethod method : getAnnotatedMethods(event)) {
|
for (ReflectionMethod method : getAnnotatedMethods(event)) {
|
||||||
try {
|
try {
|
||||||
method.invoke(arguments);
|
method.invoke(arguments);
|
||||||
|
|
Loading…
Reference in a new issue