ZombieApocalypseSSS
A full-featured zombie apocalypse survival plugin for Paper 1.21+
Turn your Minecraft server into a post-apocalyptic nightmare — one corpse at a time.
📖 Table of Contents
- ✨ Features
- 📦 Requirements
- 🚀 Installation
- ⌨️ Commands & Permissions
- 🔧 Configuration
- 🔫 CombatGunSSS Integration
- 🧩 Developer API
- 🔍 Troubleshooting
- ❓ FAQ
- 📄 Credits
✨ Features
🧠 Advanced Zombie AI
- 15+ configurable zombie types (Tank, Screamer, Assassin, Boss, etc.)
- Hive Mind — group aggro behavior
- Noise system — blocks, gunshots, explosions attract zombies
- Scent detection — sneak < walk < sprint
- Feign Death zombies revive after a delay
- Breaker AI — destroy doors and blocks
- Sun weakness (burn or slow)
🎯 Tier Evolution System
| Tier | Multiplier | Speed | Knockback |
|---|---|---|---|
| Primal | ×1.0 | — | 0 |
| Adapted | ×1.2 | +0.1 | 0 |
| Mutated | ×1.5 | +0.2 | 0.2 |
| Aberrant | ×2.5 | +0.3 | 0.5 |
📈 Progressive Difficulty
| Phase | Days | Spawn Rate | Unlock |
|---|---|---|---|
| 1 | 0–5 | 40% | Basic zombies |
| 2 | 6–15 | 70% | Status zombies |
| 3 | 16–30 | 90% | Special zombies |
| 4 | 31+ | 100% | All types |
⚠️ Fixed in 4.4.0: Phase-based spawning now works correctly.
🧬 Infection System
- 0–100 infection points
- Effects scale with level
- +5 per hit (30% chance)
- Natural decay (~1 point / 30s, faster in safe zones)
🧠 Psychological Horror (Sanity)
- BossBar display (green → purple)
- Hallucinations, fake sounds, fake messages
- Drains in darkness, near zombies, when alone
⚠️ Fixed in 4.4.0: All sanity multipliers now apply correctly.
🔥 Campfire Safe Zones
- Prevent zombie spawning
- Heal players and reduce infection
- 3 upgrade tiers
- Zombies can destroy them
🩹 Survival Items
- Bandage — stop bleeding
- Antivirus — reset infection
- Adrenaline — temporary boost with crash
- Zombie Camo — ignored by zombies
- Radio — locate supply drops
🌙 Blood Moon
- Random night event (default 5%)
- Increased spawn rate and stronger zombies
- API events available
📦 Supply Drops
- Random drops near players
- Fully configurable loot table
- Optional coordinate broadcast
⚠️ Fixed in 4.5.0: Tier 3 campfire radius now correctly blocks zombie spawns.
🔫 Sentry Turrets
- Auto-target zombies
- Multiple ammo types
- Persistent across restarts
⚠️ Fixed in 4.4.0: Data loss issue resolved.
🌍 World Structures
- Military Checkpoint
- Crashed Plane
- Hospital
- Survivor Camp
- Outpost
✔️ Scale with difficulty ✔️ No ocean spawning
📖 Survival Guide GUI
- Interactive in-game guide
- Covers all systems and mechanics
📦 Requirements
| Component | Version |
|---|---|
| Java | 21+ |
| Paper | 1.21+ |
| WorldGuard | Optional |
| ProtocolLib | Optional |
🚀 Installation
- Download the
.jar - Place it in
plugins/ - Start the server
- Edit configs
- Use
/zapoc reload
⌨️ Commands
| Command | Description |
|---|---|
/zapoc reload |
Reload config |
/zapoc summon |
Spawn zombie |
/zapoc infect |
Infect player |
/zapoc cure |
Cure |
/zapoc panic |
Spawn horde |
/zapoc bloodmoon |
Toggle event |
/zapoc supplydrop |
Force drop |
/zapoc stats |
View stats |
🔐 Permissions
| Permission | Description |
|---|---|
zapoc.admin |
Full access |
zapoc.use |
Use features |
zapoc.immune |
Immune to infection |
🔧 Configuration
Config files:
config.ymlzombies.ymlitems.ymlevents.ymlmechanics.ymlturrets.ymlsun-effect.ymlspawn-control.ymlmessages_en.ymlmessages_vi.yml
🔫 CombatGunSSS Integration
👉 https://modrinth.com/plugin/combatgunsss
- 30+ guns
- Full compatibility
- Optional but recommended
🧩 Developer API
ZombieApocAPI api = ZombieApocAPI.getInstance();
api.isInfected(player);
api.getInfectionPoints(player); // raw 0–100
api.getSanity(player); // new in 4.5.0
api.isBleeding(player); // new in 4.5.0
api.spawnZombie(world, location, "tank");
api.isInSafeZone(location);
Events:
- BloodMoonStartEvent
- BloodMoonEndEvent
- SupplyDropEvent
- ZombieInfectEvent
🔍 Troubleshooting
Zombies not spawning
- Check
spawn-control.enabled - Ensure world is enabled
- Use Paper (not Spigot)
- Test with
/zapoc summon
Zombies spawning inside Tier 3 campfire zones
- Fixed in 4.5.0
- The spawn-block check now uses a 5×5 chunk search to cover the full 40-block radius
API zombie has wrong / mixed type after spawnZombie()
- Fixed in 4.5.0
- Previous builds applied a random type first then the requested type, leaving stale PDC keys
Spawn phases not working
- Fixed in 4.4.0
- Update plugin
Sanity system not working
- Fixed in 4.4.0
- Check
mechanics.yml
Infection not disabling
- Fixed in 4.4.0
Turrets disappearing
- Fixed in 4.4.0
Recipes not showing
- Fixed in 4.3.3
Zombie names broken
- Fixed in 4.3.3
Structures spawning in ocean
- Fixed in 4.3.1+
/reload breaks plugin
- Always restart server
❓ FAQ
Does this replace vanilla zombies?
Optional — configurable.
Does it support multiple worlds?
Yes.
Is it laggy?
Optimized, but depends on config.
Can I disable infection?
Yes (config.yml).
Do I need CombatGunSSS?
No, but recommended.
Does it support Spigot?
No — Paper only.
📄 Credits
Author: Duong2012G License: Apache 2.0
Open source — contributions welcome.
How to Install ZombieApocalypseSSS (Plugin)
ZombieApocalypseSSS by Duong2012G is verified for Bukkit, Paper, Purpur, Spigot across Minecraft versions 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5 (latest release: 4.7.0, file size: 255 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5) and platform (Bukkit, Paper, Purpur, Spigot).
- Make sure you have the compatible loader or environment installed for Bukkit, Paper, Purpur, Spigot.
- Move the downloaded ZombieApocalypseSSS file into your Minecraft
.minecraft/pluginsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 2mo ago | 70 | ||||
| 2mo ago | 35 | ||||
| 2mo ago | 23 | ||||
| 2mo ago | 18 | ||||
| 2mo ago | 14 | ||||
| 2mo ago | 12 | ||||
| 2mo ago | 10 | ||||
| 2mo ago | 9 | ||||
|
R
4.3
|
2mo ago | 8 | |||
|
R
4.2
|
2mo ago | 7 | |||
|
R
4.1
|
2mo ago | 6 | |||
| 2mo ago | 6 | ||||
|
R
3.8
|
2mo ago | 5 | |||
|
R
3.7
|
2mo ago | 5 | |||
|
R
3.6
|
2mo ago | 5 | |||
| 2mo ago | 4 | ||||
| 2mo ago | 4 | ||||
| 2mo ago | 4 | ||||
|
R
3.2
|
2mo ago | 4 | |||
|
R
Fix CMD
|
2mo ago | 4 | |||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
|
R
1.5
|
2mo ago | 2 | |||
|
R
1.4
|
2mo ago | 2 | |||
|
R
1.3.1
|
2mo ago | 2 | |||
|
R
1.3
|
2mo ago | 2 | |||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
|
R
1.0
|
2mo ago | 2 |
Added
StructureHelper.levelFoundation(): before any other building happens, it nowlevels the footprint to a flat pad at the resolved ground Y — filling gaps below (so
floors don't float over a dip) and clearing bumps above (so a mound or tree stump can't
poke through a wall), capped at 6 blocks either way so a badly out-of-range forced spawn
can't dig an enormous hole. Wired into all 7 structures'
spawn().#
## [4.6.0] — Full Bug Sweep + New Structures
10 bugs found and fixed via full manual code review of every source file (not a
targeted diff — every
.java file was read end-to-end), plus 2 new structures.### 🔴 Critical Fixes
#### BUG-1 · Boss Zombie drops Diamond Armour on death
- File:**
ZombieSpawnService.java—spawnBossZombie() - Root cause:**
setArmorContents()was called without setting drop chances to 0.
Chestplate by killing the Boss.
- Fix:** Added explicit
setHelmetDropChance(0f),setChestplateDropChance(0f),
setLeggingsDropChance(0f), and setBootsDropChance(0f) after every armourassignment, including the custom-model-data head path.
#### BUG-2 · Boss HP inconsistent —
evolveZombie() multiplier overridden- File:**
ZombieSpawnService.java—spawnBossZombie() - Root cause:**
spawnCustomZombie()internally calledevolveZombie()which
spawnBossZombie()then hard-reset the attribute to
boss.health config value, discarding the tierscaling entirely.
- Fix:**
spawnBossZombie()now setsbossHealthfirst, *then* calls
evolveZombie() so the tier multiplier compounds on top of the intended base.Boss HP in late-game now scales correctly with the threat level.
### 🟡 Medium Fixes
#### BUG-3 · ABERRANT zombies appear ~35 days too early
- File:**
ZombieEvolutionService.java—determineTier() - Root cause:** The
elsebranch coveredthreat >= 30, but the class-level
enemies during Phase 3 (Day ~15) instead of Phase 5 (Day ~25+).
- Fix:** Inserted an explicit
threat < 50bracket (no ABERRANT, Mutated max)
threat >= 50 only, matching the original design intent.#### BUG-4 ·
/zapoc infect shows hardcoded "10m" regardless of config- File:**
ZombieApoc.java—onCommand()case"infect" - Root cause:**
incubationTickswas read from config but immediately discarded;
"10m".- Fix:**
timeDisplayis now derived fromincubationTicks / 20seconds so the
#### BUG-5 · ZombieBehaviorTask batch-skipping uses
hashCode() % 2 (uneven distribution)- File:**
ZombieBehaviorTask.java—run() - Root cause:**
UUID.hashCode()is a 32-bit hash with no uniformity guarantee.
the other, defeating the purpose of two-bucket batching.
- Fix:** Changed the modulus operand to
UUID.getLeastSignificantBits()which is
#### BUG-6 ·
HallucinationListener double-registration on /zapoc reload- File:**
ZombieApoc.java—startTasks() - Root cause:**
startTasks()checkedif (hallucinationListener == null)before
cancelAllTasks() already set it to null.In specific ed
...
### Fixed
- Turret system completely non-functional — Adventure vs. Legacy API mismatch (BF-16)** —
(
meta.displayName(Component.text(...))). TurretListener.isTurretItem() read the namewith the deprecated Legacy API (
meta.getDisplayName()), which always returns an emptystring when the name was set via Adventure — so the check never matched and
TurretManager.createTurret() was never called. Placing a crafted turret had no effect.isTurretItem() now reads the Adventure displayName() component first, serialises it toplain text, and falls back to the legacy accessor for pre-migration items.
onDisable()never calledturretManager.cleanup()— turret data loss on restart (BF-17)** —
CampfireManager.shutdown() was called in onDisable() but the analogousTurretManager.cleanup() call was absent. cleanup() is responsible for cancelling theinternal firing task and flushing
turrets_data.yml. Turrets placed during a sessionwithout a prior auto-save were silently lost on server restart.
turretManager.cleanup() is now called from onDisable()./zapoc reloadwiped all zombie custom AI — missingscanExistingZombies()call (BF-19)** —
loadConfig() (called by loadAllConfigs() at the start of every reload) calledtrackedZombies.clear(). ZombieBehaviorTask iterates that collection each tick; aftera reload it was empty, so every living custom zombie lost its AI (no moans, no screaming,
no sun effect, no mutation) until the zombie died or new ones spawned.
scanExistingZombies() is now called at the end of the reload handler to repopulatethe map immediately.
/zapoc reloaddid not rebuildTurretManager— config changes had no effect (BF-18)** —
TurretManager reads range, damage, and fire-rate-ticks only in its constructor.After a reload the old instance kept running with stale values. The reload handler now
calls
turretManager.cleanup() and recreates a fresh TurretManager, matching thepattern already applied to
StructureManager.- Feign-Death zombie permanently invulnerable and AI-less after server restart (BF-20)** —
invulnerable=true and AI=false, thenscheduled a
BukkitRunnable to revive it after 3–5 s. If the server restarted duringthat window, the task was discarded but the entity flags persisted in NBT — leaving an
immortal, motionless zombie that could never be killed. A new PDC key
feign_active isset at the start of feign-death and cleared on revive.
ZombieCleanupListener.onChunkLoadnow detects this key and immediately invokes the shared
SpecialZombieListener.reviveZombie()method, which also handles the scheduled revive path.
CampfireManager.damageCampfire()triggered a full YAML write on every zombie hit (BF-21)**
### Fixed
SurvivalGuideListener.PAGE_KEYNPE on startup** —static final NamespacedKey PAGE_KEY
NullPointerException on every server start. PAGE_KEY is now an instance fieldinitialised in the constructor. *(BF-01)*
InfectionListenerignoredinfection.enabledconfig** — infection spread on every
infection.enabled: false in config.yml. ZombieBehaviorServicealready checked the flag but
InfectionListener did not, making the config optionpartially ineffective. *(BF-02a)*
InfectionListenerignoredzapoc.immunepermission** — players withzapoc.immune
InfectionListener and ZombieBehaviorService. *(BF-02b)*- Day-based spawn-rate (
shouldSpawn()) was completely bypassed** —ZombieBehaviorService
EventPriority.HIGH and cancelled natural spawns before SpawnListener ran,so the phase-based rates (40% / 70% / 90% / 100%) never took effect — zombies always
spawned at 100% regardless of server age.
shouldSpawn() is now called directly insideZombieBehaviorService.onCreatureSpawn. *(BF-03)*TurretManagercould permanently deleteturrets_data.yml** — the save code called
dataFile.delete() before renameTo(). If the rename failed the data file was gonepermanently. Replaced with
Files.move(ATOMIC_MOVE) and a non-atomic fallback. *(BF-04)*- Sanity config multipliers loaded but never applied** —
sanityDrainBase,
nightMultiplier, infectedMultiplier, lowHealthMultiplier, andnearbyZombiesMultiplier were read from mechanics.yml but updateSanity() usedhardcoded constants. Editing these values in config had no visible effect. All five
multipliers are now applied correctly. *(BF-05)*
whisperPhrasesconfig key loaded but never used** —handleWhispers()used an
mechanics.yml. Player-configuredphrases including
phrases-vi / phrases-en are now displayed correctly. *(BF-06)*hg.no-netherite-dropbypass via corpse zombie** — the death handler stripped netherite
event.getDrops() but then re-equipped the corpse zombie with raw armour includingnetherite. A player could kill the corpse to recover the items. Netherite is now stripped
from the corpse's equipment when the option is enabled. *(BF-07)*
- Tank zombie
ENTITY_RAVAGER_STEPsound spam** —handleTank()fired a full-volume step
active. A 10% per-call chance now limits the frequency. *(BF-08)*
panicCooldownsHashMap memory leak** — UUID entries were added on/zapoc panicbut
onPlayerQuit. *(BF-09)*## Custom Items Retained
- Bandage** – stops bleeding
- Antivirus** – cures infection
- Adrenaline** – speed/strength boost (60s cooldown, crash effect after)
- ZombieCamo** – zombies ignore you for 60s
- Radio** – detect next supply drop location (5min cooldown)
## Bug Fixes
| # | Severity | File | Description |
|---|----------|------|-------------|
| 33 | 🔴 | ZombieSpawnService | Zombie names encoded as
§c§lSCREAMER → fixed to §c§lSCREAMER. Affected: SCREAMER, Stalker, Crawler, Feign Death, Boss. Names were rendering as garbage text on all servers. || 34 | 🔴 | ZombieApoc (onEnable) |
registerRecipes() was never called — comment RECIPES REMOVED was accidentally left after feature re-enable. All 6 vanilla crafting recipes (bandage, antivirus, adrenaline, zombie camo, radio, turret) were silently unavailable. || 35 | 🔴 | BandageItem |
create() read custom-model-data from getPluginConfig() (config.yml) instead of getItemsConfig() (items.yml). Bandages would always spawn without CustomModelData, breaking resource packs. || 36 | 🔴 | SurvivalGuideListener |
SurvivalGuideHolder.getInventory() returned null — violates InventoryHolder contract. Fixed: holder stores and returns its own Inventory reference. || 37 | 🔴 | MilitaryCheckpoint |
spawnTowerSniper() re-rolled random offset/height instead of using the cached towerBase/towerHeight computed in cacheTowerPosition(). Tower snipers could spawn anywhere except the actual tower. || 38 | 🟠 | AdrenalineItem |
onInteract() lacked RIGHT_CLICK_AIR / RIGHT_CLICK_BLOCK guard. Item could trigger on LEFT_CLICK_BLOCK in edge cases. || 39 | 🟠 | ZombieApoc (TabComplete) |
/zapoc give camo was listed in tab-complete but the switch-case expected "zombie-camo". Fixed to "zombie-camo" in both places. || 40 | 🟠 | CrashedSupplyPlane |
setMaxHealth() deprecated since Bukkit 1.16. All mob health now uses Attribute.GENERIC_MAX_HEALTH.setBaseValue(). Affected: pilot, supply guard, medic, soldier zombies. || 41 | 🟠 | MilitaryCheckpoint | Same
setMaxHealth() deprecation fix for heavy soldiers, commanders, and tower snipers. || 42 | 🟠 | AbandonedHospital |
WHITE_BED placement ignored required BlockData facing direction — bed failed silently. Replaced with WHITE_WOOL as visual equivalent. || 43 | 🟠 | RadioItem | Lore cooldown update only scanned main hand + off hand. If player moved radio to any other slot the cooldown label stayed stale forever. Fixed to scan full inventory. |
| 44 | 🟡 | Structure types (×5) |
isReplaceable() and isValidMobSpawn() copy-pasted in 5 classes. Extracted to new StructureHelper utility class. || 45 | 🟡 | AbandonedHospital, AbandonedOutpostPro, SurvivorCamp | Structure zombies used vanilla
world.spawnEntity() — bypassing custom AI, tier evolution, sun effects, and tracking. Now use ZombieSpawnService.spawnCustomZombie(). |## New Utility Class
## Custom Items Retained
- Bandage** – stops bleeding
- Antivirus** – cures infection
- Adrenaline** – speed/strength boost (now with 60s cooldown)
- ZombieCamo** – zombies ignore you for 60s
- Radio** – detect next supply drop location
## Removed Items
Gun system (commented out), Ammo, Landmine, Grenade, Flashbang, MedKit — stubs removed from ZombieUtils.
## Bug Fixes
| # | Severity | File | Description |
|---|----------|------|-------------|
| 1 | 🔴 | WorldEventTask | Blood Moon now rolls **once per night**, not every 5 s (was ~99% effective chance) |
| 2 | 🔴 | ZombieApoc |
/zapoc infect & /zapoc cure now use infectionPointsKey (new system) || 3 | 🟠 | PlayerStatusTask | Removed legacy
infectKey migration block that caused same-tick inconsistency || 4 | 🟠 | WorldEventTask | Supply drop location uses
getHighestBlockYAt on main thread safely || 5 | 🟠 | WorldEventTask | Loot chance uses
nextDouble()*100 (was nextInt(100) >= double) || 6 | 🟡 | PlayerStatusTask |
tickCount changed to long (no overflow) || 7 | 🟡 | ZombieApoc |
isPlayerInfected() now checks infectionPointsKey || 8 | 🟡 | WorldEventTask | Blood Moon messages routed through i18n system |
| 9 | 🔴 | ZombieCleanupListener | Zombie tracking restored on chunk reload (
ChunkLoadEvent) || 10 | 🔴 | ZombieApoc |
/zapoc reload unregisters old StructureManager listener (was multiplying on each reload) || 11 | 🟠 | StructureManager | Structures skip ocean/river biomes |
| 12 | 🟠 | ZombieBehaviorTask | Screamer config now reads from correct file (
zombies.yml) and correct path || 13 | 🟡 | WorldEventTask | Supply drop rotates among random online player (not always first in list) |
| 14 | 🟡 | PlayerStatusTask | Bleeding uses
System.currentTimeMillis() for stable 2 s interval under lag || 15 | 🔴 | AntivirusItem | Now clears
infectionPointsKey — previously never worked || 16 | 🔴 | ZombieUtils | All
getItemByKey calls are null-safe with log warnings || 17 | 🟠 | AdrenalineItem | 60-second cooldown added (was infinite-spam) |
| 18 | 🟠 | ItemListener |
EquipmentSlot.HAND guard prevents items firing twice per click || 19 | 🟡 | PsychologicalHorrorTask | Hallucination zombie spawned as PLUGIN reason, not intercepted by SpawnListener |
| 20 | 🟡 | RadioItem | Cooldown lore update checks both main hand and offhand |
| 21 | 🟡 | SpecialZombieListener |
NamespacedKey for ability cooldown cached (not created per-hit) || 22 | 🔴 | ZombieCamoItem | Now writes to
plugin.getCamoKey() ("apoc-camo") — previously never worked || 23 | 🔴 | BandageItem | Checks
PersistentDataType.INTEGER (was BYTE) — previously never worked || 24 | 🔴 | ZombieBehaviorService |
onPlayerDeath uses correct key names — bleeding/infect now cleared on death || 25 | 🟠 | ZombieUtils | Removed dead stubs for unregistered item keys (gun, ammo, landmine, etc.) |
| 26 | 🟠 | ZombieBehaviorService | Bleeding config reads from `
...
> Complete overhaul of all structure generation code for maintainability and safety.
### 🏗️ Structure System Overhaul
#### MilitaryCheckpoint.java
- Refactored rotation system**: Unified
transform()andapplyRotation()methods - Variant enum system**: Converted from integers to proper
Variantenum (ABANDONED, OVERRUN, ACTIVE) - Constants extraction**: Added 50+ named constants:
SPAWN_RADIUS,MAX_TERRAIN_HEIGHT_DIFFROAD_LENGTH,ROAD_HALF_WIDTHBARRIER_LENGTH_BASE,TOWER_HEIGHT_BASESHULKER_CHANCE,CHEST_SEARCH_ATTEMPTSHEAVY_SPAWN_CHANCE,BOSS_HEALTH_BASE, etc.- Improved setBlockSafe()**: Added comprehensive
isReplaceable()helper - Cached tower position**: Pre-calculate for sniper spawning
#### CrashedSupplyPlane.java
- Fixed setBlockSafe()**: Properly handles replaceable blocks
- Mob spawn safety**: Added
isValidMobSpawn() - Location-based random**: Unique randomness per structure
- Performance optimization**: Reduced
Location.clone()calls - Improved canSpawn()**: Height variation checks
#### AbandonedHospital.java
- Added constants**:
SPAWN_CHECK_RADIUS,MAX_HEIGHT_VARIATION,ZOMBIE_COUNT - Safe block placement**:
setBlockSafe()withisReplaceable() - Mob spawn safety**:
isValidMobSpawn() - Safe chest placement**:
placeChestSafely()
#### SurvivorCamp.java
- Complete refactor**: Extracted all magic numbers to constants
- Tent validation**:
buildTent()checks space before building - Safe methods**:
setBlockSafe(),placeBlockSafely(),placeChestSafely()
#### AbandonedOutpostPro.java
- Added constants**:
FENCE_BROKEN_CHANCE,STRUCTURE_RADIUS - Improved canSpawn()**: Height check + replaceable block validation
- Mob spawn safety**:
spawnOutpostZombies()with validation
### 🧹 Code Cleanup
#### Removed Unused Files (11 files)
- EngineeringTableManager.java** — No longer used
- items/impl/*.java** (10 files) — Unused items:
- ChainsawItem.java, FlashbangItem.java, GrenadeItem.java
- KatanaItem.java, LandmineItem.java, MedKitItem.java
- MeleeWeaponItem.java, MolotovItem.java, SimpleItem.java
- ZGunWeapon.java
#### Updated Files
- StructureManager.java** — Changed
AbandonedOutpost→AbandonedOutpostPro
### 📊 Statistics
- Files refactored**: 5 structure files
- Files deleted**: 11 unused files
- Constants added**: 75+
- Helper methods added**: 15+
### 🔒 Safety Improvements
All structures now have:
- ✅
setBlockSafe()withisReplaceable() - ✅
isValidMobSpawn()for safe spawning - ✅ Height-aware
canSpawn()validation - ✅ Location-based random seed
- ✅ Constants replacing magic numbers
> Plugin refactored to focus on core survival mechanics. Guns and weapons moved to separate plugin.
### 🔥 Major Changes
#### 🗑️ Removed Custom Items (except 5 core items)
All custom items have been removed except:
- Bandage** — Paper ×2 + String
- Antivirus** — Golden Apple + Potion + Fermented Spider Eye
- Adrenaline** — Sugar + Glowstone Dust + Spider Eye
- Zombie Camo** — 8× Rotten Flesh + Slime Ball
- Radio** — 9× Compass
- Removed:** medkit, molotov, grenade, flashbang, landmine, goggles, all guns (pistol, smg, ak47, sniper, shotgun), all melee weapons (bat, katana, chainsaw, axes), and ammo.
#### 🔨 Removed Engineering Table
The
EngineeringTableManager has been completely removed. All remaining items now use **vanilla crafting table** recipes.#### 🔫 CombatGunSSS Integration
For guns, ammo, and advanced weaponry, install the companion plugin:
- [CombatGunSSS](https://modrinth.com/plugin/combatgunsss)** — 30+ guns with ballistics engine
- Full API compatibility between plugins
- Seamless infection and zombie damage integration
> 23 bugs fixed across all severity levels. This release focuses entirely on
> correctness, stability, and developer experience — no new gameplay features,
> just a rock-solid foundation.
### 🔴 Critical Fixes
#### 🏰 Turrets lost on every server restart *(BUG-02)*
loadTurrets() and saveTurrets() were both empty // TODO stubs.Every turret placed by players vanished after a restart.
- Fix:** Full persistence implemented via
turrets_data.ymlusing atomic
.tmp → rename) to prevent data corruption on crashes.#### 📦 Supply Drop loot table was never loaded *(BUG-03)*
spawnSupplyDrop() read supply-drop.loot from config.yml, but this sectionis defined in
events.yml. The config section was always null, so everySupply Drop fell back to a hardcoded 5-item list, ignoring all admin configuration.
- Fix:**
spawnSupplyDrop()and all related methods now read exclusively from
eventsConfig (events.yml). Admin-configured loot tables are now respected.#### 🌕
blood-moon.chance config had no effect *(BUG-04)*The
bloodMoonChance field was loaded from config (default 5%) but neverreferenced in
checkBloodMoon(). Blood Moon triggered at 100% probabilityevery N days instead of the configured 5% chance.
- Fix:**
Math.random() < bloodMoonChancecheck added incheckBloodMoon().
#### 💥
NullPointerException when Molotov reached max range *(BUG-05)*ProjectileHitEvent fires when a projectile expires at max range, at which pointboth
getHitBlock() and getHitEntity() return null. The handler assumed atleast one was non-null, causing a server-crashing NPE.
- Fix:** Three-way null check: hit block → hit entity → projectile location (fallback).
### 🟠 High Severity Fixes
#### 🩸 Bleeding damage triggered every 40 seconds instead of 2 *(BUG-06)*
PlayerStatusTask runs every 20 ticks (1 second). The bleeding check usedtickCount % 40 == 0, which fires every 40 *runs* = every **40 seconds**.Players with bleeding could regenerate faster than they took damage.
- Fix:** Changed to
tickCount % 2 == 0→ bleeds every 2 seconds as intended.
#### ⚠️ No combined cap on zombie difficulty multipliers *(BUG-07)*
Three independent scaling systems stacked without a total ceiling:
- Global difficulty multiplier (capped at ×3.0 ✓)
- Evolution tier multiplier (Aberrant ×2.5 ✓)
- Per-player
daysSurvivedscaling (**no cap** ✗)
On a 100-day server, the combined multiplier could reach ×26×, making zombies
practically unkillable.
- Fix:**
daysSurvivedscaling is now capped — health ≤ ×3.0, speed ≤ ×2.0,
#### 🔫 Gun reload lock persisted through player relog *(BUG-08)*
RELOAD_COOLDOWN_KEY and FIRE_COOLDOWN_KEY were stored inplayer.getPersistentDataContainer() as Unix timestamps. If a player disconnectedmid-reload and reconnected, the stale fu
...
### ✨ New Features
- Modrinth Update Checker** — The plugin now checks for new versions on Modrinth during server startup.
- Runs fully **async**; won't lag the main thread even if the network is slow.
- If an update is available: Prints a clear console notification showing current vs. latest version.
- Admins with the
zapoc.adminpermission receive a chat notification upon joining (delayed by 2 seconds to avoid being buried by other login messages). - Can be completely disabled via
update-checker: falseinconfig.yml. - Class:
UpdateChecker.java— implementsListenerto hook intoPlayerJoinEvent.
### 🐛 Bug Fixes
- Messages never loaded (Critical)** —
loadConfig()calledsaveResource("messages_vi.yml"), but the file is located atlanguage/messages_vi.ymlinside the JAR.saveResourcethrew a startup exception, leavingmessagesConfigempty—resulting in everygetMessage()call returning§cMissing key: .... Fixed by using the correct sub-path and ensuring parent directories are created if missing.
/zapoc panicspawned vanilla zombies** — The command calledZombieSpawnService.transformZombie(z, "random"), but"random"is not a valid key in thezombieTypesmap. This causeddata == null, making the method return immediately without applying stats, AI, or types. All 15 panic zombies were plain vanilla. Fixed by callingZombieSpawnService.randomizeZombie(z).
- Supply drop interval ignored config** —
WorldEventTask.calculateNextDrop()attempted to readplugin.getPluginConfig().getLong("supply-drop.interval")fromconfig.yml, but the key is actually defined inevents.yml. The interval always defaulted to the hardcoded 18,000 ticks. Fixed by reading fromplugin.getEventsConfig().
- Sun effect settings ignored config** —
ZombieBehaviorTask.handleSunEffect()attempted to readsun-effect.mode,sun-effect.light-threshold, and related keys fromplugin.getPluginConfig()(config.yml), but those keys reside insun-effect.yml. Sun slow/burn modes always used hardcoded defaults. Fixed by reading fromplugin.getSunEffectConfig().
### ⚠️ Minor Fixes
- Bleeding tick check unreliable** —
PlayerStatusTaskusedBukkit.getCurrentTick() % 40 == 0to throttle bleeding damage to every 2 seconds. Because the server tick counter and task invocation aren't perfectly aligned, the check fired inconsistently. Replaced with a localtickCountfield incremented on each run.
canSpawnMutated()allowed 2 Mutated per chunk** — The method returnedcount < 2despite a comment explicitly stating the design cap is 1 per chunk. Adjusted tocount < 1.
ZombieApocRefactored.javaremoved** — Cleaned up a dead-code class from a previous refactor attempt. It was never used as the main class and contained inverted command logic. Deleted entirely.
## [3.8] - 2026-03-01 - Major Performance Optimization Update
### 🚀 **Critical Performance Improvements**
#### **Entity Spawning Limits (CRASH PREVENTION)**
- Added comprehensive entity management system** to prevent server overload
- Server-wide zombie limits**: Maximum 500 zombies across all worlds (configurable)
- Chunk-based limits**: Maximum 25 zombies per 16x16 chunk
- Player proximity limits**: Maximum 10 zombies near each player
- Smart spawning logic**: Checks all limits before spawning new zombies
- Automatic cleanup**: Removes zombie tracking when zombies die
#### **AI Pathfinding Optimization (90% CPU Reduction)**
- Distance-based AI processing**: Only update AI for zombies near players
- Configurable update frequency**: AI updates every 10 ticks instead of every tick
- Pathfinding range limits**: Maximum 32 blocks for pathfinding calculations
- Smart filtering**: Skip vanilla zombies, only process custom zombies
- Performance caching**: Cache player locations to reduce distance calculations
#### **Memory Leak Prevention**
- Zombie death tracking**: Automatic cleanup of entity tracking on zombie death
- Persistent data management**: Proper cleanup of zombie metadata
- Chunk unload handling**: Remove zombie tracking when chunks unload
- Player quit handling**: Clean up player-specific zombie limits
### 🔧 **Audio & Visual Effects Optimization**
#### **Sound System Overhaul**
- Distance-based sound effects**: Zombie moans only play for nearby players (<32 blocks)
- Cooldown system**: Minimum 30 seconds between repeated sounds
- Volume optimization**: Configurable sound volumes and pitches
- Spam prevention**: Smart filtering prevents audio overload
#### **Particle Effects Enhancement**
- Distance-based particles**: Effects only show for players within 50 blocks
- Quality settings**: Low/Medium/High particle quality options
- Performance monitoring**: Track and limit particle generation
### ⚙️ **Configuration Enhancements**
#### **Performance Tuning Options**
``
yaml
performance:
# Entity spawning limits
max-zombies-per-server: 500
max-zombies-per-chunk: 25
max-zombies-per-player: 10
spawn-check-radius: 64
# AI optimization
ai-update-frequency: 10
pathfinding-range: 32
pathfinding-timeout: 50
# Visual/audio optimization
particle-distance: 50
sound-cooldown: 30000
particle-quality: medium
# Memory management
cleanup-frequency: 300000
max-tracking-age: 3600000
``#### **Smart Defaults**
- Balanced settings**: Optimized for 50+ player servers
- Scalable configuration**: Easy adjustment for different server sizes
- Backward compatibility**: All existing configs still work
### 🐛 **Bug Fixes**
#### **Server Stability**
- Fixed potential server crashes** from unlimited zombie spawning
- Prevented memory leaks** from orphaned zombie tracking
- Eliminated audio spam** from overlapping sound effects
- Fixed particle l
Architecture & Management
- Modular Configuration System : Successfully split the massive config.yml into 5 specialized files for better organization and easier maintenance:
- config.yml : Global settings (Language, Worlds, Spawn Control).
- zombies.yml : Zombie types, AI behavior, block breaking, and evolution phases.
- items.yml : Weapons (Guns, Katanas, Bats), survival gear, and ammo stats.
- events.yml : Blood Moon, Supply Drop loot tables, and Boss settings.
- mechanics.yml : Infection, Bleeding, Campfire of Hope, and Sanity systems.
- Dynamic Resource Management : Added automatic generation for all new configuration files if they are missing from the plugin folder.
- Enhanced Reload System : Updated /zapoc reload to hot-reload all 5 configuration files simultaneously.
- Task Synchronization : Refactored WorldEventTask , PlayerStatusTask , and PsychologicalHorrorTask to dynamically update their internal variables whenever the config is reloaded without requiring a server restart.
- Singleton Pattern Access : Implemented global getters in the main class for easy access to sub-configs across all services.
- Code Cleanup : Removed redundant method definitions and fixed duplicate variable declarations in the main class.
- Dependency Handling : Fixed missing FileConfiguration imports in background tasks.
- Stability : Resolved potential NullPointerException risks during the initial plugin enable phase by ensuring config load order.
- Version : 3.7 (Refactored)
- Output : ZombieApocalypseSSS-1.0.jar
- Platform : Paper/Spigot 1.21.1 (Java 21)
Fixed 3 empty catch blocks with proper error logging
Resolved 13 potential NPE issues across all custom items
Added Material.valueOf exception handling in gun arsenal
Fixed missing Material import in SpecialZombieListener
🛡️ Stability Improvements
Enhanced null safety for ItemMeta checks throughout codebase
Improved error handling and logging system
Better exception management for configuration loading
Memory leak prevention fixes in plugin lifecycle
⚡ Performance Optimizations
Optimized item matching logic with defensive programming
Improved thread safety with proper null checks
Enhanced scheduler task management
📦 Size Optimization
Separated 16MB resource pack to external folder
Reduced JAR size from 16.99MB to 197KB
Maintained all core functionality
1Performance: Replaced full-world entity scanning with a highly efficient Tracking System.
2Memory Leaks: Implemented proper cleanup for zombies on death and server shutdown.
3Stability: Added null checks and thread-safety measures to prevent crashes.
4Compatibility: Updated the resource pack for Minecraft 1.21.