Skip to content

SlimeeyYt/SoulLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’€ SoulLock Plugin

A thrilling Minecraft Paper plugin where death has consequences! Lock players' souls and challenge others to rescue them.


๐ŸŽฎ What is SoulLock?

SoulLock is an immersive Paper plugin that transforms death mechanics in Minecraft. When a player dies, their soul is lockedโ€”frozen until another player places their player head on the ground to revive them. It's perfect for:

  • ๐Ÿฐ Survival servers with high stakes
  • ๐Ÿ‘ฅ Multiplayer co-op adventures
  • ๐ŸŽช Creative minigames and roleplay servers
  • โš”๏ธ PvP challenges with soul mechanics

โœจ Features

๐Ÿ’€ Soul Lock System

  • ๐Ÿชฆ When a player dies, their soul is automatically locked
  • ๐Ÿ‘ค Each player can only have ONE active soul lock at a time
  • ๐Ÿ” Locked souls are stored by UUID (unique per player)
  • ๐Ÿ’พ All data is persisted to disk and survives server restarts

๐Ÿ‘ป Spectator Mode (or Kick)

When a locked player joins the server:

  • ๐Ÿ‘๏ธ SPECTATOR MODE (default): Player enters spectator mode but can still move around and explore
  • ๐Ÿšซ KICK MODE (optional): Player is immediately kicked from the server
  • โš™๏ธ Choose which mode in config.yml

๐Ÿ’” Restrictions for Locked Players

Locked players cannot:

  • ๐Ÿšถ Move (if not in SPECTATOR mode)
  • ๐Ÿช“ Break blocks
  • ๐Ÿงฑ Place blocks
  • ๐Ÿค Interact with entities or objects
  • ๐ŸŽฎ Use items

โšก Revival System

When a player head is placed on the ground:

  1. ๐Ÿ” The plugin detects if it belongs to a locked player
  2. โœจ If yes:
    • ๐Ÿ†“ Soul unlocked! Player is immediately freed
    • ๐Ÿ“ง The player receives a message: "Your soul has been restored! โœจ"
    • ๐ŸŽฏ If player is online:
      • Teleported to head location
      • Restored to SURVIVAL mode
      • Spawn point set to revival location
    • โšก Lightning strike effect (optional, non-damaging)
    • ๐ŸŒŸ Colorful particles spawn (optional)
  3. ๐Ÿ—‘๏ธ Head disappears after placement

๐ŸŽจ Visual Effects

  • โšก Lightning Strike (configurable) - Dramatic effect when soul is restored
  • ๐ŸŒŸ Particle Effects (configurable) - Beautiful visual feedback
  • ๐Ÿ’ฌ Colored Messages - Professional, colored console & player messages

๐Ÿ“Š Real Player Heads

  • ๐Ÿ˜Š When dropped, heads display the player's actual Minecraft skin
  • ๐ŸŽญ Uses Bukkit/Paper API (setOwningPlayer) for authentic rendering

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

  • ๐Ÿ“ฆ Java 21+ installed
  • ๐Ÿ“‹ Maven (for building from source)
  • ๐Ÿ–ฅ๏ธ Paper Server (v1.21+)

Step 1: Build the Plugin

cd "D:\Slimeey Studios\SoulLock"
mvn clean package

The compiled jar will be created at: target/SoulLock-1.0.jar

Step 2: Install the Plugin

  1. Copy target/SoulLock-1.0.jar โ†’ paper-test/plugins/SoulLock-1.0.jar
  2. Start the server (first run creates config files)
  3. Configure settings in plugins/SoulLock/config.yml

Step 3: Start the Server

cd "D:\Slimeey Studios\SoulLock\paper-test"
.\start.ps1

๐Ÿ’ก Tip: The server runs in offline mode by default for testing


โš™๏ธ Configuration

Edit plugins/SoulLock/config.yml:

# ๐Ÿ‘ป How to treat locked players when they join
# SPECTATOR: Player enters spectator mode (can move & explore)
# KICK: Player is kicked from server
revive-mode: SPECTATOR

# โšก Show lightning strike when soul is restored
lightning-effect: true

# ๐ŸŒŸ Spawn particles when soul is restored
particle-effect: true

# ๐Ÿชฆ Keep player heads from despawning
prevent-head-despawn: true

Configuration Options Explained:

Option Values Description
revive-mode SPECTATOR / KICK How locked players behave on join
lightning-effect true / false Show lightning when soul is restored โšก
particle-effect true / false Show particle effects on revival ๐ŸŒŸ
prevent-head-despawn true / false Prevent player heads from disappearing naturally ๐Ÿชฆ

๐ŸŽฎ Gameplay Guide

What Happens When You Die?

1. โ˜ ๏ธ  You die โ†’ Soul is locked
2. ๐Ÿ‘ป You join server โ†’ Enter SPECTATOR mode (can move around)
3. ๐Ÿ’€ Your head drops at death location (with your skin)
4. ๐Ÿ“ข Message appears: "Your soul is locked!"

How to Revive a Locked Player?

1. ๐Ÿ” Find the player's head at their death location
2. ๐Ÿ‘† Place the player head on the ground (like a block)
3. โœจ Magic happens:
   - โšก Lightning strikes!
   - ๐ŸŒŸ Particles burst!
   - ๐Ÿ“ข Message: "Your soul has been restored! โœจ"
4. ๐Ÿ†“ Player is instantly:
   - Switched to SURVIVAL mode
   - Teleported to head location
   - Unlock notification sent

๐Ÿ’ฌ Commands

For Admins ๐Ÿ‘‘

Unlock a Locked Player

/soullockadmin unlock <player|uuid>

Examples:

/soullockadmin unlock Steve
/soullockadmin unlock 550e8400-e29b-41d4-a716-446655440000

Message Output:

โœ“ [SoulLock] Soul unlocked for Steve!

Permissions:

  • soullock.admin - Required for admin commands (default: OP only)

๐Ÿ“Š Data Storage

How Data is Saved

  • ๐Ÿ’พ Locked player UUIDs stored in plugins/SoulLock/data.yml
  • ๐Ÿ”„ Auto-saved when:
    • Player dies
    • Soul is unlocked/restored
    • Server shuts down
  • ๐Ÿ“‚ Data persists across server restarts

Example data.yml:

locked_players:
  550e8400-e29b-41d4-a716-446655440000:
    username: Steve
    death_location:
      world: world
      x: 100.5
      y: 64.0
      z: 200.5

๐ŸŽฏ Events & Triggers

Implemented Events

Event What Happens
PlayerDeathEvent ๐Ÿ’€ Soul is locked, head drops
PlayerJoinEvent ๐Ÿ‘ป Locked players enter SPECTATOR mode
BlockPlaceEvent ๐Ÿ’€ Check if placed block is a player head โ†’ Revive!
PlayerQuitEvent ๐Ÿ“Š Optional: Update player data

๐Ÿ”ง Technical Details

Code Architecture

SoulLock Plugin/
โ”œโ”€โ”€ ๐Ÿ“„ SoulLockPlugin.java          (Main class, event manager)
โ”œโ”€โ”€ ๐ŸŽง DeathListener.java           (Handles death events)
โ”œโ”€โ”€ ๐ŸŽง JoinListener.java            (Handles player joins)
โ”œโ”€โ”€ ๐ŸŽง BlockListener.java           (Handles head placement)
โ”œโ”€โ”€ ๐Ÿ’พ DataManager.java             (Save/load data)
โ”œโ”€โ”€ ๐Ÿ› ๏ธ HeadUtility.java             (Create player heads)
โ””โ”€โ”€ ๐Ÿ“ง MessageUtil.java             (Colored messages)

Thread Safety

  • โœ… Uses Paper's modern scheduler
  • โœ… Async file I/O where possible
  • โœ… No blocking API calls on main thread

Paper API Features Used

  • ๐ŸŽฏ Adventure API for colored messages
  • ๐Ÿ“… Modern Paper scheduler
  • ๐ŸŽง Optimized event system
  • ๐Ÿ’ป Paper-specific optimizations

๐Ÿš€ Quick Start Guide

1๏ธโƒฃ Build

mvn clean package

2๏ธโƒฃ Copy Plugin

Copy-Item "target/SoulLock-1.0.jar" "paper-test/plugins/"

3๏ธโƒฃ Start Server

cd paper-test
.\start.ps1

4๏ธโƒฃ Join Server

  • Open Minecraft launcher
  • Add server: localhost (offline mode)
  • Join and test!

๐Ÿ“ Example Scenario

Multiplayer Gameplay

[Game Start]
๐ŸŽฎ Alice & Bob explore together

[Alice Dies]
โ˜ ๏ธ  Alice dies at coordinates (100, 64, 200)
๐Ÿ’€ Soul locked! Head drops with Alice's skin
๐Ÿ“ข Message: "Your soul is locked! โš ๏ธ"

[Alice Joins]
๐Ÿ‘ป Alice enters SPECTATOR mode (can still move)
๐Ÿ“ข Message: "You are in spectator mode!"

[Bob Searches]
๐Ÿ” Bob finds Alice's head at (100, 64, 200)
๐Ÿ‘† Bob places the head on the ground

[Revival!]
โœจ Magical effect triggers:
  - โšก Lightning strikes!
  - ๐ŸŒŸ Particles burst!
  - ๐Ÿ“ข "Your soul has been restored! โœจ"
  - ๐Ÿ†“ Alice switches to SURVIVAL mode
  - ๐ŸŽฏ Alice teleported to head location
  - ๐Ÿ’€ Alice's head disappears

[Alice Continues]
๐ŸŽฎ Alice & Bob continue playing together!

๐Ÿ› Troubleshooting

Plugin won't load?

  • โœ… Check Java version (21+ required)
  • โœ… Verify plugin.yml syntax
  • โœ… Check server logs for errors

Head not disappearing?

  • โœ… Check prevent-head-despawn: true in config
  • โœ… Verify head placement detection

Player not reviving?

  • โœ… Ensure head is from a locked player
  • โœ… Check if player is online
  • โœ… Verify spawn location is safe

Commands not working?

  • โœ… Check player has soullock.admin permission
  • โœ… Verify correct command syntax
  • โœ… Check player UUID format

๐Ÿ“– Commands Reference

Command Permission Description
/soullockadmin unlock <player|uuid> soullock.admin Unlock a locked player's soul

๐ŸŽจ Customization

Modify Colors

Edit color codes in MessageUtil.java class

Particle Effects

Customize particle types in revival event handler

Lightning Effects

Toggle or modify lightning in BlockListener.java


โœ… Version Info

  • Plugin Name: SoulLock
  • Version: 1.0
  • API Version: 1.21+
  • Required: Paper Server, Java 21+

๐Ÿ“ž Support

For issues, questions, or suggestions:

  1. ๐Ÿ“‹ Check the troubleshooting section
  2. ๐Ÿ“‚ Review server logs in logs/
  3. ๐Ÿ” Verify config.yml syntax
  4. ๐Ÿ‘ค Check permissions and commands

๐Ÿ“„ License

SoulLock ยฉ 2026 Slimeey Studios. All rights reserved.


Enjoy the thrilling soul-locking experience! ๐Ÿ’€โœจ

About

A Paper plugin that locks player souls on death and revives them when their head is placed.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages