Project Structure
Directory layout
Section titled βDirectory layoutβDzusillCore/βββ src/β βββ main/β β βββ java/me/dzusill/core/β β β βββ CorePlugin.java β abstract plugin baseβ β β βββ command/ β command frameworkβ β β βββ config/ β YAML config systemβ β β βββ cooldown/ β cooldown managerβ β β βββ database/ β SQL database layerβ β β βββ event/ β listener infrastructureβ β β βββ hook/ β soft-dependency hooksβ β β βββ menu/ β GUI systemβ β β βββ message/ β message serviceβ β β βββ module/ β module lifecycleβ β β βββ permission/ β permission constantsβ β β βββ scheduler/ β task schedulingβ β β βββ service/ β service registryβ β β βββ storage/ β file-based storageβ β β βββ util/ β utility helpersβ β ββ β βββ java/me/dzusill/core/example/ β reference implementationβ β βββ ExamplePlugin.javaβ β βββ command/β β βββ database/β β βββ listener/β β βββ menu/β β βββ module/β ββ βββ test/java/me/dzusill/core/ β test suiteββββ src/main/resources/β βββ plugin.ymlβ βββ config.ymlβ βββ messages.ymlβ βββ menus.ymlβ βββ database.ymlβ βββ schema-mysql.sqlβ βββ schema-postgresql.sqlββββ docs/ β this documentationβββ .gitbook.yamlβββ pom.xmlPackage overview
Section titled βPackage overviewβ| Package | Responsibility |
|---|---|
me.dzusill.core |
CorePlugin abstract base |
me.dzusill.core.module |
CoreModule, AbstractModule, ModuleManager β lifecycle |
me.dzusill.core.service |
Service, Reloadable, ServiceRegistry β dependency injection |
me.dzusill.core.config |
Config, AbstractConfig, ConfigManager β YAML config |
me.dzusill.core.message |
MessageService, Messages, Placeholder |
me.dzusill.core.command |
CoreCommand, SubCommand, @CommandMeta, argument system |
me.dzusill.core.menu |
Menu, PaginatedMenu, MenuTemplate, MenuItem, MenuManager |
me.dzusill.core.event |
CoreListener, ListenerRegistry, @AutoRegister |
me.dzusill.core.hook |
PluginHook, HookManager, Vault/PAPI/Essentials hooks |
me.dzusill.core.storage |
DataStore, AbstractDataStore, YamlDataStore |
me.dzusill.core.database |
Database, drivers, DatabaseManager, query/repository layer |
me.dzusill.core.scheduler |
SchedulerService |
me.dzusill.core.cooldown |
CooldownManager |
me.dzusill.core.permission |
CorePermission constants |
me.dzusill.core.util |
ItemBuilder, ColorUtils, LocationUtils, TimeUtils, NumberUtils, TextUtils |
me.dzusill.core.example |
Reference plugin β rename and replace for your own plugin |
The example package
Section titled βThe example packageβThe me.dzusill.core.example package is a fully functional reference plugin that demonstrates every feature. It is the class declared as main in plugin.yml. When building your own plugin:
- Rename the package (e.g.
me.yourname.myplugin). - Rename
ExamplePluginto your main class and updateplugin.yml. - Replace example modules, commands, and menus with your own.
- Delete or repurpose
PlayerRecord/PlayerRepositoryandShopMenu.