legendnikhilyt

Create a professional Minecraft plugin for Paper/Spigot 1.21.4+ in Java.

Plugin Name: DinoTokens

Requirements:

1) When a player joins the server: - Give them a random amount of DinoTokens (between 10–50). - Send a colored message showing how many tokens they received. - Store tokens permanently (YAML or MySQL).

2) DinoTokens System: - Create a TokenManager class. - Commands: /dinotokens → show balance /dinotokens give <player> <amount> /dinotokens remove <player> <amount> - Prevent negative balances.

3) Ability System:

Create at least 6 unique abilities: - Fire Blast - Speed Boost - Shield - Explosion Jump - Freeze Enemy - Dino Strength

4) Ability Activation: - Abilities must activate using: - Right click with specific items OR - Sneak + Right Click OR - Swap hand key (F key) - Each ability must: - Have a cooldown - Have a DinoToken cost - Show action bar message - Play sound & particle effects

5) INVENTORY GUI Menu: - Command: /dino - Opens a custom inventory INVENTORY GUI - Shows all abilities with cost & cooldown - Click to activate ability

6) Config.yml: - Editable token rewards - Editable cooldowns - Editable costs - Enable/Disable abilities

7) Code Structure: - Main class - TokenManager - AbilityManager - JoinListener - Ability classes (separate class per ability) - Proper OOP structure - Clean and optimized code

8) Extra: - Prevent ability spam - Use HashMaps for cooldown tracking - Use BukkitRunnable if needed - Fully working plugin.yml included

Provide complete, ready-to-compile source code.

Kodari AI
KodariFeb 24 at 4:54 pm 15,478 (v2)

I’ll create a complete DinoTokens plugin with a GUI-based ability system, token economy, and proper OOP structure.

DinoTokens
A comprehensive token-based ability system featuring 6 unique dinosaur-themed powers. Players earn DinoTokens on join and spend them to activate abilities like Fire Blast, Speed Boost, Shield, Explosion Jump, Freeze Enemy, and Dino Strength. Includes a custom GUI menu, configurable costs and cooldowns, particle effects, sounds, and persistent data storage.

DinoTokens plugin created successfully!

Complete features:

  • Token System: Random join rewards (10-50 tokens), persistent YAML storage, balance checking

  • 6 Abilities: Fire Blast, Speed Boost, Shield, Explosion Jump, Freeze Enemy, Dino Strength with particles/sounds

  • Activation Methods: Right-click items (Blaze Rod/Feather/Shield) + sneak, or F key + sneak for Explosion Jump

  • GUI Menu: /dino opens interactive inventory showing all abilities, costs, cooldowns, and balance

  • Commands: /dinotokens (balance), /dinotokens give/remove <player> <amount> (admin)

  • Config: Fully editable costs, cooldowns, rewards, and ability toggles

  • Cooldowns: HashMap-based tracking with millisecond precision, prevents spam

  • Clean OOP: Separate ability classes, managers for tokens/abilities/data/GUI, proper architecture

  • Ready to compile with all imports, XSeries integration, and working plugin.yml

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
25 1,274
src/main/java/com/dinotokens/DinoTokens.java
package com.dinotokens;

import com.dinotokens.ability.AbilityManager;
import com.dinotokens.command.DinoCommand;
import com.dinotokens.command.DinoTokensCommand;
import com.dinotokens.data.DataManager;
import com.dinotokens.gui.GUIListener;
import com.dinotokens.gui.GUIManager;
import com.dinotokens.listener.AbilityTriggerListener;
import com.dinotokens.listener.JoinListener;
import com.dinotokens.token.TokenManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class DinoTokens extends JavaPlugin {
    
    private DataManager dataManager;
    private TokenManager tokenManager;
    private AbilityManager abilityManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.dataManager = new DataManager(this);
        this.tokenManager = new TokenManager(this);
        this.abilityManager = new AbilityManager(this);
        this.guiManager = new GUIManager();
        
        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AbilityTriggerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("dinotokens").setExecutor(new DinoTokensCommand(this));
        getCommand("dino").setExecutor(new DinoCommand(this));
    }
    
    @Override
    public void onDisable() {
        if (dataManager != null) {
            dataManager.saveAllData();
        }
    }
}