From 0735eaad83ca8c75aff666b8249a13d001a309d6 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Tue, 14 Jul 2020 13:19:04 +0200 Subject: [PATCH] [CI skip] Removed more deprecated code --- .../Objects/handlers/BlockBreakHandler.java | 9 -- .../MultiBlockInteractionHandler.java | 9 -- .../Slimefun/SlimefunPlugin.java | 150 ------------------ .../mrCookieSlime/Slimefun/api/Slimefun.java | 44 ----- 4 files changed, 212 deletions(-) delete mode 100644 src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/BlockBreakHandler.java delete mode 100644 src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/MultiBlockInteractionHandler.java delete mode 100644 src/main/java/me/mrCookieSlime/Slimefun/SlimefunPlugin.java diff --git a/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/BlockBreakHandler.java b/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/BlockBreakHandler.java deleted file mode 100644 index 2b43d181d..000000000 --- a/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/BlockBreakHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.mrCookieSlime.Slimefun.Objects.handlers; - -/** - * @deprecated Moved to {@link io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler} - */ -@Deprecated -public interface BlockBreakHandler extends io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler { - -} diff --git a/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/MultiBlockInteractionHandler.java b/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/MultiBlockInteractionHandler.java deleted file mode 100644 index 226f52ea3..000000000 --- a/src/main/java/me/mrCookieSlime/Slimefun/Objects/handlers/MultiBlockInteractionHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package me.mrCookieSlime.Slimefun.Objects.handlers; - -/** - * @deprecated Moved to {@link io.github.thebusybiscuit.slimefun4.core.handlers.MultiBlockInteractionHandler} - */ -@Deprecated -public interface MultiBlockInteractionHandler extends io.github.thebusybiscuit.slimefun4.core.handlers.MultiBlockInteractionHandler { - -} diff --git a/src/main/java/me/mrCookieSlime/Slimefun/SlimefunPlugin.java b/src/main/java/me/mrCookieSlime/Slimefun/SlimefunPlugin.java deleted file mode 100644 index ad05fec1f..000000000 --- a/src/main/java/me/mrCookieSlime/Slimefun/SlimefunPlugin.java +++ /dev/null @@ -1,150 +0,0 @@ -package me.mrCookieSlime.Slimefun; - -import java.util.Set; - -import org.bukkit.plugin.Plugin; - -import io.github.thebusybiscuit.cscorelib2.config.Config; -import io.github.thebusybiscuit.cscorelib2.protection.ProtectionManager; -import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; -import io.github.thebusybiscuit.slimefun4.api.gps.GPSNetwork; -import io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry; -import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand; -import io.github.thebusybiscuit.slimefun4.core.networks.NetworkManager; -import io.github.thebusybiscuit.slimefun4.core.services.BlockDataService; -import io.github.thebusybiscuit.slimefun4.core.services.CustomItemDataService; -import io.github.thebusybiscuit.slimefun4.core.services.CustomTextureService; -import io.github.thebusybiscuit.slimefun4.core.services.LocalizationService; -import io.github.thebusybiscuit.slimefun4.core.services.MinecraftRecipeService; -import io.github.thebusybiscuit.slimefun4.core.services.PerWorldSettingsService; -import io.github.thebusybiscuit.slimefun4.core.services.PermissionsService; -import io.github.thebusybiscuit.slimefun4.core.services.UpdaterService; -import io.github.thebusybiscuit.slimefun4.core.services.github.GitHubService; -import io.github.thebusybiscuit.slimefun4.core.services.plugins.ThirdPartyPluginService; -import io.github.thebusybiscuit.slimefun4.implementation.listeners.AncientAltarListener; -import io.github.thebusybiscuit.slimefun4.implementation.listeners.BackpackListener; -import io.github.thebusybiscuit.slimefun4.implementation.listeners.GrapplingHookListener; -import io.github.thebusybiscuit.slimefun4.implementation.listeners.SlimefunBowListener; -import io.github.thebusybiscuit.slimefun4.implementation.tasks.TickerTask; -import me.mrCookieSlime.CSCoreLibPlugin.CSCoreLib; - -/** - * @deprecated This class has been moved to {@link io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin} - * - * @author TheBusyBiscuit - * - */ -@Deprecated -public final class SlimefunPlugin { - - private SlimefunPlugin() {} - - public static Config getCfg() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getCfg(); - } - - public static Config getResearchCfg() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getResearchCfg(); - } - - public static Config getItemCfg() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getItemCfg(); - } - - public static GPSNetwork getGPSNetwork() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getGPSNetwork(); - } - - public static TickerTask getTicker() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getTickerTask(); - } - - public static String getVersion() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getVersion(); - } - - public static ProtectionManager getProtectionManager() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getProtectionManager(); - } - - public static LocalizationService getLocal() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getLocalization(); - } - - public static MinecraftRecipeService getMinecraftRecipes() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getMinecraftRecipeService(); - } - - public static CustomItemDataService getItemDataService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getItemDataService(); - } - - public static CustomTextureService getItemTextureService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getItemTextureService(); - } - - public static PermissionsService getPermissionsService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getPermissionsService(); - } - - public static BlockDataService getBlockDataService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getBlockDataService(); - } - - public static ThirdPartyPluginService getThirdPartySupportService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getThirdPartySupportService(); - } - - public static PerWorldSettingsService getWorldSettingsService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getWorldSettingsService(); - } - - public static UpdaterService getUpdater() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getUpdater(); - } - - public static GitHubService getGitHubService() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getGitHubService(); - } - - public static SlimefunRegistry getRegistry() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getRegistry(); - } - - public static NetworkManager getNetworkManager() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getNetworkManager(); - } - - public static AncientAltarListener getAncientAltarListener() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getAncientAltarListener(); - } - - public static GrapplingHookListener getGrapplingHookListener() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getGrapplingHookListener(); - } - - public static BackpackListener getBackpackListener() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getBackpackListener(); - } - - public static SlimefunBowListener getBowListener() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getBowListener(); - } - - public static Set getInstalledAddons() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getInstalledAddons(); - } - - public static SlimefunCommand getCommand() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getCommand(); - } - - public static MinecraftVersion getMinecraftVersion() { - return io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin.getMinecraftVersion(); - } - - public static String getCSCoreLibVersion() { - return CSCoreLib.getLib().getDescription().getVersion(); - } - -} diff --git a/src/main/java/me/mrCookieSlime/Slimefun/api/Slimefun.java b/src/main/java/me/mrCookieSlime/Slimefun/api/Slimefun.java index 0b88f19dc..b7d7af302 100644 --- a/src/main/java/me/mrCookieSlime/Slimefun/api/Slimefun.java +++ b/src/main/java/me/mrCookieSlime/Slimefun/api/Slimefun.java @@ -4,7 +4,6 @@ import java.util.Optional; import java.util.logging.Logger; import org.bukkit.Bukkit; -import org.bukkit.NamespacedKey; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.scheduler.BukkitTask; @@ -14,7 +13,6 @@ import io.github.thebusybiscuit.slimefun4.api.items.ItemState; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem; -import me.mrCookieSlime.Slimefun.Objects.Research; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; /** @@ -32,48 +30,6 @@ public final class Slimefun { return SlimefunPlugin.instance().getLogger(); } - /** - * Registers a research. - * - * @deprecated The Research class was moved, this method is no longer valid. Please use - * {@link io.github.thebusybiscuit.slimefun4.core.researching.Research#register()} instead. - * - * @param research - * The research - * @param items - * The items - */ - @Deprecated - public static void registerResearch(Research research, ItemStack... items) { - for (ItemStack item : items) { - research.addItems(SlimefunItem.getByItem(item)); - } - - research.register(); - } - - /** - * Registers a research. - * - * @deprecated The Research class was moved, this method is no longer valid. Please use - * {@link io.github.thebusybiscuit.slimefun4.core.researching.Research#register()} instead. - * - * @param key - * The key - * @param id - * The id - * @param name - * The name - * @param cost - * The default cost - * @param items - * The items - */ - @Deprecated - public static void registerResearch(NamespacedKey key, int id, String name, int cost, ItemStack... items) { - registerResearch(new Research(key, id, name, cost), items); - } - /** * Checks if this player can use this item. *