How zapzombies/zombies works
And illustrate the main components
• Core Plugin Module – Represented by the classes in the “src” directory, with the main entry point (the “Zombies” class) that initializes the plugin and hooks into the Minecraft server lifecycle (via the plugin.yml configuration in resources).
• Command & Interaction Layer – This includes all command-related packages (under src/main/java/io/github/zap/zombies/command and its subpackages for game, map editor, etc.) that process user commands and delegate control to appropriate systems.
– Game Arena and State Management (classes like ZombiesArena, RoundContext, ZombiesArenaManager, etc.)
– Equipment & Power-Up Systems (both under equipment and equipment2 packages). These include gun mechanics, melee weapons, perks, and the logic associated with how they work in-game.
– Mob and NPC Behavior – Represented by packages for mobs, goals, injectors, and mechanics for events like attacking or spawning.
– Shops, Scoring, and Stats – Represent modules that handle in-game economy (shops and team machines) as well as scoreboard/state/GUI updates.
• NMS Bridge Layer – Since the plugin must work with different Minecraft versions, there’s a dedicated “nms” folder. This directory holds version-specific integration code (for example, under nms/nms-1_16_R3) and common abstractions (under nms/nms-common) that allow the core plugin logic to interact with Minecraft’s internal API.
• External Integration & Build/Deployment Tools – Include ancillary components (though not part of the runtime architecture) such as Gradle build scripts, GitHub workflows (for CI/CD), and Maven publishing configurations. These support the development lifecycle, environment setup, and deployment testing (like “Run development server”).
Relationships and interactions
• That the Command & Interaction Layer connects to the Game Mechanics & Logic components. Commands will trigger game events such as joining a game, editing maps, or triggering shop actions.
• Link the Equipment & Power-Up system to both the Game Mechanics and the Mob/NPC systems, emphasizing that equipment effects and power-ups influence game state, damage events, and scoring.
• That the Plugins’ event system (server events, player events) is integrated into many of these components (for example, tasks under game/player/task, mob goals, etc.).
Architectural patterns and technologies
• Modular design – The code is split cleanly into modules based on functionality. For example, game logic is separated from NMS-specific code.
• Use of dependency injection and abstraction – The “nms-common” module and the version-specific implementations (e.g., nms-1_16_R3) illustrate use of abstraction to support multiple game versions.
• Event-driven design – The plugin relies on Minecraft’s event system; many components (commands, tasks, mob mechanics) are invoked in response to events.