grqm259-spec

--- 📎 Attached 1 file(s):

File: pasted-code-1792167437464.txt

txt
# KODARI MASTER BUILD PROMPT — C-VIRTUAL SPAWNER BY QUIXZ STUDIO

Act as a senior Minecraft Paper plugin developer, Java architect, performance engineer, economy integration specialist, GUI designer, database engineer, and QA tester.

Build ONE complete, advanced Minecraft server plugin named **C-Virtual Spawner**, developed and branded by **Quixz Studio**.

This is a complete first-generation implementation task. Do not just create a prototype, architecture document, or a few Java files. Create the real Gradle project, implement the features, compile the plugin, resolve build errors, run available tests, and deliver the finished source project and JAR.

The goal is to create an exceptionally advanced virtual spawner system that combines virtual mob production, hostile-mob prevention, deep upgrade progression, automated resource management, comprehensive economy integrations, powerful GUIs, PlaceholderAPI support, protection compatibility, and a distinctive Quixz Studio brand.

Do not create any cosmetics plugin or unrelated plugin. Everything described below belongs to C-Virtual Spawner.

# 1. Plugin identity and technical requirements

**Official plugin name:** C-Virtual Spawner  
**Developer:** Quixz Studio  
**Brand identity:** QUIXZ PLUGINS  
**Main Java class:** `studio.quixz.cvirtualspawner.CVirtualSpawnerPlugin`  
**Suggested package:** `studio.quixz.cvirtualspawner`  
**Build system:** Gradle  
**Primary platform:** Minecraft Paper  
**Storage:** SQLite  
**Language:** Java

Choose the appropriate Java toolchain and Paper API for the actual target server.

Support the latest stable Paper version available at build time. Where practical, maintain a separately verified compatibility build for Paper 1.21.4. Do not target experimental releases as stable, and do not claim a version is supported unless the plugin has been built or tested appropriately.

Use standard Bukkit-compatible `plugin.yml` for broad plugin ecosystem compatibility. Use supported Paper APIs and Adventure components.

Requirements:
- No paid dependency.
- No required online API key.
- No compulsory external database server.
- No remote licensing server.
- No unnecessary NMS or unsafe reflection.
- Optional integrations must never prevent the base plugin from starting.
- No cosmetic features.
- No fake buttons, placeholders standing in for functionality, or dummy implementations presented as finished features.

First inspect the available development environment, build toolchain, and target server details. Then implement the complete project.

# 2. Core concept: fully virtual mob production

C-Virtual Spawner must not be an ordinary vanilla mob spawner with a timer attached.

Build a comprehensive **virtual mob production engine** that simulates production and resource generation without continuously spawning real mobs.

A virtual spawner represents a configured mob type and processes its configured production rules. It generates virtual drops and experience in persistent storage, with no actual mob entity required for its production cycle.

This is especially important because hostile mobs will be prevented from spawning in configured worlds.

The system must support:
- Physical, placeable custom spawner blocks.
- Virtual-only production.
- Friendly and hostile mob types.
- Advanced upgrade paths.
- Configurable production rates.
- Custom loot tables.
- Item and experience storage.
- Automated collection and selling.
- Offline production.
- Spawner progression.
- Item filtering.
- Spawner stacking.
- Player ownership and trust.
- Extensive economy compatibility.
- Protection-plugin integration.
- Custom placeholders.
- Administrator management tools.
- Fixed Quixz Studio branding.

All features must work together without resource duplication, lost storage, free purchases caused by integration failures, or excessive server load.

# 3. Custom spawner item and placement system

Players must be able to obtain, place, configure, upgrade, retrieve, and manage custom virtual spawners.

Each custom spawner must have a unique persistent identity.

Store:
- Unique spawner ID.
- Owner UUID.
- World and block coordinates.
- Mob type.
- Spawner tier.
- Upgrade levels.
- Production progress.
- Stored items.
- Stored experience.
- Item filters.
- Auto-collection settings.
- Auto-selling settings.
- Trusted player UUIDs.
- Creation timestamp.
- Last processing timestamp.
- Total resources generated.
- Total resources sold.
- Stacking data.
- Activation state.
- Applicable restrictions or permissions.

Identify custom spawner items using persistent item metadata such as the Persistent Data Container. Never rely only on the display name, lore, material type, or cosmetic appearance.

Prevent duplication and invalid transfers through:
- Normal block breaking.
- Explosion damage.
- Pistons.
- Hopper interactions.
- Inventory movement.
- Shift-clicks.
- Number-key swaps.
- Double-click collection.
- Death drops.
- Crafting and item transformations.
- World unloading.
- Server restarts.
- Repeated event handling.
- Other relevant inventory and block events.

Preserve all virtual storage when a spawner is moved, retrieved, upgraded, stacked, or removed.

If a player breaks a spawner, follow the configured retrieval rules and ensure that stored items, experience, upgrades, and ownership are handled safely.

If a block is destroyed by an explosion or an administrator removes it, never silently delete valuable resources. Use a documented recovery, drop, or recovery-queue mechanism.

# 4. Virtual production engine

Create a centralized, efficient production engine.

Do not create an independent repeating task for every placed spawner. Prefer a shared scheduler, due-time queue, or equivalent efficient design.

For each active spawner, the engine must:
1. Validate the spawner record and its configuration.
2. Calculate completed production cycles.
3. Apply the appropriate drop table.
4. Apply upgrades and configured multipliers.
5. Calculate experience rewards.
6. Enforce storage limits.
7. Process auto-collection or auto-selling rules.
8. Persist the resulting state safely.
9. Update relevant GUI displays without constantly refreshing every open inventory unnecessarily.

Support:
- Configurable production intervals.
- Configurable drop quantity ranges.
- Multiple drops per production cycle.
- Item-specific multipliers.
- Experience generation.
- Production speed levels.
- Resource quantity upgrades.
- Special upgrade paths.
- Spawner tiers.
- Configurable tier requirements.
- Configurable maximum levels.
- Per-player spawner limits.
- Per-world spawner limits.
- Maximum production backlog.
- Configurable offline production.
- Optional production while a chunk is unloaded.
- Configurable offline time caps.
- Configurable production caps and protection against excessive catch-up calculations.

Offline production must use trustworthy saved timestamps. Restarting the server must not award the same production interval repeatedly.

Do not load every chunk solely to update virtual spawners. Production should be calculated from saved state without forcing chunks to remain loaded.

For unavailable, invalid, or changed world locations, keep records recoverable and report the problem clearly.

# 5. Mob types and advanced loot system

Support a configurable range of common friendly and hostile mob types.

Friendly examples:
- Cow.
- Pig.
- Sheep.
- Chicken.
- Rabbit.
- Mooshroom.
- Other supported passive mobs.

Hostile examples:
- Zombie.
- Skeleton.
- Creeper.
- Spider.
- Cave Spider.
- Enderman.
- Blaze.
- Drowned.
- Witch.
- Slime.
- Magma Cube.
- Guardian.
- Phantom.
- Other supported hostile mobs.

Allow administrators to define additional supported types and production rules through configuration.

Create configurable virtual loot tables supporting:
- Multiple item drops.
- Independent drop chances.
- Minimum and maximum amounts.
- Guaranteed and optional drops.
- Fortune-style or custom multipliers.
- Experience rewards.
- Per-item sell prices.
- Tier-specific loot.
- Special drops.
- Configurable loot pools.

Clearly document how the virtual loot system works. Do not claim that every vanilla loot condition is reproduced exactly if those conditions have not been implemented.

Provide safe validation for materials, mob types, amounts, chance values, and other configurable data. Incorrect configuration must produce clear warnings rather than crash the entire plugin.

Optionally integrate with verified custom-mob or custom-item APIs, such as MythicMobs, ItemsAdder, and Oraxen, where supported. Custom integrations must use documented APIs and must not require actual mob spawning for normal virtual production.

# 6. Advanced upgrade and progression system

Build a deep upgrade system instead of a small menu offering only speed and amount multipliers.

Possible upgrade categories:
- Production speed.
- Resource yield.
- Storage capacity.
- Experience capacity.
- Auto-collection efficiency.
- Auto-selling capabilities.
- Special drop chances.
- Tier advancement.
- Additional virtual production modes.
- Advanced automation.

Each upgrade must have:
- Unique identifier.
- Display name.
- Description.
- Maximum level.
- Configurable cost.
- Supported currency.
- Clearly defined effect.
- Appropriate permission requirements.
- Upgrade prerequisites where applicable.

Implement a data-driven upgrade system so new upgrade types and values can be added without rewriting the complete plugin.

Every purchase must validate ownership, affordability, currency availability, maximum level, and prerequisites.

Charge the currency successfully before applying the upgrade. A failed transaction must never grant the upgrade for free.

Use safe transaction handling to prevent duplicate purchases or inconsistent data.

# 7. Item storage, filtering, and automation

Build a proper virtual storage interface.

Support:
- Item storage.
- Stored experience.
- Bulk collection.
- Collect-all option.
- Per-item collection.
- Auto-collection.
- Auto-selling.
- Item allowlists and blocklists.
- Per-item sell settings.
- Storage expansion.
- Configurable storage limits.
- Full-storage notifications.
- Optional automatic overflow handling.

Players must not lose resources when storage is full, auto-selling fails, a provider is unavailable, or the server restarts.

Implement an item-filter system so players can choose which drops are retained, sold, collected, or ignored.

If automatic selling is enabled, pay only for eligible items after a successful economy transaction.

Provide clear transaction results and transaction history for relevant administrator operations.

Support optional hopper interaction only when enabled, with safeguards against duplicating or repeatedly transferring virtual storage items.

# 8. Advanced spawner stacking

Implement optional spawner stacking.

Requirements:
- Stack compatible spawners of the same type.
- Show stack quantity clearly.
- Configure maximum stack size.
- Provide configurable stack costs if applicable.
- Preserve ownership and trust rules.
- Preserve storage and upgrade state.
- Prevent mixing incompatible types.
- Support splitting and removing stacked spawners safely.
- Prevent duplicated resources when merging or splitting.
- Keep production calculations consistent with the number and tier of stacked spawners.

If a stacking operation fails, the original spawner records must remain intact.

Do not use block display names as the sole source of truth for a stack.

# 9. Hostile-mob spawn prevention

This is a core part of C-Virtual Spawner.

I want configured worlds to allow normal friendly-mob spawning while preventing hostile mobs from appearing outside virtual spawner production.

Virtual hostile spawners must continue operating and generating their configured loot without spawning actual hostile entities.

Provide configurable world rules for:
- Natural hostile spawning.
- Hostile spawning from vanilla spawner blocks.
- Spawn eggs.
- Portals.
- Breeding or transformation-related hostile spawns where applicable.
- Raids and other hostile spawn sources.
- Plugin-triggered spawning.
- Administrator bypasses.
- Exempt entity types.
- Optional cleanup of pre-existing hostile mobs.

Do not block peaceful animals, villagers, pets, players, or permitted entities.

Avoid blindly cancelling every entity-spawn event. Understand the spawn reason and entity classification, and implement the configured rules carefully.

Provide options for:
- Per-world enablement.
- Configurable blocked types.
- Configurable exempt types.
- Cleanup on startup.
- Cleanup on chunk load.
- Manual administrator purge.
- Optional permissions-based bypass.

Example configuration:
yaml spawn-control: enabled: true worlds: - world - world_nether - world_the_end block-hostile-spawns: true allow-friendly-spawns: true block-spawn-eggs: true block-vanilla-hostile-spawners: true block-plugin-hostile-spawns: true purge-on-startup: false purge-on-chunk-load: false allow-admin-bypass: true exempt-types: []
text
C-Virtual-Spawner/
├── build.gradle
├── settings.gradle
├── gradlew
├── gradlew.bat
├── README.md
├── LICENSE
├── docs/
│   ├── INSTALLATION.md
│   ├── COMMANDS.md
│   ├── PLACEHOLDERS.md
│   ├── ECONOMY-INTEGRATIONS.md
│   ├── COMPATIBILITY.md
│   ├── CONFIGURATION.md
│   └── TROUBLESHOOTING.md
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── studio/quixz/cvirtualspawner/
│   │   │       ├── CVirtualSpawnerPlugin.java
│   │   │       ├── command/
│   │   │       ├── config/
│   │   │       ├── database/
│   │   │       ├── economy/
│   │   │       ├── gui/
│   │   │       ├── integration/
│   │   │       ├── loot/
│   │   │       ├── placeholder/
│   │   │       ├── protection/
│   │   │       ├── spawncontrol/
│   │   │       ├── spawner/
│   │   │       ├── upgrade/
│   │   │       └── util/
│   │   └── resources/
│   │       ├── plugin.yml
│   │       ├── config.yml
│   │       ├── messages.yml
│   │       ├── spawners.yml
│   │       ├── mob-drops.yml
│   │       ├── upgrades.yml
│   │       ├── economy.yml
│   │       ├── spawn-control.yml
│   │       ├── gui.yml
│   │       ├── integrations.yml
│   │       └── holograms.yml
│   └── test/
└── dist/
    └── C-Virtual-Spawner.jar

1 image attached
Kodari AI
KodariOct 16 at 4:25 pm 4
CVirtualSpawner
A comprehensive virtual mob production plugin for Paper servers. Players place custom spawner blocks that generate resources and experience without spawning actual mobs. Features include a data-driven upgrade system, virtual item storage with filtering and auto-selling, spawner stacking, offline production, and SQLite persistence. Includes hostile-mob spawn prevention per world, modular economy integration supporting Vault, PlayerPoints, and CoinsEngine, PlaceholderAPI expansion, protection plugin compatibility, and a full GUI system for shop, management, upgrades, and administration. Fixed QUIXZ PLUGINS branding with in-game watermark.
  1. Establish the Gradle/Paper project, SQLite persistence, and virtual production core.

  2. Add custom spawner placement, safe storage interactions, commands, and hostile-spawn rules.

  3. Add optional integrations, fixed branding, complete defaults, and installation/compatibility docs.

Created a foundational, incomplete C-Virtual Spawner project. It includes SQLite-backed spawner records, virtual loot and XP production, PDC-tagged spawner items, placement/retrieval, a basic storage menu, hostile-spawn filtering, optional Vault and PlaceholderAPI hooks, and the fixed QUIXZ PLUGINS boss-bar watermark.

It does not implement the full supplied brief. In particular, there is no shop or upgrade-purchase flow, auto-selling, stacking, filter or trust-management UI, admin backup/purge workflow, or direct adapters for the listed protection, hologram, shop, and custom-item plugins. Those limitations are documented in README.md and docs/.

Target: Paper 1.21.4 / Java 21. Vault and PlaceholderAPI are optional. No build or runtime tests were run, and no compiled JAR is verified or available yet.

To compile and download it in Kodari: click Compile (phone: ⋮ → Compile Project), click Compile in the window, then use Download on the successful build. Do not deploy this as a production-ready implementation of the complete brief without further development and testing.

grqm259-spec

hey not only for making 1.21.4 for 1.21 to 26.3 and i want advance plugin and well optimize then virtual spawner my pugin should has hooks? of

--- 📎 Attached 1 file(s):

File: pasted-code-1792168053845.txt

txt
# KODARI MASTER BUILD PROMPT — C-VIRTUAL SPAWNER BY QUIXZ STUDIO

Act as a senior Minecraft Paper plugin developer, Java architect, performance engineer, economy integration specialist, GUI designer, database engineer, and QA tester.

Build ONE complete, advanced Minecraft server plugin named **C-Virtual Spawner**, developed and branded by **Quixz Studio**.

This is a complete first-generation implementation task. Do not just create a prototype, architecture document, or a few Java files. Create the real Gradle project, implement the features, compile the plugin, resolve build errors, run available tests, and deliver the finished source project and JAR.

The goal is to create an exceptionally advanced virtual spawner system that combines virtual mob production, hostile-mob prevention, deep upgrade progression, automated resource management, comprehensive economy integrations, powerful GUIs, PlaceholderAPI support, protection compatibility, and a distinctive Quixz Studio brand.

Do not create any cosmetics plugin or unrelated plugin. Everything described below belongs to C-Virtual Spawner.

# 1. Plugin identity and technical requirements

**Official plugin name:** C-Virtual Spawner  
**Developer:** Quixz Studio  
**Brand identity:** QUIXZ PLUGINS  
**Main Java class:** `studio.quixz.cvirtualspawner.CVirtualSpawnerPlugin`  
**Suggested package:** `studio.quixz.cvirtualspawner`  
**Build system:** Gradle  
**Primary platform:** Minecraft Paper  
**Storage:** SQLite  
**Language:** Java

Choose the appropriate Java toolchain and Paper API for the actual target server.

Support the latest stable Paper version available at build time. Where practical, maintain a separately verified compatibility build for Paper 1.21.4. Do not target experimental releases as stable, and do not claim a version is supported unless the plugin has been built or tested appropriately.

Use standard Bukkit-compatible `plugin.yml` for broad plugin ecosystem compatibility. Use supported Paper APIs and Adventure components.

Requirements:
- No paid dependency.
- No required online API key.
- No compulsory external database server.
- No remote licensing server.
- No unnecessary NMS or unsafe reflection.
- Optional integrations must never prevent the base plugin from starting.
- No cosmetic features.
- No fake buttons, placeholders standing in for functionality, or dummy implementations presented as finished features.

First inspect the available development environment, build toolchain, and target server details. Then implement the complete project.

# 2. Core concept: fully virtual mob production

C-Virtual Spawner must not be an ordinary vanilla mob spawner with a timer attached.

Build a comprehensive **virtual mob production engine** that simulates production and resource generation without continuously spawning real mobs.

A virtual spawner represents a configured mob type and processes its configured production rules. It generates virtual drops and experience in persistent storage, with no actual mob entity required for its production cycle.

This is especially important because hostile mobs will be prevented from spawning in configured worlds.

The system must support:
- Physical, placeable custom spawner blocks.
- Virtual-only production.
- Friendly and hostile mob types.
- Advanced upgrade paths.
- Configurable production rates.
- Custom loot tables.
- Item and experience storage.
- Automated collection and selling.
- Offline production.
- Spawner progression.
- Item filtering.
- Spawner stacking.
- Player ownership and trust.
- Extensive economy compatibility.
- Protection-plugin integration.
- Custom placeholders.
- Administrator management tools.
- Fixed Quixz Studio branding.

All features must work together without resource duplication, lost storage, free purchases caused by integration failures, or excessive server load.

# 3. Custom spawner item and placement system

Players must be able to obtain, place, configure, upgrade, retrieve, and manage custom virtual spawners.

Each custom spawner must have a unique persistent identity.

Store:
- Unique spawner ID.
- Owner UUID.
- World and block coordinates.
- Mob type.
- Spawner tier.
- Upgrade levels.
- Production progress.
- Stored items.
- Stored experience.
- Item filters.
- Auto-collection settings.
- Auto-selling settings.
- Trusted player UUIDs.
- Creation timestamp.
- Last processing timestamp.
- Total resources generated.
- Total resources sold.
- Stacking data.
- Activation state.
- Applicable restrictions or permissions.

Identify custom spawner items using persistent item metadata such as the Persistent Data Container. Never rely only on the display name, lore, material type, or cosmetic appearance.

Prevent duplication and invalid transfers through:
- Normal block breaking.
- Explosion damage.
- Pistons.
- Hopper interactions.
- Inventory movement.
- Shift-clicks.
- Number-key swaps.
- Double-click collection.
- Death drops.
- Crafting and item transformations.
- World unloading.
- Server restarts.
- Repeated event handling.
- Other relevant inventory and block events.

Preserve all virtual storage when a spawner is moved, retrieved, upgraded, stacked, or removed.

If a player breaks a spawner, follow the configured retrieval rules and ensure that stored items, experience, upgrades, and ownership are handled safely.

If a block is destroyed by an explosion or an administrator removes it, never silently delete valuable resources. Use a documented recovery, drop, or recovery-queue mechanism.

# 4. Virtual production engine

Create a centralized, efficient production engine.

Do not create an independent repeating task for every placed spawner. Prefer a shared scheduler, due-time queue, or equivalent efficient design.

For each active spawner, the engine must:
1. Validate the spawner record and its configuration.
2. Calculate completed production cycles.
3. Apply the appropriate drop table.
4. Apply upgrades and configured multipliers.
5. Calculate experience rewards.
6. Enforce storage limits.
7. Process auto-collection or auto-selling rules.
8. Persist the resulting state safely.
9. Update relevant GUI displays without constantly refreshing every open inventory unnecessarily.

Support:
- Configurable production intervals.
- Configurable drop quantity ranges.
- Multiple drops per production cycle.
- Item-specific multipliers.
- Experience generation.
- Production speed levels.
- Resource quantity upgrades.
- Special upgrade paths.
- Spawner tiers.
- Configurable tier requirements.
- Configurable maximum levels.
- Per-player spawner limits.
- Per-world spawner limits.
- Maximum production backlog.
- Configurable offline production.
- Optional production while a chunk is unloaded.
- Configurable offline time caps.
- Configurable production caps and protection against excessive catch-up calculations.

Offline production must use trustworthy saved timestamps. Restarting the server must not award the same production interval repeatedly.

Do not load every chunk solely to update virtual spawners. Production should be calculated from saved state without forcing chunks to remain loaded.

For unavailable, invalid, or changed world locations, keep records recoverable and report the problem clearly.

# 5. Mob types and advanced loot system

Support a configurable range of common friendly and hostile mob types.

Friendly examples:
- Cow.
- Pig.
- Sheep.
- Chicken.
- Rabbit.
- Mooshroom.
- Other supported passive mobs.

Hostile examples:
- Zombie.
- Skeleton.
- Creeper.
- Spider.
- Cave Spider.
- Enderman.
- Blaze.
- Drowned.
- Witch.
- Slime.
- Magma Cube.
- Guardian.
- Phantom.
- Other supported hostile mobs.

Allow administrators to define additional supported types and production rules through configuration.

Create configurable virtual loot tables supporting:
- Multiple item drops.
- Independent drop chances.
- Minimum and maximum amounts.
- Guaranteed and optional drops.
- Fortune-style or custom multipliers.
- Experience rewards.
- Per-item sell prices.
- Tier-specific loot.
- Special drops.
- Configurable loot pools.

Clearly document how the virtual loot system works. Do not claim that every vanilla loot condition is reproduced exactly if those conditions have not been implemented.

Provide safe validation for materials, mob types, amounts, chance values, and other configurable data. Incorrect configuration must produce clear warnings rather than crash the entire plugin.

Optionally integrate with verified custom-mob or custom-item APIs, such as MythicMobs, ItemsAdder, and Oraxen, where supported. Custom integrations must use documented APIs and must not require actual mob spawning for normal virtual production.

# 6. Advanced upgrade and progression system

Build a deep upgrade system instead of a small menu offering only speed and amount multipliers.

Possible upgrade categories:
- Production speed.
- Resource yield.
- Storage capacity.
- Experience capacity.
- Auto-collection efficiency.
- Auto-selling capabilities.
- Special drop chances.
- Tier advancement.
- Additional virtual production modes.
- Advanced automation.

Each upgrade must have:
- Unique identifier.
- Display name.
- Description.
- Maximum level.
- Configurable cost.
- Supported currency.
- Clearly defined effect.
- Appropriate permission requirements.
- Upgrade prerequisites where applicable.

Implement a data-driven upgrade system so new upgrade types and values can be added without rewriting the complete plugin.

Every purchase must validate ownership, affordability, currency availability, maximum level, and prerequisites.

Charge the currency successfully before applying the upgrade. A failed transaction must never grant the upgrade for free.

Use safe transaction handling to prevent duplicate purchases or inconsistent data.

# 7. Item storage, filtering, and automation

Build a proper virtual storage interface.

Support:
- Item storage.
- Stored experience.
- Bulk collection.
- Collect-all option.
- Per-item collection.
- Auto-collection.
- Auto-selling.
- Item allowlists and blocklists.
- Per-item sell settings.
- Storage expansion.
- Configurable storage limits.
- Full-storage notifications.
- Optional automatic overflow handling.

Players must not lose resources when storage is full, auto-selling fails, a provider is unavailable, or the server restarts.

Implement an item-filter system so players can choose which drops are retained, sold, collected, or ignored.

If automatic selling is enabled, pay only for eligible items after a successful economy transaction.

Provide clear transaction results and transaction history for relevant administrator operations.

Support optional hopper interaction only when enabled, with safeguards against duplicating or repeatedly transferring virtual storage items.

# 8. Advanced spawner stacking

Implement optional spawner stacking.

Requirements:
- Stack compatible spawners of the same type.
- Show stack quantity clearly.
- Configure maximum stack size.
- Provide configurable stack costs if applicable.
- Preserve ownership and trust rules.
- Preserve storage and upgrade state.
- Prevent mixing incompatible types.
- Support splitting and removing stacked spawners safely.
- Prevent duplicated resources when merging or splitting.
- Keep production calculations consistent with the number and tier of stacked spawners.

If a stacking operation fails, the original spawner records must remain intact.

Do not use block display names as the sole source of truth for a stack.

# 9. Hostile-mob spawn prevention

This is a core part of C-Virtual Spawner.

I want configured worlds to allow normal friendly-mob spawning while preventing hostile mobs from appearing outside virtual spawner production.

Virtual hostile spawners must continue operating and generating their configured loot without spawning actual hostile entities.

Provide configurable world rules for:
- Natural hostile spawning.
- Hostile spawning from vanilla spawner blocks.
- Spawn eggs.
- Portals.
- Breeding or transformation-related hostile spawns where applicable.
- Raids and other hostile spawn sources.
- Plugin-triggered spawning.
- Administrator bypasses.
- Exempt entity types.
- Optional cleanup of pre-existing hostile mobs.

Do not block peaceful animals, villagers, pets, players, or permitted entities.

Avoid blindly cancelling every entity-spawn event. Understand the spawn reason and entity classification, and implement the configured rules carefully.

Provide options for:
- Per-world enablement.
- Configurable blocked types.
- Configurable exempt types.
- Cleanup on startup.
- Cleanup on chunk load.
- Manual administrator purge.
- Optional permissions-based bypass.

Example configuration:
yaml spawn-control: enabled: true worlds: - world - world_nether - world_the_end block-hostile-spawns: true allow-friendly-spawns: true block-spawn-eggs: true block-vanilla-hostile-spawners: true block-plugin-hostile-spawns: true purge-on-startup: false purge-on-chunk-load: false allow-admin-bypass: true exempt-types: []
text
C-Virtual-Spawner/
├── build.gradle
├── settings.gradle
├── gradlew
├── gradlew.bat
├── README.md
├── LICENSE
├── docs/
│   ├── INSTALLATION.md
│   ├── COMMANDS.md
│   ├── PLACEHOLDERS.md
│   ├── ECONOMY-INTEGRATIONS.md
│   ├── COMPATIBILITY.md
│   ├── CONFIGURATION.md
│   └── TROUBLESHOOTING.md
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── studio/quixz/cvirtualspawner/
│   │   │       ├── CVirtualSpawnerPlugin.java
│   │   │       ├── command/
│   │   │       ├── config/
│   │   │       ├── database/
│   │   │       ├── economy/
│   │   │       ├── gui/
│   │   │       ├── integration/
│   │   │       ├── loot/
│   │   │       ├── placeholder/
│   │   │       ├── protection/
│   │   │       ├── spawncontrol/
│   │   │       ├── spawner/
│   │   │       ├── upgrade/
│   │   │       └── util/
│   │   └── resources/
│   │       ├── plugin.yml
│   │       ├── config.yml
│   │       ├── messages.yml
│   │       ├── spawners.yml
│   │       ├── mob-drops.yml
│   │       ├── upgrades.yml
│   │       ├── economy.yml
│   │       ├── spawn-control.yml
│   │       ├── gui.yml
│   │       ├── integrations.yml
│   │       └── holograms.yml
│   └── test/
└── dist/
    └── C-Virtual-Spawner.jar

1 image attached
Kodari AI
KodariOct 16 at 4:32 pm 2
  1. Check the project’s current platform and structure.

  2. Align the target range with stable server versions and the requested compatibility hooks.

  3. Implement the supported, verifiable parts in the existing project without claiming untested integrations.

Yes—those are useful optional integration hooks, not required dependencies. Group them by what they actually do:

  • Protection: WorldGuard 7+, ProtectionStones, Towny, Lands, GriefPrevention, BentoBox, SuperiorSkyblock2, FabledSkyblock, and PlotSquared 7+. Check build/access permission for placement, breaking, and sensitive spawner actions.

  • Shops and currency: ShopGUI+, EconomyShopGUI, and EconomyShopGUI Premium. Treat shop-menu integration separately from currency support: use Vault or a verified provider for transactions, and only add shop entries through each plugin’s documented API.

  • Stacking: RoseStacker. Either prevent it from stacking your custom spawners or integrate its API so stack counts and stored resources stay consistent.

  • Holograms: DecentHolograms, FancyHolograms, and CMIHolograms as optional display adapters.

Keep each hook optional and isolated so a missing plugin or failed adapter cannot stop virtual production or the server from starting. Don’t list an integration as supported until its API behavior has been implemented and tested.

The current project targets Paper 1.21.4 / Java 21 and has Vault and PlaceholderAPI support; the hooks in the image are not implemented yet. For versions, target the lowest Paper API you intend to support, then test the 1.21 releases and the latest stable version available. Treat 26.3 as unverified until that server release is available and tested—api-version: '1.21' alone does not prove compatibility across the entire range.

grqm259-spec

bruh not that i want plugin start mesaage of that and spawner not have any storgae system and not too much of commands not a basic spawner plugin too dude i want to make advance virtual spawner plugin , reserch about virtual spawner plugin and redesign its new version with new versions too support of paper

1 image attached
Kodari AI
KodariOct 16 at 4:57 pm 2
  1. Audit the current spawner plugin and identify what needs replacing.

  2. Redesign it as an advanced virtual-spawner system with storage, progression, and a focused command set.

  3. Update Paper compatibility and startup presentation to match the new direction.Current audit found the project already has SQLite persistence and a basic virtual-production loop, but the player-facing management is still limited. I’m focusing the redesign on making that system feel like a complete virtual-spawner product—not replacing its persistence with a chest-style storage mechanic.

  1. The redesign now gives the existing virtual production system a management GUI, paid speed/yield/capacity upgrades, and optional Vault auto-sell; commands stay lean. Next I’m aligning the release branding and Paper compatibility notes.

  1. Virtual-spawner redesign: expanded the existing GUI for drop/XP collection, production controls, paid speed/yield/storage upgrades, and Vault auto-sell. Prices and limits are configurable; no extra commands were added.

  2. Storage: the project already had persistent SQLite storage. The redesign now exposes it in the GUI and lets players expand its capacity.

  3. v2 branding and Paper: bumped the plugin to 2.0.0, added the QUIXZ startup banner, and updated the build target to Paper 1.21.11 / Java 21. Live server behavior still needs runtime testing.

Kodari can make mistakes. Review important code before using.
Files
docs
src
build.gradle
LICENSE
manifest.kod
README.md
settings.gradle
Code
28 1,742
src/main/java/studio/quixz/cvirtualspawner/CVirtualSpawnerPlugin.java
package studio.quixz.cvirtualspawner;

import org.bukkit.Bukkit;
import org.bukkit.boss.BarColor;
import org.bukkit.boss.BarStyle;
import org.bukkit.boss.BossBar;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import studio.quixz.cvirtualspawner.command.SpawnerCommand;
import studio.quixz.cvirtualspawner.database.SpawnerRepository;
import studio.quixz.cvirtualspawner.economy.EconomyProvider;
import studio.quixz.cvirtualspawner.integration.BrandingListener;
import studio.quixz.cvirtualspawner.spawncontrol.HostileSpawnListener;
import studio.quixz.cvirtualspawner.spawner.SpawnerListener;
import studio.quixz.cvirtualspawner.spawner.ProductionEngine;
import studio.quixz.cvirtualspawner.spawner.SpawnerData;

import java.io.File;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;

public final class CVirtualSpawnerPlugin extends JavaPlugin {
    private final Map<String, SpawnerData> spawners = new ConcurrentHashMap<>();
    private SpawnerRepository repository;
    private ProductionEngine productionEngine;
    private EconomyProvider economyProvider;
    private boolean placeholderActive;
    private BossBar watermark;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("mob-drops.yml", false);
        try {
            repository = new SpawnerRepository(new File(getDataFolder(), "spawners.db"), getLogger());
            for (SpawnerData data : repository.loadAll()) spawners.put(data.getId().toString(), data);
            productionEngine = new ProductionEngine(this, spawners, loadLoot());
        } catch (SQLException exception) {
            getLogger().log(Level.SEVERE, "Could not initialize SQLite storage; plugin startup aborted.", exception);
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        SpawnerListener spawnerListener = new SpawnerListener(this);
        getServer().getPluginManager().registerEvents(spawnerListener, this);
        getServer().getPluginManager().registerEvents(new HostileSpawnListener(this), this);
        setupOptionalIntegrations();
        watermark = Bukkit.createBossBar(ChatColor.GOLD + "§lQUIXZ PLUGINS" + ChatColor.DARK_GRAY + " | "
                + ChatColor.YELLOW + "C-Virtual Spawner" + ChatColor.GRAY + " by Quixz Studio", BarColor.YELLOW, BarStyle.SOLID);
        getServer().getPluginManager().registerEvents(new BrandingListener(watermark), this);
        Bukkit.getOnlinePlayers().forEach(watermark::addPlayer);
        PluginCommand command = getCommand("cvspawner");
        if (command != null) {
            SpawnerCommand executor = new SpawnerCommand(this, spawnerListener);
            command.setExecutor(executor);
            command.setTabCompleter(executor);
        }

        long updateTicks = Math.max(1L, getConfig().getLong("production.update-ticks", 20));
        Bukkit.getScheduler().runTaskTimer(this, () -> productionEngine.tick(System.currentTimeMillis()), updateTicks, updateTicks);
        Bukkit.getScheduler().runTaskTimer(this, this::scheduleSave, 1200L, 1200L);
        getLogger().info("");
        getLogger().info("  ================================================");
        getLogger().info("  QUIXZ PLUGINS | C-Virtual Spawner v2.0.0");
        getLogger().info("  Virtual production, persistent storage and upgrades");
        getLogger().info("  Loaded " + spawners.size() + " saved spawner(s) | by Quixz Studio");
        getLogger().info("  ================================================");
    }

    @Override
    public void onDisable() {
        if (watermark != null) watermark.removeAll();
        if (repository == null) return;
        try {
            repository.saveAll(snapshot());
        } catch (SQLException exception) {
            getLogger().log(Level.SEVERE, "Failed to save spawners during shutdown; inspect the database before restoring a backup.", exception);
        }
    }

    public Map<String, SpawnerData> getSpawners() {
        return spawners;
    }

    public SpawnerRepository getRepository() {
        return repository;
    }

    public EconomyProvider getEconomyProvider() {
        return economyProvider;
    }

    public String economyStatus() {
        return economyProvider == null ? "unavailable (Vault provider not detected)"
                : economyProvider.getName() + " (" + economyProvider.getCurrencyName() + ")";
    }

    public boolean isPlaceholderActive() {
        return placeholderActive;
    }

    public void reloadPluginConfiguration() {
        reloadConfig();
        productionEngine.setLoot(loadLoot());
    }

    private YamlConfiguration loadLoot() {
        return YamlConfiguration.loadConfiguration(new File(getDataFolder(), "mob-drops.yml"));
    }

    private void setupOptionalIntegrations() {
        if (getServer().getPluginManager().getPlugin("Vault") != null) {
            try {
                Class<?> adapterClass = Class.forName("studio.quixz.cvirtualspawner.economy.VaultEconomyProvider", true, getClass().getClassLoader());
                Object adapter = adapterClass.getConstructor(JavaPlugin.class).newInstance(this);
                if (adapter instanceof EconomyProvider provider && provider.isAvailable()) economyProvider = provider;
                if (economyProvider == null) getLogger().warning("Vault is installed, but no Vault economy service is registered.");
            } catch (ReflectiveOperationException | LinkageError exception) {
                getLogger().log(Level.WARNING, "Vault integration could not be initialized; economy features remain unavailable.", exception);
            }
        }
        if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) {
            try {
                Class<?> expansionClass = Class.forName("studio.quixz.cvirtualspawner.placeholder.CVirtualSpawnerExpansion", true, getClass().getClassLoader());
                Object expansion = expansionClass.getConstructor(CVirtualSpawnerPlugin.class).newInstance(this);
                placeholderActive = Boolean.TRUE.equals(expansionClass.getMethod("register").invoke(expansion));
                if (!placeholderActive) getLogger().warning("PlaceholderAPI is present, but the C-Virtual Spawner expansion did not register.");
            } catch (ReflectiveOperationException | LinkageError exception) {
                getLogger().log(Level.WARNING, "PlaceholderAPI integration could not be initialized.", exception);
            }
        }
    }

    private void scheduleSave() {
        List<SpawnerData> snapshot = snapshot();
        Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
            try {
                repository.saveAll(snapshot);
            } catch (SQLException exception) {
                getLogger().log(Level.SEVERE, "Periodic spawner save failed; a later save will retry.", exception);
            }
        });
    }

    private List<SpawnerData> snapshot() {
        return spawners.values().stream().map(SpawnerData::snapshot).toList();
    }
}