Class FarmerModule

java.lang.Object
xyz.geik.glib.module.GModule
xyz.geik.farmer.modules.FarmerModule
All Implemented Interfaces:
xyz.geik.glib.module.Modulable
Direct Known Subclasses:
Production

public abstract class FarmerModule extends xyz.geik.glib.module.GModule
Module system of Farmer You can extend a class with this class and register it
Author:
Geyik
  • Constructor Details

    • FarmerModule

      public FarmerModule()
  • Method Details

    • setLang

      public void setLang(String langName, Class<?> targetClass)
      Set default config of plugin You may use it in your onLoad or onEnable method of your module

      IMPORTANT file must be in resources/lang folder, and it must be named of lang as farmer.

      Parameters:
      langName - name of lang
    • setLang

      public void setLang(String langName, org.bukkit.plugin.java.JavaPlugin plugin)
    • databaseUpdateAttribute

      public static void databaseUpdateAttribute(@NotNull @NotNull Connection con, @NotNull @NotNull Farmer farmer) throws SQLException
      Save attributes to database
      Parameters:
      con - Connection to database
      farmer - Farmer to save
      Throws:
      SQLException - if SQL error occurs
    • databaseGetAttributes

      public static void databaseGetAttributes(Connection con, @NotNull @NotNull Farmer farmer) throws SQLException
      Get attributes from database
      Parameters:
      con - Connection to database
      farmer - Farmer to get attributes
      Throws:
      SQLException - if SQL error occurs
    • calculateModulesUseGui

      public static void calculateModulesUseGui()
      Checks if any module uses GUI and makes action
      See Also: