diff --git a/.gitignore b/.gitignore
index b609cc3..c575a7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,6 @@
/.settings/
/bin/
/target/
+/.idea/
+.iml
dependency-reduced-pom.xml
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9b26128..0f3dac3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,14 +103,14 @@
- com.github.TheBusyBiscuit
+ com.github.thebusybiscuit
Slimefun4
- RC-21
+ RC-27
provided
- io.github.thebusybiscuit
- cscorelib2
+ io.github.baked-libs
+ dough-api
diff --git a/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChest.java b/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChest.java
index 5620762..87cb981 100644
--- a/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChest.java
+++ b/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChest.java
@@ -10,15 +10,15 @@
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
+import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.handlers.SimpleBlockBreakHandler;
import io.github.thebusybiscuit.slimefun4.utils.ColoredMaterial;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow;
@@ -26,8 +26,8 @@ public class ColoredEnderChest extends SlimefunItem {
public ColoredEnderChest(ColoredEnderChests plugin, int size, int c1, int c2, int c3) {
// @formatter:off
- super(plugin.category, new SlimefunItemStack("COLORED_ENDER_CHEST_" + (size == 27 ? "SMALL" : "BIG") + "_" + c1 + "_" + c2 + "_" + c3, Material.ENDER_CHEST, "&eColored Ender Chest &7(" + (size == 27 ? "Small" : "Big") + ")", "", "&7Size: &e" + size, "", "&7- " + plugin.colors.get(c1), "&7- " + plugin.colors.get(c2), "&7- "
- + plugin.colors.get(c3)), RecipeType.ANCIENT_ALTAR,
+ super(plugin.itemGroup, new SlimefunItemStack("COLORED_ENDER_CHEST_" + (size == 27 ? "SMALL" : "BIG") + "_" + c1 + "_" + c2 + "_" + c3, Material.ENDER_CHEST, "&eColored Ender Chest &7(" + (size == 27 ? "Small" : "Big") + ")", "", "&7Size: &e" + size, "", "&7- " + plugin.colors.get(c1), "&7- " + plugin.colors.get(c2), "&7- "
+ + plugin.colors.get(c3)), RecipeType.ANCIENT_ALTAR,
(size == 27) ? new ItemStack[] {
new ItemStack(ColoredMaterial.WOOL.get(c1)), new ItemStack(ColoredMaterial.WOOL.get(c2)), new ItemStack(ColoredMaterial.WOOL.get(c3)),
new ItemStack(Material.OBSIDIAN), new ItemStack(Material.CHEST), new ItemStack(Material.OBSIDIAN),
@@ -139,7 +139,7 @@ public void onPlayerPlace(BlockPlaceEvent e) {
}
private static ItemStack getSmallerEnderChest(int c1, int c2, int c3) {
- SlimefunItem enderChest = SlimefunItem.getByID("COLORED_ENDER_CHEST_SMALL_" + c1 + "_" + c2 + "_" + c3);
+ SlimefunItem enderChest = SlimefunItem.getById("COLORED_ENDER_CHEST_SMALL_" + c1 + "_" + c2 + "_" + c3);
return enderChest != null ? enderChest.getItem() : null;
}
diff --git a/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChests.java b/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChests.java
index bfd38e8..6bb5bd4 100644
--- a/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChests.java
+++ b/src/main/java/io/github/thebusybiscuit/coloredenderchests/ColoredEnderChests.java
@@ -8,19 +8,18 @@
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
+import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
+import io.github.thebusybiscuit.slimefun4.api.researches.Research;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
-import io.github.thebusybiscuit.slimefun4.core.researching.Research;
-import me.mrCookieSlime.Slimefun.Objects.Category;
-import me.mrCookieSlime.Slimefun.cscorelib2.config.Config;
-import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem;
-import me.mrCookieSlime.Slimefun.cscorelib2.updater.GitHubBuildsUpdater;
-import me.mrCookieSlime.Slimefun.cscorelib2.updater.Updater;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
public class ColoredEnderChests extends JavaPlugin implements SlimefunAddon {
protected Config cfg;
protected Map colors = new HashMap<>();
- protected Category category;
+ protected ItemGroup itemGroup;
@Override
public void onEnable() {
@@ -30,13 +29,8 @@ public void onEnable() {
new Metrics(this, 4907);
// Setting up the Auto-Updater
- if (getDescription().getVersion().startsWith("DEV - ")) {
- // If we are using a development build, we want to switch to our custom
- Updater updater = new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/ColoredEnderChests/master");
-
- if (cfg.getBoolean("options.auto-update")) {
- updater.start();
- }
+ if (cfg.getBoolean("options.auto-update") && getDescription().getVersion().startsWith("DEV - ")) {
+ new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/ColoredEnderChests/master").start();
}
Research enderChestsResearch = new Research(new NamespacedKey(this, "colored_enderchests"), 2610, "Colored Ender Chests", 20);
@@ -62,7 +56,7 @@ public void onEnable() {
colors.put(14, "&4Red");
colors.put(15, "&8Black");
- category = new Category(new NamespacedKey(this, "colored_enderchests"), new CustomItem(Material.ENDER_CHEST, "&5Colored Ender Chests"), 2);
+ itemGroup = new ItemGroup(new NamespacedKey(this, "colored_enderchests"), new CustomItemStack(Material.ENDER_CHEST, "&5Colored Ender Chests"), 2);
for (int c1 = 0; c1 < 16; c1++) {
for (int c2 = 0; c2 < 16; c2++) {