officalstealdash-a11y

Develop the "StealDash" plugin for Minecraft version 1.21.11 on Paper, allowing players to steal items from opponents during PvP with a balanced success rate. Implement a "Dash" ability that grants a temporary speed boost after a successful steal, featuring a configurable cooldown to prevent abuse. Include customizable permissions for different player ranks, adjustable steal success chances, and a visual notification system for both the thief and victim, ensuring balanced gameplay. Additionally, integrate a texture pack for enhanced aesthetics, similar to popular custom plugins like Strength SMP.

Kodari AI
KodariJun 13 at 7:59 pm 36
StealDash
A PvP-focused plugin that lets players steal items from opponents on hit with configurable success rates per rank. Successful steals trigger a temporary speed Dash ability with its own cooldown. Features rank-based permission tiers with adjustable steal chances, dual-cooldown management for steal and dash separately, visual title/action-bar/particle/sound notifications for both thief and victim, resource pack auto-delivery on join, and full admin reload support.

Plan:

  1. StealDash.java — main plugin, wires all managers

  2. managers/ConfigManager.java — typed config accessors + rank bonus logic

  3. managers/CooldownManager.java — separate steal / dash cooldown maps

  4. managers/StealManager.java — core steal logic, notifications, item transfer

  5. managers/DashManager.java — speed effect application

  6. managers/ResourcePackManager.java — pack delivery

  7. listeners/StealListener.java — EntityDamageByEntityEvent hook

  8. listeners/PlayerJoinListener.java — sends resource pack on join

  9. commands/StealDashCommand.java — /stealdash reload|info|pack

  10. util/MessageUtil.java — Adventure-based coloring, titles, action bars

  11. plugin.yml + config.yml

Now the sendMessage helper in StealDashCommand calls asPlayerOrConsole which can return null — let me fix that use to go directly through the sender instead:I need to actually write the file contents — let me create all files with their full content now:

Here’s what was built:


🗂️ Plugin Structure

File
Purpose
StealListener
Hooks
EntityDamageByEntityEvent
(melee-only, DamageCause check) to trigger steal attempts
StealManager
Rolls against configurable chance, transfers random item from victim’s 0–35 slots, fires all notifications
DashManager
Applies Speed potion effect via XPotion with its own independent cooldown
CooldownManager
Two separate cooldown maps (steal + dash) using epoch-millis for precision
ConfigManager
Typed accessors for all config values;
getEffectiveChance(player)
picks the highest rank bonus
ResourcePackManager
Sends pack on join (20-tick delay) and via
/stealdash pack
; supports hash + required flag
MessageUtil
Adventure-based coloring,
sendTitle()
,
sendActionBar()
, all using
&
legacy codes

🔑 Permission Tiers

Permission
Effect
stealdash.steal
Can attempt steals (default: true)
stealdash.dash
Can use the speed boost (default: true)
stealdash.bypass
Cannot be stolen from (default: op)
stealdash.rank.vip/mvp/elite
+10/+20/+35% steal chance bonus
stealdash.admin
/stealdash reload
access

⚙️ Key Config Options

  • steal.base-chance — base success % (default 30)

  • steal.cooldown / dash.cooldown — independent cooldowns

  • dash.speed-amplifier — 0 = Speed I, 1 = Speed II, 2 = Speed III

  • Full sound/particle customization with XSeries keys

  • Resource pack URL, hash, required flag, and prompt message all configurable

officalstealdash-a11y

its supposed to be a pluglin

Kodari AI
KodariJun 13 at 8:03 pm 13

Here’s the full breakdown of every file shipped:


📁 File Overview

File
Role
StealDash.java
Main plugin class — wires all managers and registers listeners
ConfigManager.java
All typed config reads;
getEffectiveChance()
picks highest rank bonus
CooldownManager.java
Two separate epoch-millis cooldown maps (steal + dash)
StealManager.java
Core logic — permission checks → cooldown → roll → item transfer → notifications
DashManager.java
Speed potion via XPotion, particles via XParticle, independent cooldown
ResourcePackManager.java
20-tick delayed pack send on join; SHA-1 hash parsing for verified packs
MessageUtil.java
&
color codes,
sendTitle()
,
sendActionBar()
wrappers
StealListener.java
EntityDamageByEntityEvent
— melee-only filter via
DamageCause
check
PlayerJoinListener.java
Fires resource pack on player join
StealDashCommand.java
/stealdash reload

⚙️ How It Works

  1. Player hits another player (melee) → StealListener fires

  2. StealManager checks: permission → bypass → cooldown → random roll vs effective chance

  3. On success: random item taken from victim slots 0–35, given to thief, title + chat + sound + particle fired on both players

  4. DashManager immediately triggers — applies Speed I/II/III for configured ticks with its own separate cooldown

  5. On join → resource pack auto-sent after 1 second (configurable URL/hash/required)


🔑 Rank Bonuses (config-driven)

Rank
Permission
Default Bonus
VIP
stealdash.rank.vip
+10%
MVP
stealdash.rank.mvp
+20%
Elite
stealdash.rank.elite
+35%

Base is 30%, so Elite players steal at 65% — all tunable in config.yml.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 821
src/main/java/com/kodari/stealdash/StealDash.java
package com.kodari.stealdash;

import com.kodari.stealdash.commands.StealDashCommand;
import com.kodari.stealdash.listeners.PlayerJoinListener;
import com.kodari.stealdash.listeners.StealListener;
import com.kodari.stealdash.managers.ConfigManager;
import com.kodari.stealdash.managers.CooldownManager;
import com.kodari.stealdash.managers.DashManager;
import com.kodari.stealdash.managers.ResourcePackManager;
import com.kodari.stealdash.managers.StealManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

public class StealDash extends JavaPlugin {

    @Getter private ConfigManager configManager;
    @Getter private CooldownManager cooldownManager;
    @Getter private DashManager dashManager;
    @Getter private StealManager stealManager;
    @Getter private ResourcePackManager resourcePackManager;

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

        configManager = new ConfigManager(this);
        cooldownManager = new CooldownManager();
        dashManager = new DashManager(this);
        stealManager = new StealManager(this);
        resourcePackManager = new ResourcePackManager(this);

        getServer().getPluginManager().registerEvents(new StealListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);

        StealDashCommand cmd = new StealDashCommand(this);
        getCommand("stealdash").setExecutor(cmd);
        getCommand("stealdash").setTabCompleter(cmd);

        getLogger().info("StealDash enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("StealDash disabled.");
    }

    public void reload() {
        reloadConfig();
        configManager.reload();
    }
}