Package xyz.geik.farmer.modules
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:
AutoHarvest
,AutoSeller
,Geyser
,Production
,SpawnerKiller
,Voucher
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Checks if any module uses GUI and makes actionstatic void
databaseGetAttributes
(Connection con, @NotNull Farmer farmer) Get attributes from databasestatic void
databaseUpdateAttribute
(@NotNull Connection con, @NotNull Farmer farmer) Save attributes to databasevoid
Set default config of plugin You may use it in your onLoad or onEnable method of your moduleMethods inherited from class xyz.geik.glib.module.GModule
addDependency, getDependencies, getDependencyListAsString, getName, isEnabled, onDisable, onEnable, onReload, setEnabled
-
Constructor Details
-
FarmerModule
public FarmerModule()
-
-
Method Details
-
setLang
Set default config of plugin You may use it in your onLoad or onEnable method of your moduleIMPORTANT file must be in resources/lang folder, and it must be named of lang as farmer.
- Parameters:
langName
- name of langplugin
- for instance
-
databaseUpdateAttribute
public static void databaseUpdateAttribute(@NotNull @NotNull Connection con, @NotNull @NotNull Farmer farmer) throws SQLException Save attributes to database- Parameters:
con
- Connection to databasefarmer
- 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 databasefarmer
- 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:
-