How frinshhd/anturniaquests works
• Plugin Core: The entry point is provided by the Main.java file, which likely extends JavaPlugin. Represent this as the “Core Plugin” or “Main Application.”
• Command Handling System: Include a module for commands (under the “commands” package). Break it down further into a hierarchy:
• BasicCommand and BasicSubCommand classes.
• The main QuestCommand and its subcommands (create, delete, dev, help, reload, reset, version, and the “edit” subbranches that handle adding/removing settings).
• Configuration Management: Represent this module (in the “config” package) which handles reading plugin configuration files (config.yml, categories.yml, quests.yml, storylines.yml, and messages.properties).
• Quest and Categories System: Represent the “quests” package (including QuestsManager and models) and “categories” package. These modules manage quest definitions, tracking, and categorization.
• Requirements and Rewards: The “requirements” package is extensive and broken into submodules (for block interactions, destroyed blocks, items, killed entities, mob breed, money, place block, placed blocks, reach location). Represent these as a “Requirements Manager” subsystem with individual requirement types.
• Event Listeners: Represent the listener components (such as JoinListener and PlayerKillEntityListener under “listener”, plus listeners in the “storylines” and “menusystem” packages). These modules handle in-game events.
• Menu and UI System: The “menusystem” package (including Menu, PaginatedMenu, PlayerMenuUtility, etc.) serves as the user interface for viewing and interacting with quests.
• MySQL and Persistence: Represent the “mysql” package which includes MysqlManager and various entity classes (e.g., Quests, Requirements, KilledEntities). In addition, note the project’s support for SQLite (as seen in the config.yml).
• Storylines Module: For managing quests that are narrative-based, including NPC interactions (integrations with external NPC plugins like FancyNpcs or Citizens).
• Utilities and External Integrations: Under “utils” you see support for features such as dynamic placeholder expansion, chat management, and integration points with external systems (e.g., Vault for monetary rewards).
Interrelationships and Data Flow
• Command Module to the Quest Manager and the Configuration Manager since commands typically trigger quest-related actions or need configuration data.
• That the Listeners feed game events (player join, kill events, etc.) to the Quest Manager, triggering updates or checks on quest progress.
• Link the Configuration Manager with both the Quest Manager and the Categories subsystem, emphasizing that changes in configuration files affect runtime behavior.
• Persistence layer by showing that the Quest Manager (and possibly the Requirements Manager) interacts with the MySQL Manager to read/write player progress and quest data.