raxzoo1

Create a Minecraft Java Paper plugin for version 1.21.x called “LastLight”.

Main concept:

  • The server is mostly permanent night.
  • Players survive underground.
  • Dangerous horde events happen.
  • The atmosphere should feel cinematic, oppressive, and survival-focused.

CORE FEATURES:

  1. Apocalypse Day/Night Cycle
  • The server starts in NIGHT mode.
  • NIGHT lasts 2 Minecraft days.
  • DAY lasts 1 Minecraft day.
  • The cycle repeats forever automatically.

During NIGHT:

  • Set world time to midnight continuously.
  • Weather should stay thunderstorm continuously.
  • Monster spawn rates should feel higher.
  • Atmosphere should feel dangerous and oppressive.
  • Optional fog/lightning effects.

During DAY:

  • Set world time to daytime.
  • Clear weather automatically.
  • Slightly reduce danger.
  • Day should feel temporary and hopeful.
  1. Sleeping Disabled

Players must NOT be able to skip night.

When a player tries to sleep:

  • Cancel the sleep event.
  • Send message:

“If you sleep, you will forever sleep.”

  • Optional creepy sound effect.

Beds should still allow respawn points if possible.

  1. Horde Event System

Every 10 Minecraft days:

  • Randomly select 50% of online players.
  • Example:

- 2 players online = 1 targeted - 10 players online = 5 targeted

  • Each selected player gets their own horde.

For every targeted player:

  • Spawn:

- 1 powerful zombie - 2 powerful skeletons

  • Spawn mobs near the player safely (not inside walls/blocks).
  • Broadcast message:

“[WARNING] A Horde has found <playername>”

  • Play thunder sound globally.
  • Optional lightning strike near target.
  1. Horde Mob Buffs

Special horde mobs should:

  • Have increased max health
  • Increased attack damage
  • Slightly increased movement speed
  • Sometimes wear damaged/random armor
  • Have cinematic custom names:

- “Night Stalker” - “The Hunted” - “Ash Walker” - “The Hollow” - “Graveborn”

  • Be significantly harder than vanilla mobs.
  1. Infinite Scaling Difficulty

Every new horde event:

  • Increase horde mob health gradually
  • Increase damage gradually
  • Scale infinitely but reasonably
  • Scaling values configurable in config.yml
  1. Persistence System

Save all progression and timers:

  • Current cycle state
  • Remaining time
  • Horde level
  • Difficulty scaling

Server restarts must NOT reset:

  • day/night cycle
  • timers
  • horde progression

Use data/config storage cleanly.

  1. Performance Optimization

Optimize for low-RAM servers like Aternos:

  • Avoid huge mob spam
  • Use efficient schedulers/tasks
  • Minimize lag
  • Use lightweight logic
  1. Player Time Command

Add player command:

/lastlight time

This command should:

  • Show whether it is DAY or NIGHT
  • Show EXACT remaining time
  • Be accurate in Minecraft days/hours/minutes
  • Example:

“Night ends in 0 days, 7 hours, 12 minutes.”

  1. Admin Commands

Add admin commands:

/lastlight startnight /lastlight startday /lastlight forcehorde /lastlight reload /lastlight time /lastlight set day 3 /lastlight set night 5 /lastlight set hordeinterval 10 /lastlight set hordescale 1.5 /lastlight forcethunder /lastlight clearweather /lastlight debug /lastlight save /lastlight info

Admin commands should:

  • Have permissions
  • Validate arguments properly
  • Give helpful feedback messages
  1. Config System

Create a clean config.yml containing:

  • day duration
  • night duration
  • horde interval
  • mob scaling
  • weather settings
  • sounds
  • messages
  • titles
  • boss bar settings
  • action bar settings
  • sleep messages
  1. Cinematic Atmosphere

Optional immersive systems:

  • Lightning near hordes
  • Boss bars during events
  • Action bar warnings
  • Global sounds
  • Creepy ambient sounds
  • Screen titles
  • Fog-like effects if possible
  1. Day/Night Announcements

When NIGHT begins:

  • Broadcast:

“The sun has vanished. Darkness returns.”

  • Show title:

Title: “NIGHT FALLS” Subtitle: “Stay in the light.”

  • Play thunder globally.
  • Optional lightning flashes.

When DAY begins:

  • Broadcast:

“The sun rises once more.”

  • Show title:

Title: “DAYBREAK” Subtitle: “You are safe... for now.”

  • Clear weather automatically.
  • Play calm ambient sounds.

Announcements should:

  • Fade smoothly
  • Support color formatting
  • Be configurable
  1. Code Requirements
  • Use clean OOP structure
  • Separate managers/listeners/tasks
  • Add comments explaining important logic
  • Use Paper API best practices
  • Avoid deprecated methods
  • Include plugin.yml
  • Support Java 21
  • Optimize code readability and maintainability

The plugin should feel cinematic, immersive, terrifying, optimized, and perfect for a survival horror underground apocalypse server.14. Version Support

The plugin must fully support:

  • Minecraft Java Paper 1.21.1+
  • Include compatibility for 1.21.x builds

Use modern Paper API methods and Java 21.

  1. Real-Time Countdown System

The command:

/lastlight time

should display REAL LIFE remaining time instead of Minecraft ticks.

Examples:

  • “Night ends in 30 minutes.”
  • “Day ends in 12 minutes.”
  • “Horde begins in 1 hour 5 minutes.”

The countdown system should:

  • Be highly accurate
  • Persist through restarts
  • Update correctly after reloads
  • Use real-world timing internally
  1. Custom Enchantment — Excavation

Add a custom enchantment called: “Excavation”

Features:

  • Mines blocks in a 3x3 area
  • Works similarly to vein/mining enchantments
  • Only works with pickaxes
  • Should respect tool durability
  • Should not destroy protected blocks
  • Should support orientation correctly:

- looking up/down changes mining direction

Enchanting:

  • Obtainable from enchanting tables
  • Requires level 30 enchanting
  • Rare enchantment
  • Compatible with survival gameplay

Optional:

  • Add custom glowing lore
  • Add special particles/sounds
  1. Random Creepy Sounds System

During NIGHT:

  • Randomly play creepy ambient sounds to players occasionally

Examples:

  • cave sounds
  • distant whispers
  • thunder rumbles
  • distorted ambient sounds
  • low horror drones
  • footsteps
  • breathing

System requirements:

  • Sounds should be randomized
  • Not too frequent/spammy
  • Chance-based system
  • Configurable volume/chance
  • Lightweight for performance

Optional:

  • Some sounds only trigger underground
  • Rare “panic” sounds during Horde events

The sound system should increase immersion and psychological tension without annoying players.

Kodari AI
KodariMay 16 at 8:00 am 23,389 (v2)

I’ll create a comprehensive survival horror plugin with a cinematic apocalypse atmosphere.

LastLight
A survival horror plugin that transforms the server into a permanent night apocalypse. Features a 2-day night/1-day day cycle, escalating horde events every 10 days, sleep prevention, infinite difficulty scaling, custom Excavation enchantment for underground mining, and atmospheric creepy sounds. Includes real-time countdowns, persistent progression, cinematic announcements with titles and boss bars, and admin controls for cycle management.

Project Structure

Creating a modular system with cycle management, horde progression, custom enchantment, ambient horror atmosphere, and real-time persistence.

Perfect! I’ve created LastLight - a comprehensive survival horror plugin with all the requested features:

✅ Core Features Implemented

1. Apocalypse Cycle System

  • 2-day night / 1-day day automatic cycling

  • Real-time countdown tracking (not Minecraft ticks)

  • Persistent through restarts

2. Sleep Prevention

  • Cancels bed entry with creepy message

  • Optional ghost sound effect

  • Beds still work as spawn points

3. Horde Events

  • Every 10 Minecraft days

  • 50% of players targeted

  • Spawns buffed zombies + skeletons with cinematic names

  • Lightning effects near targets

4. Infinite Scaling

  • Health, damage, and speed multipliers

  • Configurable scaling per horde

  • Caps at 5x to prevent extreme lag

5. Excavation Enchantment

  • 3x3 mining with pickaxes

  • Orientation-aware (up/down/horizontal)

  • Obtainable from enchanting tables

  • Respects tool durability

6. Atmospheric Horror

  • Random creepy ambient sounds during night (underground)

  • Boss bars showing cycle countdown

  • Title announcements for transitions

  • Thunder + lightning effects

7. Commands

  • /lastlight time - Real-time countdown

  • /lastlight startnight/startday - Force cycle

  • /lastlight forcehorde - Trigger horde

  • /lastlight set <setting> <value> - Change config values

  • Full admin suite included

8. Performance Optimized

  • Async data saving

  • Efficient schedulers (20 ticks, 200 ticks)

  • Batch mob spawning

  • Safe spawn location detection

9. Persistence

  • Saves cycle state, timers, horde count

  • Survives restarts seamlessly

  • Auto-saves every cycle transition

10. Fully Configurable

  • All messages, sounds, durations customizable

  • Boss bar colors/text

  • Mob names, buffs, scaling

  • Performance settings

The plugin uses modern Paper API, Java 21, Lombok for clean code, XSeries for compatibility, and Adventure API for rich text formatting. The atmosphere is oppressive, cinematic, and perfect for underground survival!

raxzoo1

How to check if the enchantment is in teh game?

Kodari AI
KodariMay 16 at 9:22 am 14,962 (v2)

I’ll check your enchantment implementation to provide specific guidance:

Based on your ExcavationEnchantment implementation, here are the ways to check if the enchantment is in the game:

1. Check if the enchantment is registered globally

Java
// Anywhere in your code
NamespacedKey key = NamespacedKey.fromString("lastlight:excavation");
Enchantment excavation = Enchantment.getByKey(key);

if (excavation != null) {
    // Enchantment is registered
} else {
    // Enchantment is not registered
}

2. Check if an item has the enchantment

Java
ItemStack item = player.getInventory().getItemInMainHand();

if (item.hasItemMeta() && item.getItemMeta().hasEnchant(yourEnchantmentInstance)) {
    // Item has the enchantment
    int level = item.getItemMeta().getEnchantLevel(yourEnchantmentInstance);
}

3. Get enchantment from within your plugin

If you store the enchantment instance in your main class:

Java
// In LastLight.java
@Getter
private ExcavationEnchantment excavationEnchantment;

// In onEnable()
this.excavationEnchantment = new ExcavationEnchantment(this);
excavationEnchantment.register();

// Then anywhere else:
Enchantment excavation = plugin.getExcavationEnchantment();
if (excavation != null) {
    // Available
}

4. Check all registered enchantments

Java
// List all enchantments to verify yours is there
for (Enchantment ench : Enchantment.values()) {
    plugin.getLogger().info("Found: " + ench.getKey());
    // Should see: lastlight:excavation
}

The most common approach is #1 (using Enchantment.getByKey()) for checking if it’s registered, or #2 (using ItemMeta.hasEnchant()) for checking items.

[Generation stopped]

raxzoo1

Give me the commands list

Kodari AI
KodariMay 16 at 9:25 am 3,631 (v2)

I’ll check your command files to provide the complete list:

LastLight Commands List

Main Command

/lastlight (aliases: /ll)

Subcommands

Command
Description
Permission
Default
/lastlight time
View current cycle (day/night) and remaining time
lastlight.use
All players
/lastlight info
View plugin info (cycle, hordes, durations)
lastlight.command.info
OP
/lastlight startnight
Manually start night cycle
lastlight.command.startnight
OP
/lastlight startday
Manually start day cycle
lastlight.command.startday
OP
/lastlight forcehorde
Trigger horde event immediately
lastlight.command.forcehorde
OP
/lastlight reload
Reload configuration from disk
lastlight.command.reload
OP
/lastlight set <setting> <value>
Change settings (see below)
lastlight.command.set
OP
/lastlight debug
View debug information
lastlight.command.debug
OP
/lastlight save
Force save plugin data
lastlight.command.save
OP
/lastlight forcethunder
Force thunderstorm weather
lastlight.command.forcethunder
OP
/lastlight clearweather
Clear weather
lastlight.command.clearweather
OP

Set Command Options

Usage: /lastlight set <setting> <value>

  • day - Set day cycle duration (in Minecraft days)

  • night - Set night cycle duration (in Minecraft days)

  • hordeinterval - Set interval between hordes (in Minecraft days)

  • hordescale - Set health scaling multiplier for horde mobs

Examples:

  • /lastlight set day 7 - Set day cycle to 7 Minecraft days

  • /lastlight set night 14 - Set night cycle to 14 Minecraft days

  • /lastlight set hordeinterval 3 - Hordes every 3 days

  • /lastlight set hordescale 2.5 - Mobs have 2.5x health multiplier

Admin Permission

lastlight.admin - Grants all admin commands at once (default: OP)

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
18 1,806
src/main/java/com/lastlight/LastLight.java
package com.lastlight;

import com.lastlight.commands.LastLightCommand;
import com.lastlight.commands.LastLightTabCompleter;
import com.lastlight.enchantments.ExcavationEnchantment;
import com.lastlight.listeners.SleepListener;
import com.lastlight.listeners.HordeListener;
import com.lastlight.managers.*;
import com.lastlight.tasks.AmbientSoundTask;
import com.lastlight.tasks.CycleTask;
import com.lastlight.tasks.HordeTask;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LastLight extends JavaPlugin {
    
    private DataManager dataManager;
    private CycleManager cycleManager;
    private HordeManager hordeManager;
    private WeatherManager weatherManager;
    private SoundManager soundManager;
    private ExcavationEnchantment excavationEnchantment;
    
    private CycleTask cycleTask;
    private HordeTask hordeTask;
    private AmbientSoundTask ambientSoundTask;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        initializeManagers();
        registerEnchantments();
        registerListeners();
        registerCommands();
        startTasks();
        
        getLogger().info("LastLight has been enabled. The darkness spreads...");
    }
    
    @Override
    public void onDisable() {
        stopTasks();
        
        if (dataManager != null) {
            dataManager.saveData();
        }
        
        if (cycleManager != null) {
            cycleManager.cleanup();
        }
        
        getLogger().info("LastLight has been disabled. The light fades...");
    }
    
    private void initializeManagers() {
        dataManager = new DataManager(this);
        dataManager.loadData();
        
        cycleManager = new CycleManager(this);
        hordeManager = new HordeManager(this);
        weatherManager = new WeatherManager(this);
        soundManager = new SoundManager(this);
    }
    
    private void registerEnchantments() {
        if (getConfig().getBoolean("excavation.enabled", true)) {
            excavationEnchantment = new ExcavationEnchantment(this);
            excavationEnchantment.register();
        }
    }
    
    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new SleepListener(this), this);
        getServer().getPluginManager().registerEvents(new HordeListener(this), this);
    }
    
    private void registerCommands() {
        LastLightCommand commandExecutor = new LastLightCommand(this);
        LastLightTabCompleter tabCompleter = new LastLightTabCompleter();
        
        getCommand("lastlight").setExecutor(commandExecutor);
        getCommand("lastlight").setTabCompleter(tabCompleter);
    }
    
    private void startTasks() {
        cycleTask = new CycleTask(this);
        cycleTask.start();
        
        hordeTask = new HordeTask(this);
        hordeTask.start();
        
        if (getConfig().getBoolean("sounds.ambient.enabled", true)) {
            ambientSoundTask = new AmbientSoundTask(this);
            ambientSoundTask.start();
        }
    }
    
    private void stopTasks() {
        if (cycleTask != null) {
            cycleTask.stop();
        }
        if (hordeTask != null) {
            hordeTask.stop();
        }
        if (ambientSoundTask != null) {
            ambientSoundTask.stop();
        }
    }
    
    public void reload() {
        reloadConfig();
        
        stopTasks();
        
        cycleManager.reload();
        hordeManager.reload();
        weatherManager.reload();
        soundManager.reload();
        
        startTasks();
    }
}