NoxuWT
📎 1 file 3,154 chars
📄
pasted-code-1779546959694.txt
txt 138 lines
▶
# plugin.yml
name: Grade
version: 1.1.0
api-version: 1.16


commands: # command du plugin
  grades: (Ouvre le INVENTORY GUI des grades)
   aliases: [grade]
  grades info: (Affiche le grade d'un joueur)
  grades list: (Liste tous les grades disponibles)
  grades prestige: (Montre le niveau ou progression du joueur)
  grades admin set: (Attribuer un grade à un joueur)
  grades admin remove: (Retirer le grade d'un joueur)
  grades admin add: (Ajouter un grade à un joueur)
  grades admin list: (Lister les grades d'un joueur ou tous les grades)
  grades admin INVENTORY GUI: (Ouvrir le INVENTORY GUI de gestion du grade pour un joueur)
  grades admin create: (Créer un nouveau grade)
  grades admin delete: (Supprimer un grade existant)
  grades admin edit: (Modifier un grade : name , lore, permissions, etc.)
  grades admin reload: (Recharger le plugin)
  grades admin reset: (Réinitialiser les grades d'un joueur)


# config.yml
settings:
  debug: false
  auto-save: true
  save-interval: 300 # secondes

INVENTORY GUI:
  title: "&8» &bGrades"
  size: 54

  pattern:
    - "# # # # # # # # #"
    - "# 1 # 2 # 3 # 4 #"
    - "# # 5 # 6 # 7 # #"
    - "# 8 # 9 # 0 # ! #"
    - "# # # # # # # # #"
    - "# # # # # # # # #"

  items:
    locked:
      material: BARRIER
      name: "&cVerrouillé"
      lore:
        - "&7Vous ne remplissez pas les conditions"

    unlocked:
      material: LIME_STAINED_GLASS_PANE
      name: "&aDisponible"
      lore:
        - "&7Clique pour obtenir ce grade"

    current:
      material: NETHER_STAR
      name: "&eVotre grade actuel"
      lore:
        - "&7Vous possédez déjà ce grade"

economy:
  enabled: true
  currency: "$"

progression:
  order: ["1", "2", "3"] # IMPORTANT pour progression logique
  prestige-enabled: true
  max-prestige: 5
  prestige-multiplier: 1.5

grades:

  '1':
    display:
      name: "Novice"
      material: WOODEN_SWORD
      slot: 10

    lore:
      - "&7Grade de base pour tous les joueurs"
      - "&7Début de progression"

    permissions:
      - "grade.novice"

    rewards:
      commands:
        - "say {player} est maintenant Novice"

    requirements:
      money: 0
      xp: 0
      items: []

  '2':
    display:
      name: "Apprenti"
      material: STONE_SWORD
      slot: 12

    lore:
      - "&7Commence à progresser"

    permissions:
      - "grade.apprenti"

    rewards:
      commands:
        - "give {player} iron_ingot 5"

    requirements:
      money: 1000
      xp: 100
      items:
        - "IRON_INGOT:0:10"

  '3':
    display:
      name: "Expert"
      material: DIAMOND_SWORD
      slot: 14

    lore:
      - "&7Joueur expérimenté"

    permissions:
      - "grade.expert"

    rewards:
      commands:
        - "broadcast &b{player} est devenu Expert !"

    requirements:
      money: 5000
      xp: 500
      items:
        - "GOLD_INGOT:0:20"
Kodari AI
KodariMay 23 at 2:39 pm 22,664 (v2)

I’ll create a comprehensive grade progression system with GUI-based interfaces, economy integration, and prestige mechanics.

GradeSystem
A comprehensive grade progression system with GUI, economy integration, and prestige mechanics. Players advance through customizable grades by meeting requirements (money, XP, items) and receive permissions and rewards. Features gradient rank names via MiniMessage, pattern-based GUI layout, automatic progression tracking, and full admin management tools for creating, editing, and assigning grades.

I’ll create a grade progression system with GUI, economy integration, prestige mechanics, and admin management tools.


Project created successfully!

The GradeSystem plugin features:

✅ GUI-based grade system with pattern layout
✅ Economy integration (Vault) for grade costs
✅ Requirements system (money, XP, items)
✅ MiniMessage gradients for display names
✅ Prestige system with multipliers
✅ Admin commands (set, remove, add, list, reload, reset)
✅ Player commands (view, info, list, prestige)
✅ XSeries for cross-version compatibility
✅ Auto-save player data to YAML files

Players advance through grades by meeting requirements, unlocking permissions and rewards. The GUI shows locked (red), unlocked (green), and current (star) states.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
21 1,801
src/main/java/com/example/grade/Grade.java
package com.example.grade;

import com.example.grade.commands.GradesAdminCommand;
import com.example.grade.commands.GradesCommand;
import com.example.grade.config.ConfigManager;
import com.example.grade.data.PlayerDataManager;
import com.example.grade.inventory.gui.GUIListener;
import com.example.grade.inventory.gui.GUIManager;
import com.example.grade.managers.GradeManager;
import com.example.grade.managers.PrestigeManager;
import com.example.grade.managers.ProgressionManager;
import com.example.grade.utils.MessageUtil;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public class Grade extends JavaPlugin {
    private BukkitAudiences adventure;
    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private GradeManager gradeManager;
    private ProgressionManager progressionManager;
    private PrestigeManager prestigeManager;
    private GUIManager guiManager;
    private Economy economy;
    
    @Override
    public void onEnable() {
        this.adventure = BukkitAudiences.create(this);
        MessageUtil.init(this.adventure);
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.gradeManager = new GradeManager(this);
        this.progressionManager = new ProgressionManager(this);
        this.prestigeManager = new PrestigeManager(this);
        this.guiManager = new GUIManager();
        
        if (this.configManager.isEconomyEnabled()) {
            this.setupEconomy();
        }
        
        this.getCommand("grades").setExecutor(new GradesCommand(this));
        this.getCommand("gradesadmin").setExecutor(new GradesAdminCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
        
        this.getLogger().info("Grade plugin enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.adventure != null) {
            this.adventure.close();
        }
        
        this.getLogger().info("Grade plugin disabled!");
    }
    
    private void setupEconomy() {
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            this.getLogger().warning("Vault not found! Economy features will be disabled.");
            return;
        }
        
        RegisteredServiceProvider<Economy> rsp = this.getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            this.getLogger().warning("No economy provider found! Economy features will be disabled.");
            return;
        }
        
        this.economy = rsp.getProvider();
        this.getLogger().info("Economy system hooked successfully!");
    }
    
    public ConfigManager getConfigManager() {
        return this.configManager;
    }
    
    public PlayerDataManager getPlayerDataManager() {
        return this.playerDataManager;
    }
    
    public GradeManager getGradeManager() {
        return this.gradeManager;
    }
    
    public ProgressionManager getProgressionManager() {
        return this.progressionManager;
    }
    
    public PrestigeManager getPrestigeManager() {
        return this.prestigeManager;
    }
    
    public GUIManager getGuiManager() {
        return this.guiManager;
    }
    
    public Economy getEconomy() {
        return this.economy;
    }
}