Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit c62047e

Browse files
Merge pull request #18 from variananora/rc-27-update
Update to RC-27
2 parents e6aa864 + 7235f14 commit c62047e

File tree

3 files changed

+25
-39
lines changed

3 files changed

+25
-39
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
.project
44
/.settings/
55
/target/
6+
/.idea/
7+
*.iml
8+
dependency-reduced-pom.xml

pom.xml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,36 +97,19 @@
9797
<dependency>
9898
<groupId>org.spigotmc</groupId>
9999
<artifactId>spigot-api</artifactId>
100-
<version>1.16.3-R0.1-SNAPSHOT</version>
100+
<version>1.16.5-R0.1-SNAPSHOT</version>
101101
<scope>provided</scope>
102102
</dependency>
103103

104104
<dependency>
105-
<groupId>com.github.TheBusyBiscuit</groupId>
106-
<artifactId>CS-CoreLib</artifactId>
107-
<version>6e17183656</version>
108-
<scope>provided</scope>
109-
<exclusions>
110-
<exclusion>
111-
<groupId>io.github.thebusybiscuit</groupId>
112-
<artifactId>cscorelib2</artifactId>
113-
</exclusion>
114-
<exclusion>
115-
<groupId>org.bstats</groupId>
116-
<artifactId>bstats-bukkit</artifactId>
117-
</exclusion>
118-
</exclusions>
119-
</dependency>
120-
121-
<dependency>
122-
<groupId>com.github.TheBusyBiscuit</groupId>
105+
<groupId>com.github.thebusybiscuit</groupId>
123106
<artifactId>Slimefun4</artifactId>
124-
<version>RC-16</version>
107+
<version>RC-27</version>
125108
<scope>provided</scope>
126109
<exclusions>
127110
<exclusion>
128-
<groupId>io.github.thebusybiscuit</groupId>
129-
<artifactId>cscorelib2</artifactId>
111+
<groupId>io.github.baked-libs</groupId>
112+
<artifactId>dough-api</artifactId>
130113
</exclusion>
131114
<exclusion>
132115
<groupId>org.bstats</groupId>

src/main/java/io/github/thebusybiscuit/extragear/ExtraGear.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@
1010
import org.bukkit.inventory.ItemStack;
1111
import 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;
1318
import 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;
1523
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
1624
import 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

2626
public 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

Comments
 (0)