Class ItemMods

  • All Implemented Interfaces:
    org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

    public class ItemMods
    extends org.bukkit.plugin.java.JavaPlugin
    • Field Detail

      • GSON

        public static final com.google.gson.Gson GSON
      • FILE_VERSION

        public static final int FILE_VERSION
        The current version of the file. This is used to update the file if a new version is released!
        See Also:
        Constant Field Values
    • Constructor Detail

      • ItemMods

        public ItemMods()
    • Method Detail

      • getPlugin

        public static ItemMods getPlugin()
        Get the current plugin
        Returns:
        The singleton of this class created from the server
      • getCustomBlockManager

        public static CustomBlockManager getCustomBlockManager()
        Get the current custom block manager singleton
        Returns:
        The singleton created from the plugin
      • getCustomItemManager

        public static CustomItemManager getCustomItemManager()
        Get the current custom item manager singleton
        Returns:
        The singleton created from the plugin
      • saveMainConfig

        public static void saveMainConfig()
        Save the main config which can be got from the getMainConfig() method
      • getTranslationConfig

        public static dev.linwood.api.translations.TranslationConfig getTranslationConfig()
        Get the translation config where all translations for this plugin
        Returns:
        The translation config with all translations
      • subTranslation

        public static dev.linwood.api.translations.Translation subTranslation​(String... namespaces)
      • getTranslation

        public static String getTranslation​(String key,
                                            Object... placeholders)
      • getMainConfig

        public static MainConfig getMainConfig()
        Get the general configuration located in plugins/ItemMods/config.json Can be saved with saveMainConfig()
        Returns:
        The main config instance
      • getPackManager

        public static PackManager getPackManager()
        Get the pack manager to control all packs
        Returns:
        The singleton created from the plugin
      • getVersion

        @NotNull
        public static @NotNull String getVersion()
        Get the version of the plugin
        Returns:
        The version string
      • getTempPath

        public static Path getTempPath()
        Get the directory located in plugins/ItemMods/temp
        Returns:
        The path of the directory
      • reloadMainConfig

        public static void reloadMainConfig()
        Reload the main config which can be got from the getMainConfig() method
      • getLocales

        public static List<String> getLocales()
                                       throws IOException
        Get all supported locales
        Returns:
        A list of the supported locales
        Throws:
        IOException - Throws if the directory can't be read
      • reload

        public static void reload()
        Reload the translation config, the main config and the pack manager
      • isRunningOnPaper

        public static boolean isRunningOnPaper()
        Test if the server is running on paper
        Returns:
        Returns true if the server is running on paper
      • onEnable

        public void onEnable()
        Specified by:
        onEnable in interface org.bukkit.plugin.Plugin
        Overrides:
        onEnable in class org.bukkit.plugin.java.JavaPlugin
      • onDisable

        public void onDisable()
        Specified by:
        onDisable in interface org.bukkit.plugin.Plugin
        Overrides:
        onDisable in class org.bukkit.plugin.java.JavaPlugin