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(Block block) booleanisCustomItem(ItemStack item) This checks if one of our third party integrations defines a givenItemStackas custom.booleanThis method returns whether theIntegrationsManagerwas enabled yet.booleanisEventFaked(Event event) This checks if one of our third party integrations faked anEvent.booleanbooleanbooleanbooleanbooleanprotected voidvoidThis 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
-
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
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
-
isCustomItem
This checks if one of our third party integrations defines a givenItemStackas custom. -
removeTemporaryEnchantments
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()
-