Overview

LilWorlds v1.2+ features enhanced world deletion that goes beyond simply removing world files. The deletion process includes comprehensive configuration purging to ensure no orphaned entries remain in your server configuration.

Important: World deletion is permanent and cannot be undone. Always create backups before deleting important worlds.

Enhanced Deletion Process

What Gets Deleted

When you delete a world with LilWorlds, the following are removed:

World Files

Complete File Removal

All world files and folders permanently deleted from disk

Configuration Entries

Config Purging

All references removed from config.yml and worlds.yml

Inventory Groups

Inventory Cleanup

World removed from all inventory separation groups

Player Data

Player References

World-specific player data and references cleaned up

Step-by-Step Process

1

Confirmation Required

First command shows detailed warning about what will be deleted

2

Player Evacuation

All players in the world are safely moved to the spawn world

3

World Unloading

World is properly unloaded from server memory

4

Configuration Purging

All configuration entries are removed from all config files

5

File Deletion

World files are permanently deleted from the server disk

6

Cleanup Verification

System verifies all references have been successfully removed

Deletion Commands

Basic Deletion

# Delete a world (requires confirmation)
/world remove myworld

# Alternative command
/world delete myworld

Advanced Deletion Options

# Force deletion without confirmation (admin only)
/world remove myworld --force

# Delete with backup creation first
/world remove myworld --backup

# Delete multiple worlds
/world remove world1 world2 world3

# Delete with specific reason logging
/world remove myworld --reason "No longer needed"

Configuration Purging Details

Main Configuration (config.yml)

The deletion process removes world references from:

# Before deletion
inventory-groups:
  survival:
    - world
    - myworld        # ← This will be removed
    - world_nether
  creative:
    - creative_world
    - myworld        # ← This will also be removed

world-groups:
  main:
    - world
    - myworld        # ← Removed from here too

# After deletion - myworld completely removed
inventory-groups:
  survival:
    - world
    - world_nether
  creative:
    - creative_world

world-groups:
  main:
    - world

World Configuration (worlds.yml)

Complete world entry removal:

# Before deletion
worlds:
  world:
    environment: NORMAL
    generator: null
  myworld:              # ← Entire section removed
    environment: NORMAL
    generator: VoidGenerator
    settings:
      pvp: true
      difficulty: NORMAL
  other_world:
    environment: NETHER

# After deletion
worlds:
  world:
    environment: NORMAL
    generator: null
  other_world:
    environment: NETHER

Inventory Group Cleanup

Automatic cleanup of empty groups:

# If a group becomes empty after world removal
inventory-groups:
  survival:
    - world
  empty-group: []       # ← This group will be removed

# After cleanup
inventory-groups:
  survival:
    - world
  # empty-group removed automatically

Safety Features

Confirmation System

LilWorlds requires explicit confirmation for deletion:

Player Protection

Before deletion, all players are safely evacuated:

# Players are automatically moved to spawn
[INFO] Moving player 'Steve' from 'myworld' to spawn world
[INFO] Moving player 'Alex' from 'myworld' to spawn world
[INFO] All players evacuated from 'myworld'

Backup Integration

Optional automatic backup before deletion:

# config.yml
deletion:
  auto-backup: true
  backup-location: "backups/"
  keep-backups: 5

Deletion Logging

Comprehensive Logging

All deletion operations are thoroughly logged:

[INFO] [LilWorlds] World deletion initiated: myworld (by PlayerName)
[INFO] [LilWorlds] Evacuating 3 players from world 'myworld'
[INFO] [LilWorlds] Unloading world 'myworld'
[INFO] [LilWorlds] Purging configuration entries for 'myworld'
[INFO] [LilWorlds] Removed from inventory groups: survival, creative
[INFO] [LilWorlds] Removed from world groups: main
[INFO] [LilWorlds] Deleting world files for 'myworld'
[INFO] [LilWorlds] World 'myworld' successfully deleted and purged

Security Logging

Security events are logged separately:

# config.yml
security:
  log-security-events: true
  log-deletions: true
  log-file: "logs/lilworlds-security.log"

Recovery Options

Backup Recovery

If you have backups, you can recover deleted worlds:

# Restore from backup
/world restore myworld_backup_20240612

# Import backup as new world
/world import myworld_backup_20240612 myworld_restored

Configuration Recovery

Manually restore configuration entries if needed:

1

Stop Server

Safely stop your Minecraft server

2

Restore Config Files

Replace config files with backup versions

3

Restore World Files

Copy world folder back to server directory

4

Start Server

Start server and verify world is accessible

Bulk Deletion

Multiple World Deletion

Delete multiple worlds efficiently:

# Delete multiple worlds
/world remove world1 world2 world3

# Delete by pattern (admin only)
/world remove --pattern "temp_*"

# Delete all unloaded worlds
/world remove --unloaded

Cleanup Operations

Remove orphaned or unused worlds:

# Clean up orphaned worlds
/worlds cleanup --orphaned

# Remove worlds not accessed in 30 days
/worlds cleanup --unused 30d

# Interactive cleanup mode
/worlds cleanup --interactive

Advanced Configuration

Deletion Policies

Configure deletion behavior:

# config.yml
deletion:
  # Require confirmation for all deletions
  require-confirmation: true
  
  # Minimum time before deletion (prevents accidents)
  deletion-delay: 30  # seconds
  
  # Auto-backup before deletion
  auto-backup: true
  
  # Purge configuration entries
  purge-config: true
  
  # Clean up empty groups
  cleanup-empty-groups: true
  
  # Log all deletion operations
  log-deletions: true

Permission-Based Restrictions

Control who can delete worlds:

# permissions.yml
permissions:
  lilworlds.world.remove: false          # Basic deletion
  lilworlds.world.remove.force: false    # Force deletion
  lilworlds.world.remove.multiple: false # Bulk deletion
  lilworlds.admin.cleanup: false         # Cleanup operations

Rate Limiting

Prevent deletion abuse:

# config.yml
security:
  deletion-rate-limit: 5    # Max 5 deletions per hour
  deletion-cooldown: 300    # 5 minute cooldown between deletions

Monitoring and Alerts

Deletion Monitoring

Track deletion activities:

# View deletion history
/worlds history --deletions

# Monitor deletion statistics
/worlds stats --deletions

# Check recent deletions
/worlds log --filter deletions --recent 24h

Alert System

Configure alerts for important deletions:

# config.yml
alerts:
  deletion-alerts: true
  alert-channels:
    - discord
    - console
    - log-file
  
  # Alert for large worlds
  size-threshold: 1GB
  
  # Alert for worlds with many players
  player-threshold: 10

Best Practices

Before Deletion

Pre-Deletion Checklist:

  • ✅ Verify you have the correct world name
  • ✅ Check if anyone is currently using the world
  • ✅ Create a backup if the world might be needed later
  • ✅ Inform other admins/players about the deletion
  • ✅ Document the reason for deletion

Deletion Strategy

# Recommended deletion workflow
deletion-workflow:
  1. Announce planned deletion to players
  2. Create backup if world has value
  3. Move players out of world
  4. Unload world temporarily to test
  5. Verify no issues with world offline
  6. Proceed with deletion
  7. Monitor for any issues post-deletion

Regular Maintenance

Schedule regular cleanup:

# Weekly cleanup script
#!/bin/bash
echo "Starting weekly world cleanup..."

# Remove temporary worlds older than 7 days
/world remove --pattern "temp_*" --older-than 7d

# Clean up orphaned configurations
/worlds cleanup --config

# Remove unused backup worlds
/worlds cleanup --backups --keep 10

echo "Cleanup completed!"

Troubleshooting

Common Issues

Recovery Procedures

If deletion goes wrong:

1

Stop Server Immediately

Prevent further damage by stopping the server

2

Assess Damage

Check what was actually deleted vs. what should have been

3

Restore from Backup

Use file system backups to restore deleted content

4

Fix Configuration

Manually restore configuration entries if needed

5

Test Thoroughly

Verify everything works before allowing players back

Next Steps

World Cloning

Learn to create backups and copies before deletion

Security Features

Understand rate limiting and access controls

Configuration Guide

Master configuration management and organization

Commands Reference

Complete reference for all deletion commands