אריאל פרייד

when an operator uses the commend /class randomize it assines to evry player a class that gives them costom pvp abilities

Kodari AI
KodariSep 5 at 10:52 pm 1
ClassRandomizer
Assigns random custom PvP classes to every online player when an operator executes /class randomize. Each class grants unique combat abilities, such as enhanced damage, speed buffs, defensive shields, or special attack skills. Players receive a notification of their assigned class with a description of their powers. The plugin manages class cooldowns, ability activation, and visual/audio feedback during combat. Supports multiple predefined classes with configurable effects, ensuring balanced and dynamic PvP encounters. Operators can also view current class assignments and reset them at any time.

I’ll create the plugin with /class randomize, operator-only access, four randomized PvP classes, and event-driven abilities for every online player.

Created the CustomClasses plugin.

Features:

  • /class randomize operator-only command

  • Randomly assigns every online player one of four PvP classes:

    • Berserker

    • Tank

    • Assassin

    • Archer

  • Class abilities activate automatically during PvP combat

  • Includes tab completion and command permissions

  • Built for Paper 1.20.6 with Java 21

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 251
src/main/java/com/kodari/customclasses/CustomClassesPlugin.java
package com.kodari.customclasses;

import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class CustomClassesPlugin extends JavaPlugin {

    private ClassManager classManager;

    @Override
    public void onEnable() {
        classManager = new ClassManager();

        getServer().getPluginManager().registerEvents(new ClassListener(classManager), this);

        PluginCommand classCommand = getCommand("class");
        if (classCommand == null) {
            getLogger().severe("The class command is missing from plugin.yml.");
            return;
        }

        ClassCommand executor = new ClassCommand(classManager);
        classCommand.setExecutor(executor);
        classCommand.setTabCompleter(executor);
    }

    public ClassManager getClassManager() {
        return classManager;
    }
}