SanityMC is an innovative Minecraft plugin that introduces a dynamic sanity system to enhance gameplay.
Join the Discord to get updates earlier than others!
Each player has a current sanity value and a maximum sanity. By default, both start at a value defined in the config (typically 100), but players can increase their maximum sanity by consuming special upgrade items.
Persistence:
Both current and maximum sanity values are saved to disk (in sanityData.yml and maxSanityData.yml), ensuring that a player’s sanity persists between sessions.
All sanity changes (whether gaining or losing sanity) occur gradually. For example, if an event causes a loss of 3 sanity, the plugin subtracts 1 sanity point every 0.5 seconds until the total loss is applied.
A player’s current sanity is always clamped between 0 and their maximum sanity.
Baseline Regeneration: Every 10 ticks (0.5 seconds), players gain +1 sanity.
Hunger Penalty: If a player’s food level falls below 6, they lose 1 sanity every 10 ticks.
Environmental Effects:
Darkness, Rain, Caves, & Hostile Mobs: Conditions such as being in low light, during a storm, in a cave, or near hostile mobs trigger gradual sanity loss.
Nether & Nether Portals: Spending time in the Nether or standing in a Nether portal causes additional sanity loss.
Special Events:
Damage: Every time a player takes damage, they lose 0.25 sanity gradually.
Creeper Hiss: Occasionally, if a player’s sanity is 75 or below, a creeper hiss will play (only once every 45 seconds per player) and cause extra sanity loss.
Advancements: Completing an advancement rewards the player with +20 sanity over time.
Block Interactions: Breaking bells or monster spawners will drain sanity gradually, while certain actions like fishing grant sanity.
As a player’s sanity decreases, different effects become active:
Sanity ≤75:
Constant gravel-step sounds play.
Occasional cave sounds add to the eerie atmosphere.
Sanity ≤49:
Hallucination mobs (zombies with no AI) spawn briefly.
Stone break sounds are played, and a custom command (e.g., a chat message) can be executed.
Sanity ≤24:
Jumpscare messages and random weapon swings occur.
A custom command is executed and players may briefly experience blindness.
Sanity <10:
Players receive weakness and take random damage.
Forced chat messages may appear, and they are prevented from chatting.
Death at 0:
When a player’s sanity reaches 0, the plugin sets their health to 0, causing them to die with a custom death message.
Currently there are 4 flags in the worldguard, more coming in future versions, only 2 really matters, sanity-gain, and sanity-loss, which will allow sanity gain/loss in a region. The other two, sanity-death, and pet-death, if enabled, sanity-death will drop sanity if a nearby player dies, pet-death will drop sanity if a nearby pet dies.