SwiftRival

Uzstaisi DeluxMenu plugina man Shopu. Shopa bus ka var nopirkt atslegas pa punktiem. Uzstaisi Hardcore Price, pec manas prasibas. chata ir vardu spele kura var vine no 50-125 punktiem ik pec 25 minutem

Kodari AI
KodariMar 27 at 11:59 pm 17,009 (v2)

Es izveidošu veikala plugin’u ar DeluxMenus integrāciju, punktu sistēmu un vārdu spēli!

KeyShopPlugin
Advanced key shop system with points economy and word game mechanics. Players earn 50-125 points every 25 minutes by solving scrambled word challenges in chat. Points can be spent in DeluxMenus shop interface to purchase various keys with custom hardcore pricing. Features automatic word game scheduling, points management commands, and seamless DeluxMenus integration for shop GUI.

✅ Plugin izveidots!

Galvenās funkcijas:

  • 🎮 Vārdu spēle katras 25 minūtes - pelni 50-125 punktus

  • 🔑 5 atslēgu veidi ar Hardcore cenu (2500 punkti)

  • 💰 Pilna punktu sistēma ar admin komandām

  • 📦 DeluxMenus integrācija veikalam

  • 📊 PlaceholderAPI atbalsts

Kā izmantot:

  1. Kompilē plugin

  2. Liec .jar uz servera

  3. Kopē deluxemenus/keyshop.yml uz plugins/DeluxMenus/gui_menus/

  4. Restartē serveri

Vārdu spēle: Automātiski sākas ik pēc 25 minūtēm, parāda sajauktu vārdu, pirmais kurš pareizi uzmin - uzvar punktus!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
Code
17 1,271
src/main/java/com/keyshop/KeyShopPlugin.java
package com.keyshop;

import com.keyshop.commands.KeyShopBuyCommand;
import com.keyshop.commands.KeyShopCommand;
import com.keyshop.commands.PointsCommand;
import com.keyshop.commands.WordGameCommand;
import com.keyshop.managers.ConfigManager;
import com.keyshop.managers.KeyShopManager;
import com.keyshop.managers.PointsManager;
import com.keyshop.managers.WordGameManager;
import com.keyshop.placeholders.PointsPlaceholder;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class KeyShopPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private PointsManager pointsManager;
    private KeyShopManager keyShopManager;
    private WordGameManager wordGameManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.pointsManager = new PointsManager(this);
        this.keyShopManager = new KeyShopManager(this);
        this.wordGameManager = new WordGameManager(this);

        registerCommands();
        registerPlaceholders();

        wordGameManager.start();

        getLogger().info("KeyShopPlugin has been enabled!");
    }

    @Override
    public void onDisable() {
        if (wordGameManager != null) {
            wordGameManager.stop();
        }
        if (pointsManager != null) {
            pointsManager.saveData();
        }
        getLogger().info("KeyShopPlugin has been disabled!");
    }

    private void registerCommands() {
        getCommand("points").setExecutor(new PointsCommand(this));
        getCommand("keyshop").setExecutor(new KeyShopCommand(this));
        getCommand("wordgame").setExecutor(new WordGameCommand(this));
        getCommand("keyshopbuy").setExecutor(new KeyShopBuyCommand(this));
    }

    private void registerPlaceholders() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new PointsPlaceholder(this).register();
            getLogger().info("PlaceholderAPI hooked!");
        }
    }

    public void reload() {
        configManager = new ConfigManager(this);
        pointsManager.loadData();
        wordGameManager.stop();
        wordGameManager = new WordGameManager(this);
        wordGameManager.start();
    }
}