Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MatrixYeasts - Realistic Injury & Body Damage System

A comprehensive and realistic injury system for Minecraft that adds depth to combat and survival gameplay with detailed body part damage, bleeding, fractures, pain management, psychological effects, and medical treatment mechanics.

Minecraft Platform Language Java Version

๐Ÿ“‹ Features

  • ๐Ÿฉธ Bleeding System - Realistic bleeding mechanics with movement and combat multipliers
  • ๐Ÿฆด Fracture System - Bone fractures from falls with armor protection and healing time
  • ๐Ÿ’” Internal Injuries - Internal damage accumulation from heavy hits with critical thresholds
  • ๐Ÿ˜ฃ Pain System - Dynamic pain levels affecting vision, movement, and breathing
  • ๐Ÿฅ Medical Treatment - Bandaging, healing items, infection risks, and delayed healing effects
  • ๐Ÿ’ค Recovery System - Sleep and rest-based recovery with modifiers and dream effects
  • ๐Ÿง  Psychological Effects - Stress, trauma responses, disorientation, and audio hallucinations
  • ๐Ÿšถ Posture System - Movement restrictions, sprint interruptions, and camera tilt from injuries
  • ๐Ÿ“Š Injury History - Track past injuries, treatment quality, and recovery modifiers
  • ๐ŸŒ Multi-language Support - English and Portuguese (Brazil) with easy expansion
  • โš™๏ธ Highly Configurable - Extensive configuration options for all systems
  • ๐ŸŽฏ Body Part System - 6 body parts (Head, Torso, Left/Right Arm, Left/Right Leg) with specific effects

๐Ÿš€ Installation

Requirements

  • Java 21+
  • Paper/Spigot 1.21+
  • Maven 3.6+

Installation Steps

  1. Download the latest MatrixYeasts-1.0.0.jar from releases
  2. Place the JAR file in your server's plugins folder
  3. Restart your server
  4. Configure config.yml in the plugins/MatrixYeasts/ folder
  5. Customize language files (en.yml, ptbr.yml) if needed

โš™๏ธ Configuration

config.yml

The plugin includes comprehensive configuration options:

language: en

bleeding:
  enabled: true
  damage_per_tick: 0.25
  tick_interval: 60
  movement_multiplier: 1.3
  combat_multiplier: 1.5
  natural_decay_rate: 0.2
  bandage_effectiveness: 0.8
  rest_threshold_seconds: 8

fractures:
  enabled: true
  fall_damage_threshold: 10.0
  chance_per_block: 0.1
  armor_reduction: 0.35
  sprint_damage_multiplier: 2.0
  jump_damage_multiplier: 2.5
  healing_time_minutes: 10
  improper_healing_chance: 0.2

internal_injuries:
  enabled: true
  heavy_hit_threshold: 12.0
  accumulation_rate: 0.8
  decay_rate: 0.1
  critical_threshold: 60.0

pain_system:
  enabled: true
  blindness_threshold: 20.0
  blindness_duration: 40
  shake_intensity: 0.2
  breathing_sound_chance: 0.3
  pain_decay_rate: 0.3

medical_treatment:
  instant_health_effectiveness: 0.6
  golden_apple_effectiveness: 0.85
  requires_rest: true
  infection_chance: 0.15
  relapse_chance: 0.1
  delayed_healing_seconds: 20

recovery:
  enabled: true
  sleep_recovery_rate: 2.0
  passive_recovery_rate: 0.8
  dream_sound_chance: 0.01

psychological:
  enabled: true
  stress_threshold: 70
  hallucination_chance: 0.003
  breathing_chance: 0.015

posture:
  enabled: true
  tilt_enabled: true
  sprint_interrupt_chance: 0.1

history:
  enabled: true
  max_history_size: 30
  history_decay_hours: 12
  poor_treatment_penalty: 0.1

immersion:
  particle_density: 0.8
  sound_volume: 0.7
  effect_duration_modifier: 0.8
  camera_shake_enabled: true
  message_cooldown_seconds: 15

performance:
  cache_duration_seconds: 30
  cleanup_interval_minutes: 5
  max_injuries_per_player: 8

Language Files

The plugin supports multiple languages. Edit en.yml or ptbr.yml to customize messages:

prefix: "&8[&cMatrixYeasts&8] &7"

injuries:
  leg_minor: "&eYour leg aches from the impact."
  leg_major: "&6A sharp pain shoots through your leg."
  leg_fractured: "&cYou feel something crack in your leg."
  # ... more injury messages

bleeding:
  started: "&cYou're bleeding."
  worsening: "&cThe bleeding intensifies."
  stopped: "&aThe bleeding has stopped."
  critical: "&4You're losing too much blood."

๐ŸŽฎ Usage

Commands

/injury status

View your current injury status including bleeding, pain, internal damage, and fractures.

Permission: None (all players)

Example:

/injury status

/injury clear [player]

Clear all injuries for yourself or another player.

Permission: matrixyeasts.admin

Examples:

/injury clear
/injury clear PlayerName

/injury reload

Reload the plugin configuration and language files.

Permission: matrixyeasts.admin

Example:

/injury reload

/injury help

Display command help information.

Permission: None

Example:

/injury help

Permissions

  • matrixyeasts.admin - Access to admin commands (reload, clear)
    • Default: OP only
  • matrixyeasts.bypass - Bypass all injury system effects
    • Default: false

๐ŸŽฏ Gameplay Mechanics

Bleeding System

  • Players bleed when taking damage from attacks, projectiles, or explosions
  • Bleeding causes damage over time
  • Movement and combat increase bleeding rate
  • Bandaging reduces bleeding effectiveness
  • Resting allows natural decay of bleeding

Fracture System

  • Fractures occur from fall damage exceeding threshold
  • Armor reduces fracture chance
  • Sprinting and jumping with fractures cause additional damage
  • Fractures heal over time (configurable)
  • Improper healing can cause fractures to worsen

Internal Injuries

  • Heavy hits accumulate internal damage
  • Internal damage decays slowly over time
  • Critical threshold applies weakness effect
  • Requires rest for proper recovery

Pain System

  • Pain accumulates from all damage sources
  • High pain causes blindness effects
  • Camera shake intensity based on pain level
  • Breathing sounds at high pain levels
  • Pain naturally decays over time

Medical Treatment

  • Instant Health potions provide partial healing
  • Golden Apples are more effective
  • Bandaging stops bleeding but requires rest
  • Infection chance from poor treatment
  • Delayed healing effects for realism
  • Relapse chance if not properly treated

Recovery System

  • Sleeping provides faster recovery
  • Passive recovery while resting
  • Unsafe sleep warnings when bleeding
  • Restless sleep with fractures
  • Dream sounds for trauma recovery
  • Recovery modifiers based on treatment history

Psychological Effects

  • Stress builds from combat and injuries
  • Disorientation at high stress levels
  • Audio hallucinations from pain and stress
  • Stress breathing effects
  • Trauma responses to severe damage

Posture System

  • Sprint interruptions with leg injuries
  • Camera tilt from severe injuries
  • Movement restrictions based on body part damage
  • Realistic posture adjustments

Injury History

  • Tracks past injuries and treatments
  • Poor treatment history affects recovery
  • History decays over time
  • Recovery modifiers based on past care

๐Ÿ—๏ธ Architecture

Core Components

Main
โ”œโ”€โ”€ ConfigManager
โ”‚   โ””โ”€โ”€ Configuration loading and management
โ”œโ”€โ”€ LanguageManager
โ”‚   โ””โ”€โ”€ Multi-language support system
โ”œโ”€โ”€ InjuryService
โ”‚   โ””โ”€โ”€ Core injury data management
โ”œโ”€โ”€ BleedingService
โ”‚   โ””โ”€โ”€ Bleeding mechanics and damage
โ”œโ”€โ”€ PainService
โ”‚   โ””โ”€โ”€ Pain level management and effects
โ”œโ”€โ”€ RecoveryService
โ”‚   โ””โ”€โ”€ Sleep and rest recovery system
โ”œโ”€โ”€ PsychologicalService
โ”‚   โ””โ”€โ”€ Stress and trauma effects
โ”œโ”€โ”€ PostureService
โ”‚   โ””โ”€โ”€ Movement and posture restrictions
โ””โ”€โ”€ CleanupService
    โ””โ”€โ”€ Data cleanup and optimization

Event Listeners

  • DamageListener - Handles all damage events and applies injuries
  • MovementListener - Monitors movement for bleeding and fracture effects
  • TreatmentListener - Manages medical treatment interactions
  • RecoveryListener - Handles sleep and wake events
  • DeathListener - Cleans up injury data on death

Domain Model

  • BodyPart - Enum for body parts (Head, Torso, Arms, Legs)
  • Injury - Individual injury data structure
  • InjuryType - Types of injuries (Minor, Major, Critical)
  • InjuryData - Player injury state container
  • InjuryHistory - Historical injury and treatment tracking

๐Ÿ› ๏ธ Building

Requirements

  • JDK 21
  • Maven 3.6+

Build Commands

# Clone repository
git clone https://github.com/m4trixdev/MatrixYeasts.git
cd MatrixYeasts

# Compile
mvn clean compile

# Package
mvn clean package

# Install to local repository
mvn clean install

The compiled .jar file will be in target/MatrixYeasts-1.0.0.jar

๐Ÿ“Š API Overview

Accessing Services

Main plugin = (Main) Bukkit.getPluginManager().getPlugin("MatrixYeasts");

// Get services
InjuryService injuryService = plugin.getInjuryService();
BleedingService bleedingService = plugin.getBleedingService();
PainService painService = plugin.getPainService();
ConfigManager configManager = plugin.getConfigManager();
LanguageManager languageManager = plugin.getLanguageManager();

InjuryService API

// Get player injury data
InjuryData data = injuryService.getData(player);

// Apply injury to body part
injuryService.applyInjury(player, BodyPart.HEAD, 10.0);

// Apply fracture
injuryService.applyFracture(player, BodyPart.LEFT_LEG);

// Remove all injuries
injuryService.removeData(player.getUniqueId());

// Check fracture
boolean hasFracture = data.hasFracture(BodyPart.LEFT_ARM);

// Get bleeding amount
double bleeding = data.getBleeding(BodyPart.TORSO);

// Get pain level
double pain = data.getPainLevel();

InjuryData API

InjuryData data = injuryService.getData(player);

// Bleeding operations
data.addBleeding(BodyPart.HEAD, 5.0);
data.reduceBleeding(BodyPart.HEAD, 2.0);
double totalBleeding = data.getTotalBleeding();

// Pain operations
data.addPain(10.0);
data.reducePain(2.0);
double pain = data.getPainLevel();

// Fracture operations
Set<BodyPart> fractures = data.getFracturedParts();
long age = data.getFractureAge(BodyPart.LEFT_LEG);

// Internal damage
data.addInternalDamage(15.0);
data.reduceInternalDamage(5.0);
double internal = data.getInternalDamage();

// History
InjuryHistory history = data.getHistory();
double stress = history.getStressLevel();
boolean hasTrauma = history.hasRecentTrauma();

๐Ÿ› Troubleshooting

Injuries not applying

  • Check that the system is enabled in config.yml
  • Verify player doesn't have matrixyeasts.bypass permission
  • Check server logs for errors
  • Ensure Paper/Spigot version is 1.21+

Configuration not loading

  • Verify config.yml syntax is valid YAML
  • Check file permissions
  • Review server logs for configuration errors
  • Use /injury reload to reload configuration

Performance issues

  • Adjust cleanup_interval_minutes in config
  • Reduce max_injuries_per_player if needed
  • Check cache_duration_seconds setting
  • Monitor server TPS during combat

Language not working

  • Verify language file exists (en.yml or ptbr.yml)
  • Check language setting in config.yml
  • Ensure file encoding is UTF-8
  • Use /injury reload after changes

Services not starting

  • Check server logs for initialization errors
  • Verify all dependencies are loaded
  • Ensure Paper API version matches server
  • Review configuration for enabled features

๐Ÿ“ Changelog

v1.0.0

  • Initial release
  • Complete bleeding system with movement and combat multipliers
  • Fracture system with armor protection
  • Internal injury accumulation
  • Pain system with visual and audio effects
  • Medical treatment system with infection risks
  • Recovery system with sleep and rest mechanics
  • Psychological effects (stress, trauma, hallucinations)
  • Posture system with movement restrictions
  • Injury history tracking
  • Multi-language support (EN/PT-BR)
  • Comprehensive configuration system
  • Admin commands for management
  • Performance optimizations

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Author

M4trixDev

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation
  • Add new language translations

๐Ÿ“ž Support

๐ŸŽฎ Compatible Servers

  • Paper 1.21+
  • Spigot 1.21+
  • Any server running Paper API 1.21+

โš ๏ธ Known Limitations

  • Injury data is stored in memory (cleared on server restart)
  • Maximum injuries per player is configurable but limited
  • Some effects may conflict with other plugins modifying player health
  • Requires Paper/Spigot API 1.21+ (not compatible with older versions)

Made with โค๏ธ for realistic Minecraft survival gameplay

About

Realistic injury system with bleeding, fractures, pain, psychological effects, and medical treatment. Adds depth to combat and survival gameplay.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages