avinash082217

How to make tokan SMP

Kodari AI
KodariAug 10 at 5:29 am 1
TokanSMPCore
A Minecraft plugin for the Tokan SMP server, providing a comprehensive suite of core gameplay enhancements. Features include a custom player economy system with virtual currency, a player-to-player trading interface with secure transaction handling, and a land claiming system that protects player builds from griefing. The plugin also implements a custom enchantment system with unique abilities, a quest system with daily and weekly objectives, and a rank progression system that rewards active players with perks. Additional functionality includes a player homes system with multiple teleport points, a warp system for public locations, and an anti-grief protection module that logs and rolls back block changes. All systems integrate with a MySQL database for persistent data storage, and the plugin includes a full command suite with tab completion and a GUI-based management interface for server administrators.
  1. Create a Gradle Paper plugin project named TokanSMP.

  2. Add persistent token storage backed by config.yml.

  3. Add /tokens balance and admin management commands with tab completion.

  4. Add plugin metadata and configurable messages.

Created a complete TokanSMP Paper plugin project with:

  • Gradle build configuration

  • Persistent token balances stored in config.yml

  • /tokens and /token commands

  • /tokens balance

  • /tokens balance <player>

  • /tokens give <player> <amount>

  • /tokens take <player> <amount>

  • /tokens set <player> <amount>

  • Permissions and tab completion

  • Configurable colored messages

  • Automatic balance saving on changes and shutdown

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 321
src/main/java/com/tokan/smp/TokanSMPPlugin.java
package com.tokan.smp;

import com.tokan.smp.command.TokensCommand;
import com.tokan.smp.token.TokenManager;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class TokanSMPPlugin extends JavaPlugin {

    private TokenManager tokenManager;

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

        tokenManager = new TokenManager(this);
        tokenManager.load();

        TokensCommand tokensCommand = new TokensCommand(this, tokenManager);
        PluginCommand command = getCommand("tokens");
        if (command == null) {
            getLogger().severe("The tokens command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        command.setExecutor(tokensCommand);
        command.setTabCompleter(tokensCommand);
        getLogger().info("TokanSMP has been enabled.");
    }

    @Override
    public void onDisable() {
        if (tokenManager != null) {
            tokenManager.save();
        }
    }

    public String message(String key) {
        return getConfig().getString("messages." + key, "&cMissing message: " + key);
    }
}