11package fr .sandro642 .github ;
22
3- import fr .sandro642 .github .enums .LangType ;
3+ import fr .sandro642 .github .enums .MethodType ;
4+ import fr .sandro642 .github .enums .lang .CategoriesType ;
45import fr .sandro642 .github .hook .HookManager ;
56import fr .sandro642 .github .hook .LangSupport ;
67import fr .sandro642 .github .hook .MCSupport ;
@@ -38,7 +39,7 @@ public class ConnectLib {
3839 * @param resourceType the type of resource to initialize
3940 * @param routes the routes to be used in the ConnectLib
4041 */
41- public static void initialize (ResourceType resourceType , LangType langType , Class <? extends Enum <?>>... routes ) {
42+ public static void initialize (ResourceType resourceType , MethodType . LangType langType , Class <? extends Enum <?>>... routes ) {
4243 try {
4344 logger = new Logger ();
4445 storeAndRetrieve = new StoreAndRetrieve ();
@@ -54,7 +55,7 @@ public static void initialize(ResourceType resourceType, LangType langType, Clas
5455 Map <Enum <?>, String > routesEnums = new HashMap <>();
5556 for (Class <? extends Enum <?>> route : routes ) {
5657 if (route == null ) {
57- ConnectLib .Logger ().ERROR (langManager .getMessage ("connectlib.class" , "initialise.routeclass" ));
58+ ConnectLib .Logger ().ERROR (langManager .getMessage (CategoriesType . CONNECTLIB_CLASS , "initialise.routeclass" ));
5859 continue ;
5960 }
6061 routesEnums .putAll (EnumLoader .convertRouteImport (route ));
@@ -73,7 +74,7 @@ public static void initialize(ResourceType resourceType, LangType langType, Clas
7374 ConnectLib .routes .putAll (yamlRoutes );
7475 }
7576 } catch (Exception e ) {
76- ConnectLib .Logger ().ERROR (langManager .getMessage ("connectlib.class" , "initialise.catcherror" , Map .of ("exception" , e .getMessage ())));
77+ ConnectLib .Logger ().ERROR (langManager .getMessage (CategoriesType . CONNECTLIB_CLASS , "initialise.catcherror" , Map .of ("exception" , e .getMessage ())));
7778 }
7879 }
7980
@@ -86,7 +87,7 @@ public static String getRoute(String routeName) {
8687 if (routes .containsKey (routeName )) {
8788 return routes .get (routeName );
8889 } else {
89- ConnectLib .Logger ().ERROR (langManager .getMessage ("connectlib.class" , "getroute.error" , Map .of ("route" , routeName )));
90+ ConnectLib .Logger ().ERROR (langManager .getMessage (CategoriesType . CONNECTLIB_CLASS , "getroute.error" , Map .of ("route" , routeName )));
9091 return null ;
9192 }
9293 }
0 commit comments