Class IntegrationsManager
java.lang.Object
io.github.thebusybiscuit.slimefun4.integrations.IntegrationsManager
This Service holds all interactions and hooks with third-party
Plugins
that are not necessarily a dependency or a SlimefunAddon.
Integration with these plugins happens inside Slimefun itself.- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntegrationsManager(Slimefun plugin) This initializes theIntegrationsManager -
Method Summary
Modifier and TypeMethodDescriptionio.github.bakedlibs.dough.protection.ProtectionManagerThis returns out instance of theProtectionManager.booleanbooleanisCustomBlock(org.bukkit.block.Block block) This checks if one of our third party integrations has placed a customBlockat thisLocation.booleanisCustomItem(org.bukkit.inventory.ItemStack item) This checks if one of our third party integrations defines a givenItemStackas custom.booleanThis method returns whether theIntegrationsManagerwas enabled yet.booleanisEventFaked(org.bukkit.event.Event event) This checks if one of our third party integrations faked anEvent.booleanbooleanbooleanbooleanbooleanprotected voidThis method logs aThrowablethat was caused by aPluginwe integrate into.voidremoveTemporaryEnchantments(org.bukkit.inventory.ItemStack item) This method removes any temporary enchantments from the givenItemStack.final voidstart()This method initializes all third party integrations.
-
Field Details
-
plugin
This is our instance ofSlimefun.
-
-
Constructor Details
-
IntegrationsManager
This initializes theIntegrationsManager- Parameters:
plugin- Our instance ofSlimefun
-
-
Method Details
-
isEnabled
public boolean isEnabled()This method returns whether theIntegrationsManagerwas enabled yet.- Returns:
- Whether this
IntegrationsManagerhas been enabled already.
-
start
public final void start()This method initializes all third party integrations. -
logError
This method logs aThrowablethat was caused by aPluginwe integrate into. Calling this method will probably log the error and provide the version of thisPluginfor error analysis.- Parameters:
name- The name of thePluginthrowable- TheThrowableto throw
-
getProtectionManager
@Nonnull public io.github.bakedlibs.dough.protection.ProtectionManager getProtectionManager()This returns out instance of theProtectionManager. This bridge is used to hook into any third-party protectionPlugin.- Returns:
- Our instanceof of the
ProtectionManager
-
isEventFaked
public boolean isEventFaked(@Nonnull org.bukkit.event.Event event) This checks if one of our third party integrations faked anEvent. FakedEventsshould be ignored in our logic.- Parameters:
event- TheEventto test- Returns:
- Whether this is a fake event
-
isCustomBlock
public boolean isCustomBlock(@Nonnull org.bukkit.block.Block block) This checks if one of our third party integrations has placed a customBlockat thisLocation.- Parameters:
block- TheBlockto check- Returns:
- Whether a different custom
Blockexists at thatLocation
-
isCustomItem
public boolean isCustomItem(@Nonnull org.bukkit.inventory.ItemStack item) This checks if one of our third party integrations defines a givenItemStackas custom.- Parameters:
item- TheItemStackto check- Returns:
- Whether this
ItemStackis a custom item
-
removeTemporaryEnchantments
public void removeTemporaryEnchantments(@Nonnull org.bukkit.inventory.ItemStack item) This method removes any temporary enchantments from the givenItemStack. Some plugins apply enchantments for a short amount of time and remove it later. We don't want these items to be exploited using anAutoDisenchanterfor example, so we want to be able to strip those temporary enchantments in advance.- Parameters:
item- TheItemStack
-
isPlaceholderAPIInstalled
public boolean isPlaceholderAPIInstalled() -
isWorldEditInstalled
public boolean isWorldEditInstalled() -
isMcMMOInstalled
public boolean isMcMMOInstalled() -
isClearLagInstalled
public boolean isClearLagInstalled() -
isItemsAdderInstalled
public boolean isItemsAdderInstalled() -
isOrebfuscatorInstalled
public boolean isOrebfuscatorInstalled()
-