66import fr .traqueur .recipes .impl .domains .recipes .RecipeConfiguration ;
77import fr .traqueur .recipes .impl .updater .Updater ;
88import org .bukkit .configuration .file .YamlConfiguration ;
9+ import org .bukkit .plugin .Plugin ;
910import org .bukkit .plugin .java .JavaPlugin ;
1011
1112import java .io .File ;
@@ -29,7 +30,7 @@ public final class RecipesAPI {
2930 /**
3031 * The plugin instance
3132 */
32- private final JavaPlugin plugin ;
33+ private final Plugin plugin ;
3334
3435 /**
3536 * If the debug mode is enabled
@@ -46,7 +47,7 @@ public final class RecipesAPI {
4647 * @param plugin The plugin instance
4748 * @param debug If the debug mode is enabled
4849 */
49- public RecipesAPI (JavaPlugin plugin , boolean debug ) {
50+ public RecipesAPI (Plugin plugin , boolean debug ) {
5051 this (plugin , debug , true );
5152 }
5253
@@ -56,7 +57,7 @@ public RecipesAPI(JavaPlugin plugin, boolean debug) {
5657 * @param debug If the debug mode is enabled
5758 * @param enableYmlSupport If the yml support is enabled
5859 */
59- public RecipesAPI (JavaPlugin plugin , boolean debug , boolean enableYmlSupport ) {
60+ public RecipesAPI (Plugin plugin , boolean debug , boolean enableYmlSupport ) {
6061 this .debug = debug ;
6162 this .plugin = plugin ;
6263 this .recipes = new ArrayList <>();
@@ -77,7 +78,7 @@ public RecipesAPI(JavaPlugin plugin, boolean debug, boolean enableYmlSupport) {
7778
7879 if (this .debug ) {
7980 Hook .HOOKS .stream ()
80- .filter (hook -> hook . isEnable ( plugin ) )
81+ .filter (Hook :: isEnable )
8182 .forEach (hook -> this .plugin .getLogger ().info ("Hook enabled: " + hook .getPluginName ()));
8283
8384 Updater .update ("RecipesAPI" );
@@ -134,7 +135,7 @@ private void addConfiguredRecipes(File recipeFolder) {
134135 */
135136 private void loadRecipe (File file ) {
136137 YamlConfiguration configuration = YamlConfiguration .loadConfiguration (file );
137- var recipe = new RecipeConfiguration (this . plugin , file .getName ().replace (".yml" , "" ), configuration )
138+ var recipe = new RecipeConfiguration (file .getName ().replace (".yml" , "" ), configuration )
138139 .build ();
139140 this .addRecipe (recipe );
140141 }
@@ -190,7 +191,7 @@ public List<ItemRecipe> getRecipes() {
190191 * Get the plugin instance
191192 * @return The plugin instance
192193 */
193- public JavaPlugin getPlugin () {
194+ public Plugin getPlugin () {
194195 return plugin ;
195196 }
196197
0 commit comments