1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Removed obsolete things

This commit is contained in:
TheBusyBiscuit 2021-01-11 12:33:49 +01:00
parent 20cecc1d01
commit 7a4712f930
7 changed files with 11 additions and 84 deletions

View File

@ -6,6 +6,8 @@ on:
- 'src/**'
- '!src/main/resources/languages/**'
- 'pom.xml'
tags-ignore:
- 'RC.*'
jobs:
report:

View File

@ -24,6 +24,14 @@
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Release Candidate 20 (TBD)
#### Additions
#### Changes
#### Fixes
## Release Candidate 19 (11 Jan 2021)
#### Additions

View File

@ -1,59 +0,0 @@
package io.github.thebusybiscuit.slimefun4.core.services.plugins;
import java.util.Optional;
import java.util.function.Function;
import javax.annotation.Nonnull;
import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.integrations.IntegrationsManager;
/**
* This Service holds all interactions and hooks with third-party {@link Plugin Plugins}
* that are not necessarily a dependency or a {@link SlimefunAddon}.
*
* Integration with these plugins happens inside Slimefun itself.
*
* @author TheBusyBiscuit
*
* @deprecated Renamed to {@link IntegrationsManager}
*
* @see SlimefunPlugin
*
*/
@Deprecated
public class ThirdPartyPluginService extends IntegrationsManager {
/**
* This gets overridden if ExoticGarden is loaded
*/
private Function<Block, Optional<ItemStack>> exoticGardenIntegration = b -> Optional.empty();
/**
* This initializes the {@link ThirdPartyPluginService}
*
* @param plugin
* Our instance of {@link SlimefunPlugin}
*/
public ThirdPartyPluginService(@Nonnull SlimefunPlugin plugin) {
super(plugin);
}
@Deprecated
public void loadExoticGarden(Plugin plugin, Function<Block, Optional<ItemStack>> method) {
if (plugin.getName().equals("ExoticGarden")) {
exoticGardenIntegration = method;
}
}
@Deprecated
public Optional<ItemStack> harvestExoticGardenPlant(Block block) {
return exoticGardenIntegration.apply(block);
}
}

View File

@ -1,4 +0,0 @@
/**
* This package contains all hooks to external plugins
*/
package io.github.thebusybiscuit.slimefun4.core.services.plugins;

View File

@ -50,7 +50,6 @@ 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.core.services.profiler.SlimefunProfiler;
import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientAltar;
import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientPedestal;
@ -151,7 +150,7 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
private final PerWorldSettingsService worldSettingsService = new PerWorldSettingsService(this);
private final MinecraftRecipeService recipeService = new MinecraftRecipeService(this);
private final IntegrationsManager integrations = new ThirdPartyPluginService(this);
private final IntegrationsManager integrations = new IntegrationsManager(this);
private final SlimefunProfiler profiler = new SlimefunProfiler();
private LocalizationService local;
@ -829,18 +828,6 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
return instance.worldSettingsService;
}
/**
* This method has been renamed.
*
* @deprecated Please use {@link #getIntegrations()} instead.
*
* @return the {@link ThirdPartyPluginService}
*/
@Deprecated
public static ThirdPartyPluginService getThirdPartySupportService() {
return (ThirdPartyPluginService) instance.integrations;
}
/**
* This returns our instance of {@link IntegrationsManager}.
* This is responsible for managing any integrations with third party {@link Plugin plugins}.

View File

@ -55,7 +55,6 @@ public class IntegrationsManager {
// Addon support
private boolean isChestTerminalInstalled = false;
private boolean isExoticGardenInstalled = false;
/**
* This initializes the {@link IntegrationsManager}
@ -140,7 +139,6 @@ public class IntegrationsManager {
}
isChestTerminalInstalled = isAddonInstalled("ChestTerminal");
isExoticGardenInstalled = isAddonInstalled("ExoticGarden");
}
/**
@ -249,8 +247,4 @@ public class IntegrationsManager {
return isChestTerminalInstalled;
}
public boolean isExoticGardenInstalled() {
return isExoticGardenInstalled;
}
}

View File

@ -23,7 +23,6 @@ softdepend:
# We hook into these plugins too, but they depend on Slimefun.
loadBefore:
- ChestTerminal
- ExoticGarden
# Our commands
commands: