artic0449

plugin version 1.21-1.21.11

📎 1 file 2,879 chars
📄
pasted-code-1772202633338.txt
txt 80 lines
▶
I want a Minecraft plugin named EnderSmpMain that contains a total of 12 Scrolls.

When a player equips a scroll, the scroll item should disappear, and a INVENTORY GUI displayed above the player’s hotbar should show which scroll is currently equipped.

After equipping a scroll, the player should receive an Activation Book. The player must hold this book in either the main hand or offhand, and pressing Shift + F should enable that scroll’s ability.

Each scroll should have a proper description based on its type.

Every player should be able to equip only one scroll at a time.

Scrolls and Their Abilities

1. Scroll of Wither
When activated, three Wither Skeletons should emerge from the ground (front, left, right of the player).
They should attack the last target the player hits.
Each skeleton should deal 3.5 hearts of damage.
Duration: 20 seconds.

2. Scroll of Swap
When the player hits a target:

Only the 9 hotbar slots + offhand slot should be shuffled

Armor and the rest of the inventory should remain unchanged

The shuffled slots should be locked so the player cannot rearrange them
Duration: 15 seconds.

3. Scroll of Adrenaline
When activated:

Player receives Strength IV

All normal hits count as critical hits
Duration: 30 seconds.

4. Scroll of Decoy
When activated, three clones should spawn using armor stands:

Each clone should have the player’s skin head

Clones should wear the same armor as the player

Clones should hold the same item as the player

5. Scroll of Thunder
When activated, hitting a targeted player should trigger a lightning strike.
Duration: 30 seconds.

6. Scroll of Shadows
When activated, hitting a targeted player should apply blindness.
An obsidian sphere should form around both players.
The sphere should disappear after 10 seconds, and blindness should be removed after 15 seconds.

7. Scroll of Gravity
When activated, a 10-block-wide sphere of purple particles should appear.
No player should be able to escape the sphere.
Duration: 20 seconds.

8. Scroll of Inferno
When activated, the player should shoot a fireball that deals up to 5 hearts of damage.

9. Scroll of Frost
When activated, white particles should appear within a 5-block radius around the player’s feet.
Hitting a targeted player should apply slowness, keeping them stuck in place.
Duration: 20 seconds.

10. Scroll of Wind
When activated, tornado-shaped wind particles should appear.
Nearby players should be pulled toward the tornado.
Players inside the tornado should continuously take 1 heart of damage.
Duration: 20 seconds.

11. Scroll of Ender
When activated, hitting a target should cause a slam effect (launched upward then instantly slammed down).
The target should not die instantly.
Maximum damage: 4 hearts.

12. Scroll of Echo
When activated, the player should perform a sonic boom attack dealing 5 hearts of damage to the targeted player.
Kodari AI
KodariFeb 27 at 2:35 pm 25,233 (v2)

I’ll create a comprehensive scroll-based ability system plugin with 12 unique scrolls.

EnderSmpMain
Advanced scroll ability system featuring 12 unique combat scrolls with distinctive powers. Players equip scrolls to gain special abilities activated via an Activation Book. Includes summoning Wither Skeletons, inventory shuffling, strength buffs, decoy clones, lightning strikes, shadow spheres, gravity manipulation, fireball launching, frost effects, tornado attacks, ender slams, and sonic boom damage. Each scroll has unique cooldowns and visual effects.

Now I’ll create the complete scroll ability system with all 12 unique scrolls:

Complete scroll ability system created with all 12 unique scrolls! Each scroll has distinct abilities including summoning Wither Skeletons, inventory shuffling, strength buffs, decoy clones, lightning strikes, shadow spheres, gravity manipulation, fireballs, frost effects, tornado attacks, ender slams, and sonic booms. Players equip scrolls via right-click, receive an activation book, and activate abilities by pressing Shift+F while holding the book. Boss bar displays equipped scroll status above hotbar.

artic0449
📎 1 file 1,165 chars
📄
pasted-code-1772204785772.txt
txt 32 lines
▶
Add the following commands to the plugin:

/nocooldown

When an operator (OP) runs this command, their cooldown should be completely removed.
This should apply only to OP players.

/withdraw

When a normal player runs this command, the scroll they currently have equipped should be withdrawn and returned to them as an item.
All its abilities should be removed, meaning the scroll should be completely unequipped.

Extra Features to Add

When a player activates a scroll, a boss bar currently appears showing the scroll status.
Remove the boss bar completely.

Instead of the boss bar, display a bracket element in the center between the hearts and hunger bar (above the hotbar area).
I will add my own custom texture there later, so just create a bracket placeholder where I can insert the texture.

When a player dies:

Their equipped scroll should drop.

Their Activation Book should be removed.

Ability Change

Modify the Scroll of Wither ability:

Instead of summoning Wither Skeletons, when a player activates it, they should shoot a Wither Skeleton head projectile whenever they hit a target.
The Wither Skeleton head should deal 2 hearts of damage per hit.
artic0449
📎 1 file 1,165 chars
📄
pasted-code-1772287667092.txt
txt 32 lines
▶
Add the following commands to the plugin:

/nocooldown

When an operator (OP) runs this command, their cooldown should be completely removed.
This should apply only to OP players.

/withdraw

When a normal player runs this command, the scroll they currently have equipped should be withdrawn and returned to them as an item.
All its abilities should be removed, meaning the scroll should be completely unequipped.

Extra Features to Add

When a player activates a scroll, a boss bar currently appears showing the scroll status.
Remove the boss bar completely.

Instead of the boss bar, display a bracket element in the center between the hearts and hunger bar (above the hotbar area).
I will add my own custom texture there later, so just create a bracket placeholder where I can insert the texture.

When a player dies:

Their equipped scroll should drop.

Their Activation Book should be removed.

Ability Change

Modify the Scroll of Wither ability:

Instead of summoning Wither Skeletons, when a player activates it, they should shoot a Wither Skeleton head projectile whenever they hit a target.
The Wither Skeleton head should deal 2 hearts of damage per hit.
artic0449
📎 1 file 1,165 chars
📄
pasted-code-1772287945191.txt
txt 32 lines
▶
Add the following commands to the plugin:

/nocooldown

When an operator (OP) runs this command, their cooldown should be completely removed.
This should apply only to OP players.

/withdraw

When a normal player runs this command, the scroll they currently have equipped should be withdrawn and returned to them as an item.
All its abilities should be removed, meaning the scroll should be completely unequipped.

Extra Features to Add

When a player activates a scroll, a boss bar currently appears showing the scroll status.
Remove the boss bar completely.

Instead of the boss bar, display a bracket element in the center between the hearts and hunger bar (above the hotbar area).
I will add my own custom texture there later, so just create a bracket placeholder where I can insert the texture.

When a player dies:

Their equipped scroll should drop.

Their Activation Book should be removed.

Ability Change

Modify the Scroll of Wither ability:

Instead of summoning Wither Skeletons, when a player activates it, they should shoot a Wither Skeleton head projectile whenever they hit a target.
The Wither Skeleton head should deal 2 hearts of damage per hit.
artic0449
📎 1 file 1,165 chars
📄
pasted-code-1772287969139.txt
txt 32 lines
▶
Add the following commands to the plugin:

/nocooldown

When an operator (OP) runs this command, their cooldown should be completely removed.
This should apply only to OP players.

/withdraw

When a normal player runs this command, the scroll they currently have equipped should be withdrawn and returned to them as an item.
All its abilities should be removed, meaning the scroll should be completely unequipped.

Extra Features to Add

When a player activates a scroll, a boss bar currently appears showing the scroll status.
Remove the boss bar completely.

Instead of the boss bar, display a bracket element in the center between the hearts and hunger bar (above the hotbar area).
I will add my own custom texture there later, so just create a bracket placeholder where I can insert the texture.

When a player dies:

Their equipped scroll should drop.

Their Activation Book should be removed.

Ability Change

Modify the Scroll of Wither ability:

Instead of summoning Wither Skeletons, when a player activates it, they should shoot a Wither Skeleton head projectile whenever they hit a target.
The Wither Skeleton head should deal 2 hearts of damage per hit.
artic0449
📎 1 file 1,165 chars
📄
pasted-code-1772288613979.txt
txt 32 lines
▶
Add the following commands to the plugin:

/nocooldown

When an operator (OP) runs this command, their cooldown should be completely removed.
This should apply only to OP players.

/withdraw

When a normal player runs this command, the scroll they currently have equipped should be withdrawn and returned to them as an item.
All its abilities should be removed, meaning the scroll should be completely unequipped.

Extra Features to Add

When a player activates a scroll, a boss bar currently appears showing the scroll status.
Remove the boss bar completely.

Instead of the boss bar, display a bracket element in the center between the hearts and hunger bar (above the hotbar area).
I will add my own custom texture there later, so just create a bracket placeholder where I can insert the texture.

When a player dies:

Their equipped scroll should drop.

Their Activation Book should be removed.

Ability Change

Modify the Scroll of Wither ability:

Instead of summoning Wither Skeletons, when a player activates it, they should shoot a Wither Skeleton head projectile whenever they hit a target.
The Wither Skeleton head should deal 2 hearts of damage per hit.
Kodari AI
KodariFeb 28 at 2:26 pm 18,288 (v2)

I’ll analyze the existing plugin structure and implement the requested changes.

I’ll implement all the requested features. Let me break this down:

Plan:

  1. Add /nocooldown command (OP only) to clear cooldowns

  2. Add /withdraw command to unequip scroll and return as item

  3. Replace boss bar with action bar bracket placeholder

  4. Add death listener to drop scroll and remove activation book

  5. Change Wither ability to shoot wither skeleton head projectiles (2 hearts damage)

All requested features have been implemented:

  • /nocooldown removes all cooldowns for OP players

  • /withdraw returns equipped scroll as item and unequips it

  • Boss bar removed and replaced with action bar bracket placeholder §8[ §6ScrollName §7- §aReady §8]

  • On death: scroll drops and activation book is removed

  • Wither ability now shoots wither skeleton head projectiles (4.0 damage = 2 hearts) when hitting targets

artic0449

Replace Scroll of Decoy with Scroll of Solar.

Scroll of Solar – Ability

When a player activates this scroll:

Particles should move toward the targeted player exactly like shown in the reference image.

The targeted player should be repeatedly hit by those particles.

Whenever the particle hits the target, another particle effect (like shown in the second reference image) should appear.

That second particle hit should deal 3 hearts of damage to the targeted player.

Additional Requirement

Add a damage configuration file (config option) so I can adjust the damage values of all scrolls according to my preference.

2 images attached
artic0449

Replace Scroll of Decoy with Scroll of Solar.

Scroll of Solar – Ability

When a player activates this scroll:

Particles should move toward the targeted player exactly like shown in the reference image.

The targeted player should be repeatedly hit by those particles.

Whenever the particle hits the target, another particle effect (like shown in the second reference image) should appear.

That second particle hit should deal 3 hearts of damage to the targeted player.

Additional Requirement

Add a damage configuration file (config option) so I can adjust the damage values of all scrolls according to my preference.

2 images attached
artic0449

Replace Scroll of Decoy with Scroll of Solar.

Scroll of Solar – Ability

When a player activates this scroll:

Particles should travel toward the targeted player exactly like shown in the reference image.

The targeted player should be repeatedly hit by those particles.

Each time the particle hits the target, another particle effect (like shown in the second reference image) should appear.

That second particle should deal 3 hearts of damage to the targeted player.

Additional Requirements

Add a damage configuration option so I can manually adjust the damage values of all scrolls according to my preference.

Fix this issue:

When a player leaves the server, their equipped scroll gets removed and they cannot use the Activation Book anymore after rejoining.

This should be fixed so their scroll remains properly equipped and usable even after they leave and rejoin the server.

2 images attached
artic0449

Replace Scroll of Decoy with Scroll of Solar.

Scroll of Solar – Ability

When a player activates this scroll:

Particles should travel toward the targeted player exactly like shown in the reference image.

The targeted player should be repeatedly hit by those particles.

Each time the particle hits the target, another particle effect (like shown in the second reference image) should appear.

That second particle should deal 3 hearts of damage to the targeted player.

Additional Requirements

Add a damage configuration option so I can manually adjust the damage values of all scrolls according to my preference.

Fix this issue:

When a player leaves the server, their equipped scroll gets removed and they cannot use the Activation Book anymore after rejoining.

This should be fixed so their scroll remains properly equipped and usable even after they leave and rejoin the server.

2 images attached
Kodari AI
KodariMar 2 at 3:34 pm 22,873 (v2)

I’ll help you replace the Scroll of Decoy with Scroll of Solar, add damage configuration, and fix the persistence issue. Let me first examine the current code structure.

Now I’ll implement all the changes:

Plan:

  1. Replace DECOY with SOLAR in ScrollType enum

  2. Create SolarScrollAbility with particle tracking system

  3. Update AbilityManager to register SOLAR instead of DECOY

  4. Add damage configuration to config.yml

  5. Fix persistence issue by not removing player data on quit

Now I’ll create the remaining files:

All changes completed:

  • Replaced Scroll of Decoy with Scroll of Solar featuring particle tracking and impact effects

  • Added damage configuration section for all scrolls

  • Fixed persistence issue by removing the data cleanup on player quit

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
35 1,833
src/main/java/com/endersmp/main/EnderSmpMain.java
package com.endersmp.main;

import com.endersmp.main.commands.NoCooldownCommand;
import com.endersmp.main.commands.ScrollCommand;
import com.endersmp.main.commands.WithdrawCommand;
import com.endersmp.main.data.DataManager;
import com.endersmp.main.listeners.EntityDamageListener;
import com.endersmp.main.listeners.InventoryClickListener;
import com.endersmp.main.listeners.PlayerDeathListener;
import com.endersmp.main.listeners.PlayerInteractListener;
import com.endersmp.main.listeners.PlayerQuitListener;
import com.endersmp.main.listeners.ProjectileHitListener;
import com.endersmp.main.managers.AbilityManager;
import com.endersmp.main.managers.ActivationBookManager;
import com.endersmp.main.managers.ScrollManager;
import com.endersmp.main.tasks.ActionBarUpdateTask;
import com.tcoded.folialib.FoliaLib;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class EnderSmpMain extends JavaPlugin {
    
    private FoliaLib foliaLib;
    private DataManager dataManager;
    private ScrollManager scrollManager;
    private ActivationBookManager activationBookManager;
    private AbilityManager abilityManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.foliaLib = new FoliaLib(this);
        this.dataManager = new DataManager();
        this.scrollManager = new ScrollManager(this);
        this.activationBookManager = new ActivationBookManager(this);
        this.abilityManager = new AbilityManager(this);
        
        registerListeners();
        registerCommands();
        startActionBarTask();
        
        getLogger().info("EnderSmpMain has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (foliaLib != null) {
            foliaLib.getScheduler().cancelAllTasks();
        }
        getLogger().info("EnderSmpMain has been disabled!");
    }
    
    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new PlayerInteractListener(this), this);
        getServer().getPluginManager().registerEvents(new EntityDamageListener(this), this);
        getServer().getPluginManager().registerEvents(new InventoryClickListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        getServer().getPluginManager().registerEvents(new ProjectileHitListener(), this);
    }
    
    private void registerCommands() {
        getCommand("scroll").setExecutor(new ScrollCommand(this));
        getCommand("nocooldown").setExecutor(new NoCooldownCommand(this));
        getCommand("withdraw").setExecutor(new WithdrawCommand(this));
    }
    
    private void startActionBarTask() {
        foliaLib.getScheduler().runTimer(new ActionBarUpdateTask(this), 20L, 20L);
    }
    
    public String getMessage(String path) {
        return getConfig().getString("settings." + path, "").replace("&", "§");
    }
}