How raaaaming/arcshop works
ARCShop is a Minecraft server shop module for buying and selling products using economy funds, stored cash, and items. Players enter through commands, then use an inventory GUI or—when optional ARCLink is available and connected—a browser UI. Both transaction paths use the shared transaction service, which validates prices and purchase limits, performs withdrawals or deposits, and rolls back partial failures. Configuration defines categories and products; adapters connect transaction ports to player inventories, economy services, and database-backed cash and limits. Source excerpts show the main wiring and transaction paths; some subsystem details are supported only by the source index.
Main entry points: ARCShopModule.kt Module wiring · ShopWebController.kt Browser controller · ShopGuiListener.kt Inventory GUI · TransactionService.kt Transaction service
Components 19
Player interfaces
- Shop commands
src/main/kotlin/kr/acda/arcshop/command/ShopCommands.kt - Inventory GUI
src/main/kotlin/kr/acda/arcshop/gui/ShopGuiListener.kt - Shop menus
src/main/kotlin/kr/acda/arcshop/gui/ShopMenus.kt - Browser controller
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser assets
src/main/kotlin/kr/acda/arcshop/web/ShopWebAssets.kt
Shop domain
- Shop catalog
src/main/kotlin/kr/acda/arcshop/gui/ShopCatalog.kt - Shop models
src/main/kotlin/kr/acda/arcshop/core/model - Item signatures
src/main/kotlin/kr/acda/arcshop/item/BukkitItemSignatures.kt
Transaction core
- Transaction service
src/main/kotlin/kr/acda/arcshop/core/service/TransactionService.kt - Transaction ports
src/main/kotlin/kr/acda/arcshop/core/port
Runtime adapters
- Player inventory
src/main/kotlin/kr/acda/arcshop/item/PlayerInventoryStockPort.kt - Economy adapter
src/main/kotlin/kr/acda/arcshop/economy/ArcEconomyPort.kt - Cash adapter
src/main/kotlin/kr/acda/arcshop/db/JdbcCashPort.kt - Purchase limits
src/main/kotlin/kr/acda/arcshop/db/JdbcPurchaseLimitPort.kt - Shared database
src/main/kotlin/kr/acda/arcshop/db/SharedDatabase.kt
Configuration and wiring
- Shop configuration
src/main/kotlin/kr/acda/arcshop/config/ShopConfig.kt - Module wiring
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt
Other components
- Player
- ARCLink service
Connections 36
- Player → Shop commands: runs commands
- Shop commands → Inventory GUI: opens GUI
src/main/kotlin/kr/acda/arcshop/command/ShopCommands.kt - Shop commands → Browser controller: opens browser
src/main/kotlin/kr/acda/arcshop/command/ShopCommands.kt - Inventory GUI → Shop menus: opens menus
src/main/kotlin/kr/acda/arcshop/gui/ShopGuiListener.kt - Inventory GUI → Shop catalog: reads catalog
src/main/kotlin/kr/acda/arcshop/gui/ShopGuiListener.kt - Inventory GUI → Transaction service: runs trades
src/main/kotlin/kr/acda/arcshop/gui/ShopGuiListener.kt - Inventory GUI → Player inventory: counts items
src/main/kotlin/kr/acda/arcshop/gui/ShopGuiListener.kt - Browser controller → ARCLink service: registers actions
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → ARCLink service: serves browser
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Browser assets: renders page
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Shop catalog: reads catalog
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Transaction service: runs trades
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Player inventory: reads ownership
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Purchase limits: reads purchase counts
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Browser controller → Item signatures: formats item labels
src/main/kotlin/kr/acda/arcshop/web/ShopWebController.kt - Shop catalog → Shop models: indexes products
src/main/kotlin/kr/acda/arcshop/gui/ShopCatalog.kt - Shop menus → Item signatures: renders items
src/main/kotlin/kr/acda/arcshop/gui/ShopMenus.kt - Transaction service → Transaction ports: uses ports
src/main/kotlin/kr/acda/arcshop/core/service/TransactionService.kt - Transaction service → Shop models: validates prices
src/main/kotlin/kr/acda/arcshop/core/service/TransactionService.kt - Player inventory → Item signatures: converts items
src/main/kotlin/kr/acda/arcshop/item/PlayerInventoryStockPort.kt - Player inventory → Transaction ports: implements stock
src/main/kotlin/kr/acda/arcshop/item/PlayerInventoryStockPort.kt - Economy adapter → Transaction ports: implements economy
src/main/kotlin/kr/acda/arcshop/economy/ArcEconomyPort.kt - Cash adapter → Transaction ports: implements cash
src/main/kotlin/kr/acda/arcshop/db/JdbcCashPort.kt - Purchase limits → Transaction ports: implements limits
src/main/kotlin/kr/acda/arcshop/db/JdbcPurchaseLimitPort.kt - Module wiring → Shop configuration: loads settings
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Shared database: connects database
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Transaction service: assembles service
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Inventory GUI: registers listener
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Browser controller: registers optional UI
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Shop commands: registers commands
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Economy adapter: wires economy
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Cash adapter: wires cash
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Purchase limits: wires limits
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Player inventory: wires inventory
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → Shop catalog: builds catalog
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt - Module wiring → ARCLink service: checks optional service
src/main/kotlin/kr/acda/arcshop/ARCShopModule.kt