superr0701

create the plugin using instructions from txt file

📎 1 file 4,770 chars
📄
CursedFromTheWorld_OneShot_MasterSpec.txt
txt 194 lines
▶

CURSED FROM THE WORLD — ONE-SHOT MASTER SPEC (FULL REBUILD)

Plugin Type: Paper/Spigot (Minecraft 1.20+ latest)
Plugin Name: CursedFromTheWorld

PURPOSE:
Create a high-intensity multiplayer-safe chaos plugin where the world constantly curses players.
This is a FULL BUILD SPEC from scratch containing ALL agreed mechanics and upgrades.

==================================================
CORE DESIGN PRINCIPLES
==================================================

• Multiplayer safe
• High tension, high variety
• No empty events EVER
• Negative events slightly stronger than positives
• All negative events have 1% instant-kill roll
• Highly visible, YouTube-friendly effects
• Performance safe

==================================================
DEFAULT CONFIG
==================================================

event-interval-seconds: 10

IMPORTANT:
• Must remain configurable in config.yml
• Do NOT hardcode

==================================================
COUNTDOWN UX (HEARTBEAT SYSTEM)
==================================================

Boss bar always visible.

At remaining time:

• 3 seconds → faint heartbeat
• 2 seconds → medium heartbeat
• 1 second → strong heartbeat

Requirements:

• Use deep heartbeat-like sound (warden heartbeat preferred)
• Increase volume/pitch each second
• Per-player only
• No chat spam warnings

==================================================
EVENT SELECTION INTELLIGENCE
==================================================

Maintain:

• consecutiveNegativeEvents counter
• sessionSeenEvents set
• recentEvents queue (size 4)

Selection rules:

1. If consecutiveNegativeEvents >= 9 → force positive
2. Otherwise choose negative
3. Prefer events NOT yet seen this session
4. Prevent same event within last 4
5. If event fails → reroll immediately
6. Equal base weight unless marked rare

==================================================
GLOBAL MOB BUFF SYSTEM
==================================================

Any spawned mob may gain ONE random buff:

• Speed I
• Strength I
• Resistance I

Moderate chance only.
Must remain survivable.

==================================================
UNIVERSAL NEGATIVE LETHAL ROLL
==================================================

Before any negative event:

• Roll 1% instant kill
• If triggered → kill player safely
• Update scoreboard
• Skip event logic

==================================================
SCOREBOARD
==================================================

Title:

☠ Cursed by the World

Stat label:

Cursed Deaths

==================================================
COMMANDS
==================================================

/cursedfromtheworld start
/cursedfromtheworld stop
/cursedfromtheworld restart
/cursedfromtheworld reload

Alias:

/cftw

REQUIREMENTS:

• Proper TabCompleter
• Case-insensitive
• No player-name fallback

==================================================
NEGATIVE EVENTS (INTEGRATED)
==================================================

• Mob Ambush: always 5–10 mobs (includes skeleton + creeper)
• Skeleton Sniper: spawn 5 enchanted skeletons
• Cobweb Trap: ≥3 webs under player + Weakness
• Lava Hazard: ≥4 lava sources
• Anvil Rain: 7–10 anvils, fast cadence
• Falling Block Storm: 7–10 blocks, fast cadence
• Phantom Swarm: 4–8 phantoms, aggressive
• Static Charge: 5–10 lightning strikes NEAR player only
• Freezing Rain: powder-snow style freezing + slowness
• Pillager Patrol: 3–5 pillagers (captain rare)
• Ravager Assault (rare): 1 ravager (+ rider rare)
• Lightning Storm Surge: 3–6 lightning strikes nearby
• Enderman Stalkers: 2–4 aggressive Endermen
• Nether Rift: 2–5 Nether mobs (weighted)
• Flash Flood: water 3x3 or 5x5 under player

(All prior negative events from V3 remain included.)

==================================================
POSITIVE EVENTS (HELPER THEME)
==================================================

Include full previously defined pool:

• Resource Gift (expanded)
• Emergency Food Drop
• Advanced Arrow Bundle (8–64, includes tipped)
• Gear Assistance (iron → rare netherite ~1%)
• Healing Pulse (2–6 hearts)
• Protective Blessing
• Swift Escape
• Repair Touch
• Lucky Chest
• Lucky Ore Drop
• Rare Fortune (~1%)
• Mysterious Potion Supply

POTION RULES:

• Give 1–3 potions
• Vanilla durations
• Duration weights:

    short 50%
    medium 30%
    long 20%

==================================================
PERFORMANCE REQUIREMENTS
==================================================

Plugin MUST:

• Prevent event overlap
• Clean boss bars on stop
• Handle player join/quit
• Multiplayer safe
• No memory leaks
• Paper 1.20+ compatible
• Fully configurable

==================================================
END OF ONE-SHOT MASTER SPEC
==================================================
Kodari AI
KodariFeb 26 at 4:33 pm 34,280 (v2)

I’ll create a high-intensity chaos plugin with 15+ negative events, 12+ positive events, and intelligent selection mechanics.

CursedFromTheWorld
A high-intensity multiplayer chaos plugin where the world constantly curses players. Features intelligent event selection that prevents repeats, forces positive events after 9 consecutive negatives, includes heartbeat countdown system, 1% instant-kill rolls on negative events, global mob buffs, and extensive visual effects. Supports 15+ negative events including mob ambushes, environmental hazards, and weather chaos, plus 12+ positive helper events with loot drops and buffs.

Now I’ll build the complete plugin with all 27+ events and intelligent mechanics:

Now creating positive events:

Now updating the main plugin class with all managers:

Complete plugin created with 15 negative events, 12 positive events, intelligent event selection preventing repeats and forcing positives after 9 consecutive negatives, heartbeat countdown system, 1% instant-kill rolls, global mob buffs, scoreboard tracking, boss bar visualization, and full command system with tab completion.

superr0701

update using txt file

📎 1 file 5,161 chars
📄
CursedFromTheWorld_Missing_Negatives_Patch.txt
txt 212 lines
▶

CURSED FROM THE WORLD — MISSING NEGATIVE EVENTS PATCH

PURPOSE:
Add the missing core negative events that were not generated in the current build.
This is an ADDITIVE patch. Do NOT remove existing events.

==================================================
IMPLEMENT THE FOLLOWING NEGATIVE EVENTS
==================================================

1. Lightning Strike (Core Curse)
Chat: ⚡ Lightning strikes from above!
Behavior:
• Strike within 2 blocks of player
• EXACT 50/50:
  - 50% hit player
  - 50% hit nearby location
• Must be visible and damaging but fair

--------------------------------------------------

2. Safe Random Teleport
Chat: 🌀 Space violently warps around you!
Behavior:
• Teleport player 10–20 blocks away
• MUST be safe (no suffocation, lava, void)
• Retry until safe location found

--------------------------------------------------

3. Negative Potion Effect
Chat: 🧪 A crippling status effect takes hold!
Behavior:
• Apply one negative effect for ≥10 seconds
Effect pool (equal weight, Wither slightly lower):
• Blindness
• Slowness
• Weakness
• Mining Fatigue
• Hunger
• Nausea
• Darkness
• Poison (non-lethal)
• Wither (slightly rarer)

--------------------------------------------------

4. Darkness Jump Scare
Chat: 🌑 Supernatural darkness engulfs you…
Behavior:
• Apply Darkness or Blindness ≥10s
• Play horror sound
• Optional fake creeper/TNT sound
• Must be noticeable and scary

--------------------------------------------------

5. Explosion Event
Chat: 💥 A violent blast detonates nearby!
Behavior:
Randomly choose:
• Invisible explosion in front (3–5 blocks)
• Lit TNT in front
• Lit TNT above player
Rules:
• Must damage but remain survivable

--------------------------------------------------

6. Cursed Armor Override
Chat: ☠️ Cursed armor has forcibly equipped itself onto you!
Behavior:
• Remove currently worn armor
• Move removed armor to inventory (or drop if full)
• Equip cursed armor piece (Binding or Vanishing)
• Never delete player gear

--------------------------------------------------

7. Hunger Drain
Chat: 🍗 Your hunger is suddenly drained!
Behavior:
• Reduce hunger by 6–10 points
• Rare full drain allowed

--------------------------------------------------

8. Random Item Drop
Chat: 🎒 You fumble and drop an item!
Behavior:
• Random item from inventory or hotbar
• Drop on ground (DO NOT delete)
• Must always succeed

--------------------------------------------------

9. Slowness Field
Chat: 🐌 A heavy slowing force grips you!
Behavior:
• Apply Slowness II for ~10 seconds
• Add visible particles

--------------------------------------------------

10. Weakness Surge
Chat: 💪 A surge of weakness overtakes your body!
Behavior:
• Apply Weakness II for ~12 seconds
• Add visible particles

--------------------------------------------------

11. Fire Burst
Chat: 🔥 You are suddenly set ablaze!
Behavior:
• Ignite player for 2–3 seconds max
• Must be survivable

--------------------------------------------------

12. Inventory Scramble (RARE)
Chat: 📦 Your inventory descends into total chaos!
Behavior:
• Shuffle entire inventory
• Preserve items
• Low weight (rare)

--------------------------------------------------

13. Full Inventory Drop (RARE)
Chat: 🧨 Your entire inventory spills onto the ground!
Behavior:
• Drop ALL inventory items
• Scatter slightly
• DO NOT delete items
• Rare event

--------------------------------------------------

14. Inventory Swap With Player
Chat: 🔄 Your inventory has been mysteriously altered!
Behavior:
IF ≥2 players online:
    • Swap full inventories between two players
ELSE (solo fallback):
    • Randomize each slot into mid-tier survival items
Rules:
• Never generate overpowered gear
• Must always produce visible result

--------------------------------------------------

15. Gravity Jolt
Chat: 🪂 You are suddenly launched upward!
Behavior:
• Launch player upward 3–5 blocks
• Cap fall damage to survivable level
• Must not chain infinitely

--------------------------------------------------

16. Gravity Shift (Environment)
Chat: 🌍 Gravity violently shifts around you!
Behavior:
Randomly choose:

LOW GRAVITY:
• Jump Boost + Slow Falling (10–15s)

HIGH GRAVITY:
• Slowness + reduced jump (10–15s)

Must include particles and sound.

--------------------------------------------------

17. Curse of Nightfall
Chat: 🌑 Darkness spreads across the world…
Behavior:
• Set time to night
• Overworld only
• Must not spam excessively

--------------------------------------------------

18. Storm Curse
Chat: ⛈ The skies turn hostile…
Behavior:
Random:
• Heavy rain
• Thunderstorm
• Brief lightning activity
Must be atmospheric but not laggy

==================================================
GLOBAL RULE REMINDERS
==================================================

ALL new negative events must:

• Include 1% instant-kill pre-roll
• Respect anti-repeat system
• Respect freshness bias system
• Support multiplayer safely
• Never produce empty outcome
• Be configurable where appropriate

==================================================
END OF MISSING NEGATIVE EVENTS PATCH
==================================================
Kodari AI
KodariFeb 26 at 4:41 pm 25,232 (v2)

I’ll implement the missing negative events by first examining the existing structure, then creating all 18 new negative event classes.

Now I’ll create all 18 missing negative events following the established pattern.

Now I need to register all these new events in the EventManager:

All 18 missing negative events have been created and registered in the EventManager. Each event follows the established pattern with proper XSeries usage, 1% instant-kill pre-roll support, and safe implementations that never delete player items.

superr0701
📎 1 file 4,013 chars
📄
CursedFromTheWorld_V3.2_Behavior_Patch.txt
txt 206 lines
▶

CURSED FROM THE WORLD — V3.2 BEHAVIOR & PERSISTENCE PATCH

PURPOSE:
Fix event selection bias, ensure world changes persist, extend negative effect durations,
improve UI clarity, and enhance curse atmosphere.

THIS IS AN ADDITIVE UPDATE. Do NOT remove existing working systems.

==================================================
1. EVENT SELECTION PRIORITY FIX (VERY IMPORTANT)
==================================================

CURRENT ISSUE:
Some events (e.g., Ground Collapse) rarely or never trigger.

IMPLEMENT NEW PRIORITY LOGIC:

Maintain:

• recentNegativeEvents queue (size = 10)
• fullNegativeEventRegistry list

Selection rules for NEGATIVE events:

1. Build list of negative events NOT present in last 10 negative events
2. IF that list is NOT empty:
      → pick randomly from that list (PRIORITIZE unseen recent events)
3. ELSE:
      → fall back to normal weighted random from full pool
4. Still respect:
      • anti-repeat protection
      • positive-forcing rule (~1 in 10)

GOAL:
• Every event appears regularly
• No event starves (like Ground Collapse)
• Still feels random

==================================================
2. WORLD CHANGE PERSISTENCE (CRITICAL)
==================================================

CURRENT ISSUE:
Placed blocks (water, lava, cobwebs, etc.) disappear.

NEW RULE:

ALL blocks placed by negative events must be PERMANENT.

This includes:

• cobwebs
• lava
• water
• powder snow
• falling block landings
• any environmental placement

STRICT REQUIREMENTS:

• Do NOT schedule automatic cleanup
• Do NOT use temporary block revert systems
• Use normal world block placement
• Respect block physics naturally
• Must persist across ticks like vanilla blocks

EXCEPTION:

Only allow removal if:

• player manually breaks block
• normal game mechanics remove it

==================================================
3. NEGATIVE EFFECT DURATION BUFF
==================================================

NEW GLOBAL RULE:

Any negative status effect duration must be:

• MINIMUM: 10 seconds
• Recommended range: 10–20 seconds random

Applies to:

• slowness
• weakness
• blindness
• darkness
• freezing
• mining fatigue
• etc.

DO NOT apply this rule to positive effects.

==================================================
4. CURSE PARTICLE AURA (NEW)
==================================================

ADD persistent visual feedback that player is cursed.

Behavior:

• While plugin is active
• Every player affected gets subtle dark particle aura

Particle suggestions:

• smoke (very light)
• ash
• or dark redstone dust

Requirements:

• subtle, not spammy
• low particle count
• every ~10 ticks or similar
• multiplayer safe
• stops when plugin stops

GOAL:

• constant cursed atmosphere
• visual identity for the plugin

==================================================
5. SCOREBOARD FORMAT FIX
==================================================

CURRENT ISSUE:
Scoreboard shows player name next to deaths.

NEW FORMAT:

Title:

Cursed Deaths

Entries:

: 

Example:

Steve: 5
Alex: 2

REQUIREMENTS:

• clean formatting
• no duplicated labels
• update live
• multiplayer safe

==================================================
6. CHAT MESSAGE CLEANUP
==================================================

REMOVE ALL EMOJIS from event messages.

NEW MESSAGE RULES:

NEGATIVE EVENT MESSAGE:

• color: RED
• content: event name only
• no prefix
• no suffix
• no emoji

Example:

Ground Collapse
Mob Ambush
Static Charge

POSITIVE EVENT MESSAGE:

• color: GREEN
• content: event name only
• no prefix
• no suffix
• no emoji

Example:

Resource Gift
Healing Pulse

==================================================
7. TIMING STABILITY CHECK
==================================================

Ensure:

• no event overlaps
• no double triggers
• boss bar remains accurate
• heartbeat still functions

==================================================
END OF V3.2 BEHAVIOR & PERSISTENCE PATCH
==================================================
Kodari AI
KodariFeb 26 at 5:19 pm 54,621 (v2)

I’ll analyze the current implementation and apply the V3.2 behavior patch systematically.

Now I’ll implement all V3.2 patch requirements:

Analysis

  • Event selection uses size-4 recent queue; need size-10 with priority for unseen events

  • Multiple events have block cleanup schedulers that must be removed

  • Effect durations are mostly 10-20s, need to verify minimums

  • No particle aura exists

  • Scoreboard shows generic “Cursed Deaths” label instead of per-player

  • Messages have emojis and prefixes

Now I need to update all remaining event files. Let me check what other events exist and update their messages:

Now I’ll implement all the V3.2 requirements:

Now I’ll update all the remaining event messages. Let me create patches for all of them:

V3.2 Behavior & Persistence Patch successfully applied with:

  • Event selection priority logic (tracks last 10 negative events, prioritizes unseen)

  • World block persistence (removed all cleanup schedulers from block-placing events)

  • Effect durations verified (all 10-20 seconds minimum)

  • Curse particle aura added (subtle smoke particles every second)

  • Scoreboard format fixed (displays “PlayerName: DeathCount”)

  • All chat messages cleaned (removed emojis/prefixes, simple event names in red/green)

superr0701
📎 1 file 2,344 chars
📄
pasted-code-1772126402866.txt
txt 164 lines
▶
🔧 CURSED FROM THE WORLD — V3.2.1 MOVEMENT SAFETY PATCH

TYPE: Additive fix
DO NOT remove existing systems

1. JUMP BOOST / LOW GRAVITY SAFETY FIX (CRITICAL)
Problem

Some events (especially Gravity Shift / Low Gravity) give too much vertical power, causing:

server rubberband

jump cancellation

anti-cheat movement rejection

players unable to jump

✅ NEW HARD LIMITS

When applying any upward mobility effects:

Jump Boost

MAX level: Jump Boost II

Preferred: Jump Boost I

NEVER exceed level II

Upward velocity launches (Gravity Jolt)

Clamp vertical velocity:

Max Y velocity: 0.9

Recommended range: 0.6–0.9

NEVER exceed 1.0

Low Gravity mode

If using combo effects:

Allowed combo:

Jump Boost I–II

Slow Falling I

NOT allowed:

Jump Boost III+

Extreme levitation

stacked vertical amplifiers

✅ SAFE APPLICATION RULE

When applying jump-related effects:

Clear existing Jump Boost before applying new one

Do NOT stack multiple jump modifiers

Respect vanilla physics

2. MOVEMENT VALIDATION SAFETY (PAPER/SPIGOT)

To avoid server rejecting movement:

Requirements

Avoid teleporting player upward rapidly

Avoid repeated velocity changes within same tick

Minimum 5–10 tick gap between strong velocity applications

Do NOT apply jump boost and strong launch in same tick

3. GRAVITY SHIFT EVENT — REBALANCE
LOW GRAVITY MODE

Use:

Jump Boost I or II

Slow Falling I

Duration: 10–15 seconds

Must feel floaty but controllable.

HIGH GRAVITY MODE

Use:

Slowness II

Optional Jump reduction (very mild)

Duration: 10–15 seconds

Must NOT completely prevent jumping.

4. GENERAL EFFECT SAFETY PASS

Apply to ALL movement-related events:

Ensure:

no infinite bouncing

no movement lock

no anti-cheat rubberband loops

no “moved too quickly” spam

If extreme movement detected:

→ automatically clamp effect strength.

5. OPTIONAL (RECOMMENDED BUT SAFE)

When Gravity Jolt launches player:

Apply brief Slow Falling (2–3s)

Prevents accidental unfair deaths

Improves cinematic feel

6. DO NOT CHANGE

Preserve:

event frequency system

negative/positive balance

heartbeat system

persistence rules

particle aura

chat formatting

✅ SUCCESS CRITERIA

After patch:

Players can always jump normally

No rubberband on low gravity

No “moved too quickly” kicks

Gravity events feel smooth and controllable

Still dangerous but fair
superr0701
📎 1 file 5,602 chars
📄
CursedFromTheWorld_UNIVERSAL_Upgrade_Script.txt
txt 249 lines
▶

CURSED FROM THE WORLD — UNIVERSAL UPGRADE SCRIPT (LATEST MASTER)

PURPOSE:
This script upgrades ANY previous version of the plugin to the latest stable
feature-complete build while preserving existing working systems.

INTENDED USE:
Feed this to the AI even if the current plugin is outdated. The AI must:

• Detect what already exists
• Add what is missing
• Upgrade what is outdated
• Preserve what is already correct
• NEVER duplicate systems
• NEVER remove working logic unless explicitly replaced

================================================================
GLOBAL UPGRADE RULES (MANDATORY)
================================================================

1. NON-DESTRUCTIVE MERGE
--------------------------------
The AI MUST:

• Keep existing working code
• Only modify systems listed in this spec
• Avoid rewriting entire classes unless broken
• Avoid duplicate schedulers, listeners, or managers

2. FEATURE DETECTION
--------------------------------
Before adding any system, AI must check:

IF system already exists and matches spec → KEEP

IF system exists but outdated → UPGRADE IN PLACE

IF system missing → CREATE

3. SINGLETON SAFETY
--------------------------------
Ensure only ONE of each exists:

• event scheduler
• curse aura task per player
• scoreboard manager
• event manager

================================================================
CORE SYSTEMS — REQUIRED STATE
================================================================

The final upgraded plugin MUST contain ALL of the following.

--------------------------------
A. EVENT ENGINE
--------------------------------

• Global repeating curse timer
• Boss bar countdown (green → yellow → orange → red)
• Strong heartbeat last 3 seconds
• Anti-repeat event system
• Session-wide “seen events” tracking
• eventTickRunning guard

--------------------------------
B. NEGATIVE EVENTS
--------------------------------

Ensure full negative pool exists including:

• Lightning Strike
• Warp Distortion
• Mob Ambush
• Charged Creeper
• Crippling Hex (NO Darkness inside)
• Darkness Veil (Darkness only)
• Ground Collapse (3×3, depth 4–10)
• Lava Eruption (guaranteed placement)
• Inventory Shuffle
• Mob Frenzy
• Violent Explosion
• Cursed Armor
• Hunger Drain
• Item Fumble
• Heavy Slowness
• Weakened State
• Skeleton Snipers (1–5, 50% enchanted)
• Web Trap
• Sudden Ignition
• Inventory Chaos
• Phantom Swarm (buffed)
• Gravity Jolt
• Inventory Spill
• Inventory Swap
• Anvil Barrage (7–10, 70% accurate)
• Falling Debris
• Gravity Shift
• Nightfall Curse
• Storm Curse
• Enderman Stalkers
• Nether Rift
• Flash Flood
• Static Charge
• Freezing Rain
• Pillager Patrol
• Ravager Assault
• Deep Warden Awakens (1–2% rare)

AI must ADD any missing ones.

--------------------------------
C. POSITIVE EVENTS
--------------------------------

Ensure helper-themed positives exist including:

• Resource Gift
• Emergency Rations
• Arrow Supply
• Gear Blessing
• Healing Pulse
• Protective Aura
• Swift Escape
• Repair Touch
• Lucky Chest
• Fortune Drop
• Rare Fortune
• Mystic Potions

--------------------------------
D. LUCKY CHEST (FINAL DESIGN)
--------------------------------

Loot tables MUST NOT be used.

Instead implement deterministic random fill:

• Fill 4–8 random slots
• Use predefined weighted item pool
• Guarantee ≥3 meaningful stacks
• Validate enchanted books
• Never empty

--------------------------------
E. GROUND COLLAPSE (FINAL)
--------------------------------

Must:

• affect 3×3 centered on player
• remove blocks depth 4–10
• never silently fail
• never drop into void
• replace with AIR

--------------------------------
F. LAVA ERUPTION (FINAL)
--------------------------------

Placement order:

1. beneath player
2. cardinal offsets
3. nearby replaceable search

Rules:

• always place source lava
• minimum 3 sources
• never silently fail

--------------------------------
G. CURSE AURA (VISIBLE RING)
--------------------------------

Every cursed player:

• task every 6–8 ticks
• 16–24 particles pulse
• radius 0.8–1.1
• vertical offset +0.2–0.4
• burst every ~3 seconds (28–36 particles)
• circular ring (NOT vertical pillar)
• cancel on quit
• cancel on plugin stop

--------------------------------
H. SCOREBOARD (MULTIPLAYER SAFE)
--------------------------------

Sidebar title:

Cursed Deaths

Requirements:

• Map backing
• PlayerJoinEvent registration
• live death updates
• supports late joiners
• no duplicate entries

--------------------------------
I. MULTIPLAYER HARDENING
--------------------------------

Must guarantee:

• single global scheduler
• no per-player duplicate timers
• per-player event messaging
• no chat leakage
• late join safe
• equal event distribution

================================================================
DO NOT MODIFY (LOCKED)
================================================================

If already correct, preserve:

• heartbeat timing & volume
• movement safety clamps
• persistent world changes
• anti-repeat logic
• command system
• boss bar style (except color rules)

================================================================
SUCCESS CRITERIA
================================================================

After upgrade:

• Works from any older version
• Lucky chest always filled
• No double events
• Ground collapse reliable
• Lava always appears
• Multiplayer fully stable
• Curse aura clearly visible
• Event variety healthy

================================================================
END OF UNIVERSAL UPGRADE SCRIPT
================================================================
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
59 2,462
src/main/java/com/cursedworld/CursedFromTheWorld.java
package com.cursedworld;

import com.cursedworld.command.CursedCommand;
import com.cursedworld.listener.PlayerListener;
import com.cursedworld.manager.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CursedFromTheWorld extends JavaPlugin {
    private EventManager eventManager;
    private GameManager gameManager;
    private BossBarManager bossBarManager;
    private ScoreboardManager scoreboardManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.eventManager = new EventManager(this);
        this.gameManager = new GameManager(this);
        this.bossBarManager = new BossBarManager(this);
        this.scoreboardManager = new ScoreboardManager(this);

        CursedCommand cursedCommand = new CursedCommand(this);
        getCommand("cursedfromtheworld").setExecutor(cursedCommand);
        getCommand("cursedfromtheworld").setTabCompleter(cursedCommand);

        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);

        getLogger().info("CursedFromTheWorld has been enabled!");
    }

    @Override
    public void onDisable() {
        if (gameManager != null && gameManager.isRunning()) {
            gameManager.stop();
        }
        getLogger().info("CursedFromTheWorld has been disabled!");
    }
}