forked from StarOpenSource/Engine
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
|
||||
*/
|
||||
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));
|
||||
if (event != LogEvent.class)
|
||||
logCall(event);
|
||||
|
||||
Runnable eventCode = () -> {
|
||||
for (ReflectionMethod method : getAnnotatedMethods(event)) {
|
||||
try {
|
||||
method.invoke(arguments);
|
||||
|
|
Loading…
Reference in a new issue