johan300_
📎 1 file 5,000 chars
📄
pasted-code-1776036678478.txt
txt 439 lines
▶
COMBAT CLASS + MASTERY STEAL SYSTEM (FULL SPEC PROMPT)
Core System Overview

Create a combat ability system where:

Each player:

is assigned exactly ONE combat class
starts with Mastery Level 3
can increase mastery up to Level 5
can lose mastery down to Level 1
gains mastery by killing players
loses mastery when killed by players

Abilities activate only if:

playerClass == weaponType

Players cannot:

hold multiple classes
activate abilities from other classes
gain mastery for other classes
Combat Classes

Possible classes:

Sword
Axe
Bow
Crossbow
Trident
Mace
Pickaxe
Shield
Spear

Each player always has exactly one class.

Automatic Class Assignment

When player joins server:

IF player has no class
    assign random class instantly
ELSE
    load saved class

Display message:

Your combat class: 
Mastery Level: III

Class persists through:

death
logout
restart
dimension change
Admin Commands

Command:

/combat class select 

Effect:

Assigns random class

Also:

resets mastery to default starting value (3)

Send feedback:

Admin:

Assigned random class to : 

Player:

Your combat class has been changed to  ⚔️

Optional command:

/combat class set  

Example:

/combat class set Johan Spear

Effect:

Sets specific class

Resets mastery to 3

Optional command:

/combat class get 

Returns:

Player class: 
Mastery Level: 
Craftable Class Change Item ⭐

Add craftable item:

Class Change Star

Texture:

Nether Star

Recipe layout:

Netherite Block   Diamond Block   Netherite Block
Diamond Block     Nether Star     Diamond Block
Netherite Block   Diamond Block   Netherite Block

Meaning:

Corners:

Netherite Blocks

Center:

Nether Star

Remaining slots:

Diamond Blocks

When used:

Open class selection menu OR cycle selection list

Player chooses:

Sword
Axe
Bow
Crossbow
Trident
Mace
Pickaxe
Shield
Spear

Then:

assign selected class
reset mastery to level 3
consume item

Display:

You are now a  ⚔️
Mastery Steal System ⚔️

Starting mastery:

3

Minimum mastery:

1

Maximum mastery:

5

On PvP kill:

Victim:

loses 1 mastery

Killer:

gains 1 mastery

Transfer rules:

cannot exceed max mastery
cannot go below min mastery
updates instantly

Send message:

+1  Mastery ⚔️
 Mastery Level: IV
Ability Scaling Rule

All abilities scale with mastery level except Bow.

Example:

Mastery 3 = Level III effect
Mastery 5 = Level V effect

Applies to:

Sword
Axe
Crossbow
Trident
Mace
Pickaxe
Shield
Spear
Weapon Ability System

All cooldown abilities use:

30 second cooldown

Passive abilities:

activate every hit
no cooldown

Counters reset when:

timeout expires
player switches weapon
player misses hit
ability activates
Sword Class

Every:

3 successful hits

Grant:

Speed (level = mastery)
duration = 5 seconds

Cooldown:

30 seconds
Axe Class

Every:

3 successful hits

Grant:

Haste (level = mastery)
duration = 5 seconds

Cooldown:

30 seconds
Bow Class (Special Scaling 🏹)

Every:

3 consecutive hits

Next arrow damage multiplier:

Mastery 1 = 1.0x
Mastery 2 = 1.25x
Mastery 3 = 1.5x
Mastery 4 = 2.0x
Mastery 5 = 3.0x

Maximum:

3x damage

Reset streak if:

player misses shot

After boosted shot:

30 second cooldown

Bow does NOT use potion scaling.

Crossbow Class

On hit:

Apply:

Blindness
duration = 10 seconds
level = mastery

Cooldown:

30 seconds
Trident Class (Passive 🌊)

On every hit:

Grant:

Water Breathing (6 seconds)
Dolphin's Grace (6 seconds)
level = mastery

No cooldown

Mace Class

On hit:

Grant:

Strength (duration 3 seconds)
level = mastery

Cooldown:

30 seconds
Pickaxe Class (Passive ⛏️)

On hit:

Grant:

Hero of the Village (10 seconds)
level = mastery

No cooldown

Shield Class 🛡️

Detect:

successful timed parry block

After:

5 successful parries

Grant:

Resistance (6 seconds)
level = mastery

Cooldown:

30 seconds

Reset counter if:

timeout expires
weapon switch
Spear Class

Track:

successful charge lunges

Every:

3 successful lunges

35% chance to grant:

Saturation
duration = 3 seconds
level = mastery

Cooldown:

30 seconds

Reset if:

miss
weapon switch
timeout expires

Detect lunge when:

player charging spear
AND forward velocity above threshold

Timeout suggestion:

5 seconds
Config Requirements ⚙️

Allow config editing for:

Per weapon:

cooldowns
effect duration
hits required
activation chance
enable/disable ability
passive toggle

Mastery config:

starting mastery
max mastery
min mastery
loss on death
gain on kill
transfer mode
bow multiplier scaling table

Global toggles:

action bar messages
chat messages
particles
sounds
mastery notifications
Anti-Abuse Protection 🛡️

Prevent triggers when:

player switches weapon mid streak
timeout expires
attack misses
invalid hit detected
same-player kill farming repeated

Ensure:

tracking is per-player
cooldowns are per-player
mastery transfers correctly
class lock always enforced
only one class active at a time
class-change item consumed on use
Kodari AI
KodariApr 12 at 11:35 pm 26,560 (v2)

I’ll create a comprehensive combat class system with mastery progression and PvP ability mechanics.

CombatClassSystem
A competitive combat class system with mastery progression. Players are assigned one of nine combat classes (Sword, Axe, Bow, Crossbow, Trident, Mace, Pickaxe, Shield, Spear), each with unique abilities that scale with mastery level. Steal mastery from enemies in PvP combat, craft class change items, and master your chosen weapon path. Features configurable abilities, cooldowns, and anti-abuse protection.

Now I’ll create the remaining files for the combat class system:

All files created successfully! The combat class system is now complete with:

  • 9 Combat Classes with unique abilities (Sword, Axe, Bow, Crossbow, Trident, Mace, Pickaxe, Shield, Spear)

  • Mastery System with PvP steal mechanics (levels 1-5)

  • Craftable Class Change Item with expensive recipe

  • GUI-based class selection when using the star

  • Configurable abilities with cooldowns, durations, and toggles

  • Anti-abuse protection for weapon switching and kill farming

  • Admin commands for class management

  • Persistent data storage across restarts

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
26 1,331
src/main/java/com/combat/classystem/CombatClassPlugin.java
package com.combat.classystem;

import com.combat.classystem.commands.CombatCommand;
import com.combat.classystem.inventory.gui.GUIListener;
import com.combat.classystem.inventory.gui.GUIManager;
import com.combat.classystem.listeners.CombatListener;
import com.combat.classystem.listeners.CraftListener;
import com.combat.classystem.listeners.JoinListener;
import com.combat.classystem.listeners.WeaponSwitchListener;
import com.combat.classystem.managers.AbilityManager;
import com.combat.classystem.managers.ClassManager;
import com.combat.classystem.managers.CooldownManager;
import com.combat.classystem.managers.MasteryManager;
import com.combat.classystem.storage.DataStorage;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CombatClassPlugin extends JavaPlugin {
    private DataStorage dataStorage;
    private ClassManager classManager;
    private MasteryManager masteryManager;
    private CooldownManager cooldownManager;
    private AbilityManager abilityManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.dataStorage = new DataStorage(this);
        this.dataStorage.load();
        
        this.classManager = new ClassManager(this);
        this.masteryManager = new MasteryManager(this);
        this.cooldownManager = new CooldownManager(this);
        this.abilityManager = new AbilityManager(this);
        this.guiManager = new GUIManager();
        
        registerCommands();
        registerListeners();
        
        getLogger().info("CombatClassSystem enabled!");
    }

    @Override
    public void onDisable() {
        if (dataStorage != null) {
            dataStorage.save();
        }
        getLogger().info("CombatClassSystem disabled!");
    }

    private void registerCommands() {
        getCommand("combat").setExecutor(new CombatCommand(this));
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new WeaponSwitchListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CraftListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
    }
}