Class IntegrationsManager

java.lang.Object
io.github.thebusybiscuit.slimefun4.integrations.IntegrationsManager

public class IntegrationsManager extends Object
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 Details

  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
      This method returns whether the IntegrationsManager was enabled yet.
      Returns:
      Whether this IntegrationsManager has been enabled already.
    • start

      public final void start()
      This method initializes all third party integrations.
    • logError

      @ParametersAreNonnullByDefault protected void logError(String name, Throwable throwable)
      This method logs a Throwable that was caused by a Plugin we integrate into. Calling this method will probably log the error and provide the version of this Plugin for error analysis.
      Parameters:
      name - The name of the Plugin
      throwable - The Throwable to throw
    • getProtectionManager

      @Nonnull public io.github.bakedlibs.dough.protection.ProtectionManager getProtectionManager()
      This returns out instance of the ProtectionManager. This bridge is used to hook into any third-party protection Plugin.
      Returns:
      Our instanceof of the ProtectionManager
    • isEventFaked

      public boolean isEventFaked(@Nonnull Event event)
      This checks if one of our third party integrations faked an Event. Faked Events should be ignored in our logic.
      Parameters:
      event - The Event to test
      Returns:
      Whether this is a fake event
    • isCustomBlock

      public boolean isCustomBlock(@Nonnull Block block)
      This checks if one of our third party integrations has placed a custom Block at this Location.
      Parameters:
      block - The Block to check
      Returns:
      Whether a different custom Block exists at that Location
    • isCustomItem

      public boolean isCustomItem(@Nonnull ItemStack item)
      This checks if one of our third party integrations defines a given ItemStack as custom.
      Parameters:
      item - The ItemStack to check
      Returns:
      Whether this ItemStack is a custom item
    • removeTemporaryEnchantments

      public void removeTemporaryEnchantments(@Nonnull ItemStack item)
      This method removes any temporary enchantments from the given ItemStack. Some plugins apply enchantments for a short amount of time and remove it later. We don't want these items to be exploited using an AutoDisenchanter for example, so we want to be able to strip those temporary enchantments in advance.
      Parameters:
      item - The ItemStack
    • isPlaceholderAPIInstalled

      public boolean isPlaceholderAPIInstalled()
    • isWorldEditInstalled

      public boolean isWorldEditInstalled()
    • isMcMMOInstalled

      public boolean isMcMMOInstalled()
    • isClearLagInstalled

      public boolean isClearLagInstalled()
    • isItemsAdderInstalled

      public boolean isItemsAdderInstalled()
    • isOrebfuscatorInstalled

      public boolean isOrebfuscatorInstalled()