Dominik Špička

KUSXZP

📎 1 file 14,120 chars
📄
pasted-code-1790546295751.txt
txt 629 lines
▶
Create a complete Minecraft Paper plugin for a LifeSteal SMP server called **BloodWorld Events**.

The plugin must focus ONLY on **random world events**.

IMPORTANT:

* Do NOT create player gameplay commands such as `/soulcontract`, `/hearttax`, `/bloodaltar`, `/hearthunt`, etc.
* Players should not be able to manually activate abilities through chat commands.
* The ONLY commands should be admin commands used to start, stop, reload, test and manage events.
* Events should normally happen automatically with a configurable random chance.
* The plugin should feel mysterious, rare and dangerous.
* Events should have strong visual/audio effects.
* Events must work with the existing LifeSteal heart system.

## ADMIN COMMANDS

Use one main command:

`/bwe`

Subcommands:

`/bwe help`
Shows all admin commands.

`/bwe reload`
Reloads config.yml.

`/bwe list`
Shows all available events and their status.

`/bwe start `
Immediately starts a specific event.

Example:
`/bwe start bloodmoon`

`/bwe stop`
Stops the currently running event.

`/bwe stop `
Stops a specific event.

`/bwe active`
Shows the currently active event and remaining time.

`/bwe test `
Runs an event in TEST mode with shorter duration and increased visual effects.

`/bwe toggle  `
Enables or disables automatic spawning of a specific event.

`/bwe force-random`
Immediately rolls the random event system.

`/bwe reload`

Permissions:

`bloodworld.admin`

Only admins/operators with this permission can use `/bwe`.

There must be NO other player commands.

---

# RANDOM EVENT SYSTEM

Every event has its own configurable chance.

Events should be selected randomly.

Example:

Blood Moon: 2%
Blood Fog: 4%
Blood Rain: 3%
Soul Storm: 1%
etc.

The event system should:

* have configurable chances
* prevent multiple major events from running simultaneously
* have configurable cooldowns
* have configurable durations
* announce rare events to players
* support world whitelist/blacklist
* support minimum online player count
* support automatic event selection
* support disabling individual events

Config example:

```yaml
events:
  bloodmoon:
    enabled: true
    chance: 2.0
    duration: 600

  bloodrain:
    enabled: true
    chance: 4.0
    duration: 180

  soulstorm:
    enabled: true
    chance: 1.0
    duration: 120
```

---

# 20 WORLD EVENTS

Create exactly these 20 events.

## 1. BLOOD MOON

A rare night event.

Effects:

* The sky becomes dark red.
* The moon appears blood-red using Minecraft-compatible visual effects/resource-pack support where possible.
* Red particles appear in the sky.
* The world receives a red/dark atmosphere.
* Hostile mobs become stronger.
* Hostile mobs have a chance to drop special Blood Fragments.
* Players receive a small negative effect such as Weakness or reduced regeneration.
* Rare Blood Creatures can spawn.
* Every few minutes, a random player can receive a temporary Blood Curse.
* Blood Moon automatically ends when the configured duration expires OR when normal morning arrives, depending on configuration.
* When daytime begins, all Blood Moon visual effects disappear.
* The sky returns to normal.
* A global message announces that the Blood Moon has ended.

Important:
The red sky must only exist during the event and must not remain permanently.

---

## 2. BLOOD RAIN

The world begins raining blood.

Effects:

* Rain starts automatically.
* Red particles fall from the sky.
* Water/lake areas can visually appear corrupted using particles.
* Players outside receive a small negative effect.
* Hostile mobs become more aggressive.
* Killing mobs during Blood Rain has a small chance to drop Blood Shards.
* Thunder sounds can randomly play.
* Rarely, lightning strikes near players without directly killing them.

---

## 3. BLOOD FOG

A thick red fog covers the world.

Effects:

* Heavy red/dark particle effects around players.
* Visibility is reduced through darkness/fog effects.
* Players farther than a configurable distance become difficult to see.
* Hostile mobs receive Speed.
* Players receive temporary Darkness at random intervals.
* Random whispers/sounds can play.
* The fog disappears instantly when the event ends.

---

## 4. SOUL STORM

A supernatural storm appears.

Effects:

* Thunderstorm-like weather.
* Blue/purple soul particles.
* Soul fire particles appear around the world.
* Random lightning strikes.
* Hostile mobs can spawn with glowing effects.
* Players occasionally receive short-duration effects such as Slowness or Darkness.
* Rare Soul Fragments can drop from mobs.

---

## 5. HEART ECLIPSE

The sun becomes visually darkened.

Effects:

* Daytime becomes significantly darker.
* Dark particles appear in the sky.
* Players receive temporary reduced regeneration.
* Hostile mobs can spawn during the event even during daytime.
* Stronger mobs have a chance to spawn.
* The event ends automatically after its duration.

---

## 6. DEAD NIGHT

An unnatural night begins.

Effects:

* Time is temporarily locked to night.
* Hostile mob spawn rates increase.
* Zombies, skeletons and spiders become stronger.
* Players receive a small movement penalty.
* Rare mobs can spawn with special names.
* When the event ends, normal time progression resumes.

---

## 7. HEART STORM

A storm connected to the LifeSteal system.

Effects:

* Red particles fall from the sky.
* Every few seconds, random players receive temporary effects.
* Killing hostile mobs gives a chance for Heart Fragments.
* Extremely rarely, a mob can drop a temporary bonus-heart item.
* Lightning appears around the world.
* Dramatic heartbeat sounds play periodically.

---

## 8. BLOOD EARTHQUAKE

The world appears to shake.

Effects:

* Screen-shake-like effects using camera-compatible effects where possible.
* Blocks do NOT actually get destroyed by default.
* Explosion sounds play.
* Falling block particles appear.
* Players receive short Nausea effects.
* Random mobs are spawned around players.
* Small temporary cracks/particle effects appear on the ground.

Optional config:
`destroy_blocks: false`

---

## 9. CORRUPTION

A corruption wave spreads through the world.

Effects:

* Purple/red particles.
* Nearby mobs become corrupted.
* Corrupted mobs gain increased health and damage.
* Players entering corrupted areas receive temporary negative effects.
* Corrupted mobs have a chance to drop Corruption Fragments.
* Corruption disappears when the event ends.

---

## 10. BLOOD HUNT

A random player becomes the temporary "Marked Player".

Effects:

* One online player is randomly selected.
* Other players receive no information about the player's exact location.
* The marked player receives a special visual effect.
* Hostile mobs are more likely to target the marked player.
* If the marked player survives the entire event, they receive a reward.
* If the marked player dies, the event ends early.
* The selected player should not be permanently harmed.

---

## 11. RED AURORA

A mysterious red aurora appears in the sky.

Effects:

* Red/purple particles form patterns above players.
* Ambient sounds play.
* Players receive small positive effects.
* Rare mobs can spawn.
* The event is mostly atmospheric and rare.

This event should feel beautiful and mysterious rather than purely dangerous.

---

## 12. SOULFIRE NIGHT

The world becomes filled with soul fire.

Effects:

* Soul particles everywhere.
* Soul fire visual effects.
* Hostile mobs receive Speed.
* Players occasionally receive Fire Resistance.
* Skeletons and zombies can spawn with soul-themed names.
* Rare Soul items can drop.

---

## 13. HEART METEOR

A meteor falls from the sky.

Effects:

* Select a random location in the world.
* Show a falling meteor using particles.
* Play a loud sound.
* Create an impact effect.
* Create a crater using particles and optionally blocks.
* Do NOT destroy player builds by default.
* A rare Heart Fragment or special loot can spawn at the impact location.
* Announce that a Heart Meteor has fallen somewhere in the world without revealing exact coordinates.

---

## 14. BLOOD WIND

A supernatural wind begins.

Effects:

* Strong wind-like particles.
* Leaves/debris particles.
* Players receive small knockback pulses.
* Ghast-like ambient sounds can play.
* Flying particles travel through the world.
* Rare Blood Shards can appear.

---

## 15. NIGHTMARE INVASION

Nightmare creatures begin appearing.

Effects:

* Spawn a limited number of custom elite mobs.
* Elite mobs receive special names.
* They have increased health.
* They have unique particle effects.
* Killing them gives a chance for rare loot.
* Limit the number of spawned mobs to prevent lag.

---

## 16. HEART RIFT

A temporary dimensional rift appears.

Effects:

* Create a visual rift using particles.
* Spawn mobs around the rift.
* Players near the rift receive temporary effects.
* Rare Heart Fragments can spawn.
* The rift disappears after the event ends.
* Never permanently modify the world unless enabled in config.

---

## 17. BLOOD ALTAR INVASION

Temporary Blood Altars appear around the world.

Effects:

* Spawn temporary altar structures.
* Players can approach them, but there should be no command interaction.
* Altars emit particles and sounds.
* Hostile mobs spawn around them.
* After the event ends, the altars disappear.
* Rewards can be found around the altar.
* Do not permanently modify player builds.

---

## 18. GRAVITY FAILURE

Gravity becomes unstable.

Effects:

* Random players receive temporary Levitation.
* Falling blocks appear visually.
* Items can float temporarily.
* Mobs can receive Levitation.
* Strange sounds play.
* The effect ends automatically.

Do not cause permanent damage or destroy builds.

---

## 19. BLOOD STAR

A strange red star appears.

Effects:

* Create a dramatic sky effect using particles and compatible Minecraft mechanics.
* Players receive small temporary buffs.
* Hostile mobs become stronger.
* Rare Blood Star Fragments can drop.
* The event should be extremely rare.

---

## 20. APOCALYPSE

The rarest event.

Chance should be extremely low.

Effects:

* Dark sky.
* Red particles.
* Thunder.
* Strong hostile mobs.
* Increased mob spawning.
* Random lightning.
* Darkness effects.
* Special elite mobs.
* Dramatic sounds.
* Global warning messages.
* Multiple smaller event effects can temporarily activate.

The event must have strict mob limits to prevent server lag.

The Apocalypse should feel like a server-wide legendary event.

---

# EVENT ANNOUNCEMENTS

Events should have dramatic announcements.

Example:

`⚠ BLOOD MOON HAS RISEN ⚠`

Then:

`The night has been corrupted...`

For extremely rare events:

`☠ THE APOCALYPSE HAS BEGUN ☠`

Use configurable messages in config.yml.

---

# VISUAL EFFECTS

Use Minecraft particles wherever possible:

* REDSTONE
* DUST
* SOUL
* SOUL_FIRE_FLAME
* SMOKE
* ASH
* CLOUD
* END_ROD
* PORTAL
* CRIT
* ELECTRIC_SPARK
* FLAME

Do not create permanent resource-pack requirements.

If custom resource-pack support is implemented, it must be optional.

---

# SOUND EFFECTS

Use Minecraft sounds for:

* thunder
* heartbeat-like sounds
* portals
* explosions
* lightning
* ambient cave sounds
* hostile mob sounds
* boss sounds

Sounds should be configurable.

---

# PERFORMANCE

The plugin must be optimized.

Important:

* Never create thousands of particles every tick.
* Never spawn unlimited mobs.
* Use scheduled tasks carefully.
* Cancel tasks when events end.
* Clean up temporary entities.
* Never permanently modify player builds unless explicitly enabled.
* Have configurable mob limits.
* Have configurable particle limits.
* Prevent multiple copies of the same event from running.

---

# LIFE STEAL INTEGRATION

The plugin should detect whether a LifeSteal plugin is installed.

If a compatible LifeSteal plugin exists:

* Read player hearts if possible.
* Allow events to interact with the heart system.
* Do not replace or break the existing LifeSteal system.
* Make the integration optional.

If LifeSteal is not installed:

* The event system should still work.

---

# CONFIGURATION

Create a detailed `config.yml`.

It must contain:

* event chances
* event durations
* cooldowns
* enabled/disabled events
* worlds
* minimum players
* mob limits
* particle settings
* sound settings
* rewards
* messages
* Blood Moon settings
* Apocalypse settings
* LifeSteal integration settings

Everything important should be configurable.

---

# EVENT GUI

Do NOT create a player GUI.

An optional admin GUI may be available only through:

`/bwe`

It can allow admins to:

* view events
* start events
* stop events
* toggle events
* view cooldowns
* view active event

---

# FINAL REQUIREMENTS

The final plugin should feel like a real LifeSteal SMP event system.

The main gameplay loop should be:

Normal gameplay
→ random event chance
→ event warning
→ dramatic event
→ visual/audio effects
→ event gameplay effect
→ event ends
→ world returns to normal

There must be no unnecessary player commands.

The only command system is the `/bwe` admin command.

Provide:

1. Complete Java source code.
2. `plugin.yml`.
3. `config.yml`.
4. Event manager.
5. Individual event classes.
6. Command system.
7. Permission system.
8. Cleanup system.
9. LifeSteal integration.
10. Maven/Gradle project configuration.
11. Installation instructions.
12. Explanation of how to add new events later.

Target modern Paper Minecraft and keep the code modular and production-ready.
Kodari AI
KodariSep 27 at 10:01 pm 2
BloodWorldEvents
BloodWorldEvents is a Minecraft Paper plugin that introduces a mysterious and dangerous random world event system for LifeSteal SMP servers. It features 20 unique events including Blood Moon, Blood Rain, Soul Storm, and the legendary Apocalypse, each with dramatic visual and audio effects. Events trigger automatically with configurable chances, durations, cooldowns, and world restrictions. The plugin includes an admin-only /bwe command system for managing events, a comprehensive config.yml, optional LifeSteal heart system integration, and robust performance safeguards with mob and particle limits. Events are announced globally and create immersive, temporary world changes without permanently altering player builds.
  1. Create the Paper/Gradle project, plugin entry point, config, and admin-only /bwe command.

  2. Implement automatic event selection, lifecycle/cleanup, optional LifeSteal integration, and all 20 event implementations.

  3. Add installation and extension instructions.

Created BloodWorld Events as a Java 21 Paper plugin with Gradle configuration, plugin.yml, detailed config.yml, and installation and extension instructions in README.md.

It includes all 20 configurable events, automatic chance-based selection with cooldowns and world/player filters, event cleanup, particle and mob limits, and the admin-only /bwe command set. Optional LifeSteal integration supports placeholder-based heart reads and a configurable bonus-heart command. Sky and atmosphere effects use particles and weather mechanics; no resource pack is required.

I did not run a build.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
13 1,744
src/main/java/dev/kodari/bloodworldevents/BloodWorldEventsPlugin.java
package dev.kodari.bloodworldevents;

import dev.kodari.bloodworldevents.command.BweCommand;
import dev.kodari.bloodworldevents.event.EventManager;
import dev.kodari.bloodworldevents.integration.LifeStealIntegration;
import dev.kodari.bloodworldevents.listener.EventListener;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

public final class BloodWorldEventsPlugin extends JavaPlugin {
    private EventManager eventManager;
    private LifeStealIntegration lifeStealIntegration;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        lifeStealIntegration = new LifeStealIntegration(this);
        eventManager = new EventManager(this);
        Bukkit.getPluginManager().registerEvents(new EventListener(eventManager), this);
        BweCommand command = new BweCommand(this, eventManager);
        getCommand("bwe").setExecutor(command);
        getCommand("bwe").setTabCompleter(command);
        eventManager.start();
        getLogger().info("BloodWorld Events enabled with " + eventManager.getEventIds().size() + " events.");
    }

    @Override
    public void onDisable() {
        if (eventManager != null) {
            eventManager.shutdown();
        }
    }

    public EventManager getEventManager() {
        return eventManager;
    }

    public LifeStealIntegration getLifeStealIntegration() {
        return lifeStealIntegration;
    }

    public void reloadPluginConfig() {
        reloadConfig();
        eventManager.restartAutomaticTask();
        lifeStealIntegration.refresh();
    }

    public void sendMessage(org.bukkit.command.CommandSender sender, String message) {
        String prefix = getConfig().getString("messages.prefix", "&8[&4BloodWorld&8] ");
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + message));
    }
}