notraincy
📎 1 file 1,599 chars
📄
pasted-code-1771887005433.txt
txt 59 lines
▶
Create a Minecraft Paper 1.20+ plugin named "GlitchSMP".

The plugin must work like Glitch SMP Season 2 where players unlock special glitch powers after completing specific advancements.

Core Requirements:

1. When a player completes certain advancements, they automatically unlock a glitch ability.

Example Advancement -> Glitch Mapping:
- story/mine_diamond -> Strength Glitch
- nether/root -> Fire Resistance Glitch
- end/kill_dragon -> Dragon Power Glitch
- story/enchant_item -> Speed Glitch

2. Each glitch must:
- Be stored per player
- Be saved even after server restart
- Have a cooldown system
- Send a message when unlocked
- Send a message when used
- Show cooldown message if used too early

3. Add a command system:

/glitch give  
/glitch remove  
/glitch list
/glitch use

4. Add a INVENTORY GUI menu:
- /glitch menu
- Shows unlocked glitches
- Click to activate

5. Use:
- PlayerAdvancementDoneEvent
- PersistentDataContainer for saving
- HashMap for cooldown tracking
- Config.yml for glitch settings
- Sounds and particle effects when using powers

6. Add at least 4 example glitches:
- Strength Boost (10 seconds)
- Fire Resistance (15 seconds)
- Double Jump ability
- Lightning Strike ability (right click with stick)

7. Clean project structure:
- Main class
- Command class
- GlitchManager class
- CooldownManager class
- Listener class

8. Include plugin.yml and config.yml.

Generate complete working Java code for all classes.
Use good comments.
Make it optimized and professional.
Kodari AI
KodariFeb 23 at 10:52 pm 21,865 (v2)

I’ll create a complete GlitchSMP plugin with advancement-based power unlocking, GUI menu system, and persistent storage.

GlitchSMP
A comprehensive advancement-based power system where players unlock special glitch abilities by completing Minecraft advancements. Features include persistent storage, cooldown management, interactive GUI menu, and multiple unique glitch powers like strength boost, fire resistance, double jump, and lightning strike with visual effects.

Now I’ll create the complete plugin structure.

Complete GlitchSMP plugin created with advancement-triggered glitch powers, persistent storage, GUI menu system, cooldown management, and visual effects using XSeries for cross-version compatibility.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 1,199
src/main/java/com/glitchsmp/GlitchSMP.java
package com.glitchsmp;

import com.glitchsmp.command.GlitchCommand;
import com.glitchsmp.cooldown.CooldownManager;
import com.glitchsmp.glitch.GlitchManager;
import com.glitchsmp.inventory.gui.GUIListener;
import com.glitchsmp.inventory.gui.GUIManager;
import com.glitchsmp.listener.GlitchListener;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class GlitchSMP extends JavaPlugin {
    private GlitchManager glitchManager;
    private CooldownManager cooldownManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cooldownManager = new CooldownManager();
        this.glitchManager = new GlitchManager(this);
        this.guiManager = new GUIManager();
        
        GlitchCommand glitchCommand = new GlitchCommand(this);
        getCommand("glitch").setExecutor(glitchCommand);
        getCommand("glitch").setTabCompleter(glitchCommand);
        
        Bukkit.getPluginManager().registerEvents(new GlitchListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getLogger().info("GlitchSMP has been enabled!");
        getLogger().info("Version 1.0.0 - Advancement-based power system loaded");
    }
    
    @Override
    public void onDisable() {
        Bukkit.getOnlinePlayers().forEach(player -> {
            glitchManager.savePlayerData(player);
        });
        
        getLogger().info("GlitchSMP has been disabled!");
    }
}