package com.tvd12.ezyfox.core.util;

import static com.tvd12.ezyfox.core.util.EzyEventHandlerAnnotations.getHandlerPriority;

import java.util.List;

public final class EzyEventHandlerLists {

    private EzyEventHandlerLists() {}
    
    public static void sortEventHandlersByPriority(List<Object> handlers) {
        handlers.sort((a, b) ->
            getHandlerPriority(a) - getHandlerPriority(b)
        );
    }
}

@@ -41,90 +41,30 @@
 ort 
-static com.tvd12.ezyfox.core.util.EzyEventHandlerAnnotations.getHandlerPriority
+java.util.Comparator
 ;%0A
-%0A
 impo
@@ -168,13 +168,9 @@
  %7B%7D%0A
-    
 %0A
+
     
@@ -267,54 +267,60 @@
 ort(
-(a, b) -%3E%0A            getHandlerPriority(a) - 
+Comparator.comparingInt(EzyEventHandlerAnnotations::
 getH
@@ -337,20 +337,9 @@
 rity
-(b)%0A        
+)
 );%0A 

fix comparator in sortEventHandlersByPriority