1010import org .bukkit .inventory .ItemStack ;
1111import org .bukkit .plugin .java .JavaPlugin ;
1212
13+ import io .github .thebusybiscuit .slimefun4 .api .items .ItemGroup ;
14+ import io .github .thebusybiscuit .slimefun4 .api .items .SlimefunItem ;
15+ import io .github .thebusybiscuit .slimefun4 .api .items .SlimefunItemStack ;
16+ import io .github .thebusybiscuit .slimefun4 .api .recipes .RecipeType ;
17+ import io .github .thebusybiscuit .slimefun4 .api .researches .Research ;
1318import io .github .thebusybiscuit .slimefun4 .api .SlimefunAddon ;
14- import io .github .thebusybiscuit .slimefun4 .core .researching .Research ;
19+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .collections .Pair ;
20+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .config .Config ;
21+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .items .CustomItemStack ;
22+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .updater .GitHubBuildsUpdater ;
1523import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunItems ;
1624import io .github .thebusybiscuit .slimefun4 .utils .ChatUtils ;
17- import me .mrCookieSlime .Slimefun .Lists .RecipeType ;
18- import me .mrCookieSlime .Slimefun .Objects .Category ;
19- import me .mrCookieSlime .Slimefun .Objects .SlimefunItem .SlimefunItem ;
20- import me .mrCookieSlime .Slimefun .api .SlimefunItemStack ;
21- import me .mrCookieSlime .Slimefun .cscorelib2 .collections .Pair ;
22- import me .mrCookieSlime .Slimefun .cscorelib2 .config .Config ;
23- import me .mrCookieSlime .Slimefun .cscorelib2 .item .CustomItem ;
24- import me .mrCookieSlime .Slimefun .cscorelib2 .updater .GitHubBuildsUpdater ;
2525
2626public class ExtraGear extends JavaPlugin implements SlimefunAddon {
2727
2828 private int researchId = 3300 ;
29- private Category category ;
29+ private ItemGroup itemGroup ;
3030
3131 @ Override
3232 public void onEnable () {
3333 Config cfg = new Config (this );
3434
35- if (cfg .getBoolean ("options.auto-update" )) {
35+ if (cfg .getBoolean ("options.auto-update" ) && getDescription (). getVersion (). startsWith ( "DEV - " ) ) {
3636 new GitHubBuildsUpdater (this , getFile (), "TheBusyBiscuit/ExtraGear/master" ).start ();
3737 }
3838
3939 new Metrics (this , 6469 );
4040
41- category = new Category (new NamespacedKey (this , "items" ), new CustomItem (Material .DIAMOND_SWORD , "&6ExtraGear" ), 1 );
41+ itemGroup = new ItemGroup (new NamespacedKey (this , "items" ), new CustomItemStack (Material .DIAMOND_SWORD , "&6ExtraGear" ), 1 );
4242
4343 registerSword (Material .IRON_SWORD , "COPPER" , SlimefunItems .COPPER_INGOT , Arrays .asList (new Pair <>(Enchantment .DAMAGE_UNDEAD , 2 )));
4444 registerArmor (ArmorSet .LEATHER , "COPPER" , SlimefunItems .COPPER_INGOT , Arrays .asList (new Pair <>(Enchantment .PROTECTION_EXPLOSIONS , 2 )));
@@ -90,7 +90,7 @@ private void registerSword(Material type, String component, ItemStack item, List
9090 is .addUnsafeEnchantment (enchantment .getFirstValue (), enchantment .getSecondValue ());
9191 }
9292
93- SlimefunItem slimefunItem = new SlimefunItem (category , is , RecipeType .ENHANCED_CRAFTING_TABLE , new ItemStack [] { null , item , null , null , item , null , null , new ItemStack (Material .STICK ), null });
93+ SlimefunItem slimefunItem = new SlimefunItem (itemGroup , is , RecipeType .ENHANCED_CRAFTING_TABLE , new ItemStack [] { null , item , null , null , item , null , null , new ItemStack (Material .STICK ), null });
9494 slimefunItem .register (this );
9595
9696 researchId ++;
@@ -113,16 +113,16 @@ private void registerArmor(ArmorSet armorset, String component, ItemStack item,
113113 }
114114 }
115115
116- SlimefunItem helmet = new SlimefunItem (category , armor [0 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , item , item , item , null , item , null , null , null });
116+ SlimefunItem helmet = new SlimefunItem (itemGroup , armor [0 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , item , item , item , null , item , null , null , null });
117117 helmet .register (this );
118118
119- SlimefunItem chestplate = new SlimefunItem (category , armor [1 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , null , item , item , item , item , item , item , item });
119+ SlimefunItem chestplate = new SlimefunItem (itemGroup , armor [1 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , null , item , item , item , item , item , item , item });
120120 chestplate .register (this );
121121
122- SlimefunItem leggings = new SlimefunItem (category , armor [2 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , item , item , item , null , item , item , null , item });
122+ SlimefunItem leggings = new SlimefunItem (itemGroup , armor [2 ], RecipeType .ARMOR_FORGE , new ItemStack [] { item , item , item , item , null , item , item , null , item });
123123 leggings .register (this );
124124
125- SlimefunItem boots = new SlimefunItem (category , armor [3 ], RecipeType .ARMOR_FORGE , new ItemStack [] { null , null , null , item , null , item , item , null , item });
125+ SlimefunItem boots = new SlimefunItem (itemGroup , armor [3 ], RecipeType .ARMOR_FORGE , new ItemStack [] { null , null , null , item , null , item , item , null , item });
126126 boots .register (this );
127127
128128 researchId ++;
0 commit comments