cuwai.
📎 1 file 3,502 chars
📄
pasted-code-1781679598846.txt
txt 18 lines
▶
Tạo cho tôi 1 plugin tên CelestialSMP có các chức năng về
- Chúng ta sẽ có các cung hoàng đạo tương ứng với các chòm sao, trong ngoặc là chòm sao:  Bạch Dương (Aries), Kim Ngưu (Taurus), Song Tử (Gemini), Cự Giải (Cancer), Sư Tử (Leo), Xử Nữ (Virgo), Thiên Bình (Libra), Bọ Cạp (Scorpio), Nhân Mã (Sagittarius), Ma Kết (Capricorn), Bảo Bình (Aquarius), Song Ngư (Pisces)
- Các cung hoàng đạo sẽ chia ra thành 3 cấp bậc yếu:3 cung hoàng đạo, trung bình:7 cung hoàng đạo và mạnh: 2 cung hoàng đạo
- Khi người chơi lần đầu vào server sẽ tự động mở 1 INVENTORY GUI sau khi /login hay /register xong hoặc sử dụng lệnh /zodiacsign(nếu bạn có cung hoàng đạo rồi thì sẽ không sử dụng được nữa) nó sẽ mở ra cho bạn để bạn chọn 1 cung hoàng đạo nhưng trong đó chỉ có 3 cung hoàng đạo yếu nhất
- Thiết kế riêng cho các cung hoàng đạo là custom skill khi dùng skill bạn sẽ ấn nút shift
- Chúng ta sẽ có các chu kì của chòm sao, 3 ngày sẽ là chu kì của 1 chòm sao, khi đến chòm sao nào tương ứng với cung hoàng đạo thì skill của cung hoàng đạo đó sẽ được buff 50% sức mạnh và nếu không ở trong chu kì thì chỉ buff 10% sức mạnh thôi
- Khi đến chu kì của chòm sao nào server sẽ tự thông báo cho toàn bộ người chơi "3 ngày này là chu kì của chòm sao nào và tương ứng với cung hoàng đạo nào"
- Sẽ có lệnh /list để xem toàn bộ thông tin của cung hoàng đạo, sức mạnh và sức mạnh khi đến chu kì
- lệnh /stock để xem các cung hoàng đạo đang bán sẽ có 12 cung hoàng đạo ở đó nhưng chỉ có 2 cung hoàng đạo được bán và cung hoàng đạo càng mạnh thì tỉ lệ stock càng thấp và 30p restock 1 lần (có thể chỉnh trong config.yml) và giá của cung hoàng đạo càng mạnh thì số tiền càng đắt thấp nhất là 5m cao nhất là 30m
- lệnh cho admin /setzodiacsign   để set cung hoàng đạo nếu cung hoàng đạo là None thì sẽ là xoá cung hoàng đạo họ đang sở hữu
- hãy dùng bảng này để set tên lore lời nói cho toàn bộ plugin: "ᴀʙᴄᴅᴇꜰɢʜɪᴊᴋʟᴍɴᴏᴘQʀꜱᴛᴜᴠᴡxʏᴢ", Hãy thiết kế các INVENTORY GUI sao cho gọn gàng và thật đẹp sao cho server chuyên nghiệp
- Thêm 1 hệ thống placeholderAPI để hiện số ngày để đến 1 chu kì tiếp theo: %day% và một PAPI để hiện tên của cung hoàng đạo của ban %zodiac%
- chỉ cần ghi lệnh /day hoặc /night 3 lần là đến 1 chu kì tiếp theo đỡ phải đợi để owner test xem có hoạt động không
- 1 hệ thống casino để người chơi giải trí dùng lệnh /casino để mở INVENTORY INVENTORY GUI (có thể tắt các chò trơi trong đó trong file config.yml) (giới hạn chỉ 1m$ để cược lớn hơn không thể cược thêm)
+ Trò 1 là trò red/blue khi ấn vào sẽ hiện ra 1 INVENTORY INVENTORY GUI chọn Red hoặc Blue và ở giữa hiện thời gian (120s) bạn sẽ chọn 1 màu và cược vào đó nếu bạn chọn đúng màu red hay blue bạn sẽ nhận được x2 tiền và dưới lore của 2 nút đó có hiện cả tổng số tiền mà tất cả mọi người cược và sau 120s sẽ reset và hiện thông báo cho toàn server là Red hay Blue thắng (Khi bạn ấn vào red hay blue nó sẽ chuyển sang chế độ chat để bạn chat số tiền muốn cược) 
+ Trò 2 là trò roulette bạn sẽ cược tiền và nó sẽ dần dần x1 x1,25 ... lên nếu càng lâu thì tỉ lệ boom càng cao và cược càng nhiều tiền cũng vậy bạn sẽ ấn vào mức nào như x1.25 thì tiền bạn sẽ x1.25 và bạn cũng sẽ ấn vào nút trò chơi đó và sẽ chuyển sang chat để ghi số tiền muốn cược và xong nó sẽ hiện INVENTORY INVENTORY GUI như bên trên tôi đã miêu tả 
( TẤT CẢ TRÒ CHƠI CASINO SẼ TÍNH THUẾ 0.5%) (tất cả thông số có thể chỉnh trong config.yml) (TẤT CẢ CÁC INVENTORY INVENTORY GUI LÀM THẬT HIỆN ĐẠI VÀ THẬT ĐẸP) 
Plugin làm bằng tiếng anh
Kodari AI
KodariJun 17 at 7:08 am 58

I’ll create a comprehensive zodiac-based SMP plugin with casino mini-games.

CelestialSMP
An advanced zodiac system plugin featuring 12 zodiac signs with unique skills, 3-day celestial cycles that buff powers, a dynamic stock market for purchasing zodiacs, and an integrated casino with Red/Blue betting and Roulette games. Includes PlaceholderAPI support, economy integration via Vault, and professional GUI interfaces for all interactions.

I’ll continue with the inventory GUI framework and implementations in the next response.

cuwai.

The compilation failed with this error:

code
Compilation failed with 8 error(s):

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 6: package com.celestialsmp.inventory.INVENTORY GUI does not exist
import com.celestialsmp.inventory.INVENTORY GUI.GUIListener;
                                     ^

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 7: package com.celestialsmp.inventory.INVENTORY GUI does not exist
import com.celestialsmp.inventory.INVENTORY GUI.GUIManager;
                                     ^

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 8: package com.celestialsmp.listeners does not exist
import com.celestialsmp.listeners.PlayerJoinListener;
                                 ^

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 9: package com.celestialsmp.listeners does not exist
import com.celestialsmp.listeners.SkillListener;
                                 ^

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 14: package com.celestialsmp.placeholders does not exist
import com.celestialsmp.placeholders.CelestialPlaceholders;
                                    ^

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 27: cannot find symbol
    private GUIManager guiManager;
            ^
  symbol: class GUIManager
  location: class CelestialSMP

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 27: cannot find symbol
    private GUIManager guiManager;
                       ^
  symbol: class GUIManager
  location: class CelestialSMP

ERROR in src/main/java/com/celestialsmp/CelestialSMP.java at line 3: package com.celestialsmp.commands does not exist
import com.celestialsmp.commands.*;
                       ^


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - GUIManager
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/celestialsmp/CelestialSMP.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJun 17 at 7:39 am 259

I’ll create all the missing components systematically.

Now I’ll create the utility classes, listeners, and commands:

Now the commands:

Finally, the PlaceholderAPI expansion:

The comprehensive CelestialSMP plugin is now complete with:

✦ Core Features:

  • 12 zodiac signs (3 weak, 7 medium, 2 strong tiers)

  • Custom skill system activated by shift/sneak

  • 3-day celestial cycles with 50% power boost (10% normal)

  • Auto-opening zodiac selection GUI for new players

  • PlaceholderAPI support: %celestial_day% and %celestial_zodiac%

✦ Commands:

  • /zodiacsign - Choose initial zodiac (weak tier only)

  • /list - View all zodiacs with stats

  • /stock - Browse and purchase zodiacs

  • /setzodiacsign <player> <zodiac|None> - Admin command

  • /casino - Open casino menu

  • /day & /night - Admin testing (3 uses = next cycle)

✦ Casino Games:

  • Red/Blue - 120s betting rounds, 2x payout, 0.5% tax

  • Roulette - Variable multipliers (1.25x-10x), 0.5% tax

  • Max bet: $1,000,000

  • All games configurable in config.yml

✦ Professional GUIs:

  • Custom inventory framework with button system

  • Small caps font styling throughout

  • Color-coded tiers and clean layouts

  • Dynamic stock system with 30min restock timer

All systems use Vault for economy, XSeries for cross-version compatibility, and Lombok for cleaner code!

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
38 2,108
src/main/java/com/celestialsmp/CelestialSMP.java
package com.celestialsmp;

import com.celestialsmp.commands.*;
import com.celestialsmp.data.DataManager;
import com.celestialsmp.economy.EconomyManager;
import com.celestialsmp.inventory.gui.GUIListener;
import com.celestialsmp.inventory.gui.GUIManager;
import com.celestialsmp.listeners.PlayerJoinListener;
import com.celestialsmp.listeners.SkillListener;
import com.celestialsmp.managers.CasinoManager;
import com.celestialsmp.managers.CycleManager;
import com.celestialsmp.managers.StockManager;
import com.celestialsmp.managers.ZodiacManager;
import com.celestialsmp.placeholders.CelestialPlaceholders;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CelestialSMP extends JavaPlugin {
    
    private DataManager dataManager;
    private ZodiacManager zodiacManager;
    private CycleManager cycleManager;
    private StockManager stockManager;
    private CasinoManager casinoManager;
    private GUIManager guiManager;
    private EconomyManager economyManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.dataManager = new DataManager(this);
        this.zodiacManager = new ZodiacManager(this);
        this.cycleManager = new CycleManager(this);
        this.stockManager = new StockManager(this);
        this.economyManager = new EconomyManager(this);
        this.casinoManager = new CasinoManager(this);
        this.guiManager = new GUIManager();
        
        registerCommands();
        registerListeners();
        
        cycleManager.startCycleTask();
        stockManager.startRestockTask();
        casinoManager.startRedBlueTasks();
        
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new CelestialPlaceholders(this).register();
            getLogger().info("PlaceholderAPI hooked successfully!");
        }
        
        getLogger().info("CelestialSMP has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (dataManager != null) {
            dataManager.saveData();
        }
        cycleManager.saveCycleData();
        getLogger().info("CelestialSMP has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("zodiacsign").setExecutor(new ZodiacSignCommand(this));
        getCommand("list").setExecutor(new ListCommand(this));
        getCommand("stock").setExecutor(new StockCommand(this));
        getCommand("setzodiacsign").setExecutor(new SetZodiacSignCommand(this));
        getCommand("casino").setExecutor(new CasinoCommand(this));
        
        DayNightCommand dayNightCommand = new DayNightCommand(this);
        getCommand("day").setExecutor(dayNightCommand);
        getCommand("night").setExecutor(dayNightCommand);
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new SkillListener(this), this);
    }
}