From b41b258c8bdfcb3fab9c6d9034d64ef3a6ee706b Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Fri, 3 Sep 2021 23:08:00 +0700 Subject: [PATCH 1/4] Update to RC-27 --- .idea/.gitignore | 8 ++++ .idea/compiler.xml | 13 ++++++ .idea/discord.xml | 7 ++++ .idea/encodings.xml | 8 ++++ .idea/jarRepositories.xml | 40 +++++++++++++++++++ .idea/misc.xml | 17 ++++++++ .idea/runConfigurations.xml | 10 +++++ .idea/vcs.xml | 6 +++ ColoredEnderChests.iml | 12 ++++++ pom.xml | 8 ++-- .../coloredenderchests/ColoredEnderChest.java | 12 +++--- .../ColoredEnderChests.java | 24 +++++------ 12 files changed, 140 insertions(+), 25 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/discord.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/vcs.xml create mode 100644 ColoredEnderChests.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..aa8b108 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..30bab2a --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..af673e7 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..6c993d9 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..2429292 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ColoredEnderChests.iml b/ColoredEnderChests.iml new file mode 100644 index 0000000..fa63d4b --- /dev/null +++ b/ColoredEnderChests.iml @@ -0,0 +1,12 @@ + + + + + + + SPIGOT + + + + + \ 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++) { From 5e22da017f5af06ac7deeb14d1019575163f12b2 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Sat, 4 Sep 2021 09:33:21 +0700 Subject: [PATCH 2/4] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b609cc3..fd497e8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ /.settings/ /bin/ /target/ +/.idea/ dependency-reduced-pom.xml \ No newline at end of file From f42b4f13a60eb04472de0e907c7be11fc8241000 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Sat, 4 Sep 2021 09:34:22 +0700 Subject: [PATCH 3/4] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fd497e8..c575a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /bin/ /target/ /.idea/ +.iml dependency-reduced-pom.xml \ No newline at end of file From 88f333b6a0810bd2d7708f722fff5647d5510019 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Sat, 4 Sep 2021 09:35:45 +0700 Subject: [PATCH 4/4] Delete .idea thinggy --- .idea/.gitignore | 8 -------- .idea/compiler.xml | 13 ------------ .idea/discord.xml | 7 ------- .idea/encodings.xml | 8 -------- .idea/jarRepositories.xml | 40 ------------------------------------- .idea/misc.xml | 17 ---------------- .idea/runConfigurations.xml | 10 ---------- .idea/vcs.xml | 6 ------ ColoredEnderChests.iml | 12 ----------- 9 files changed, 121 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/discord.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml delete mode 100644 ColoredEnderChests.iml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index aa8b108..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index 30bab2a..0000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index af673e7..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 6c993d9..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 2429292..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ColoredEnderChests.iml b/ColoredEnderChests.iml deleted file mode 100644 index fa63d4b..0000000 --- a/ColoredEnderChests.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - SPIGOT - - - - - \ No newline at end of file