P

stworz mi plugina do minecraft o tym że mozesz miec wlasna sodastream i jego buteleczki smakow soda stream i buteleczki smaku kupujesz za babelki sodastream moze sie zuzywac i buteleczki tez zeby zrobic wode gazowana z sodastream potrzeba buteleczki kotra mozna skraftowac z ulozonego na kwadrat bialego szkla a puste miejsca wypelnione xuan nowym materialem przypominaljacy diament tylko jest czerwony i przypomina rubin a potem trzeba nalac wody dac do sodastream zrobic i masz wode gazowana a potem w craftingu lczysz wode z buteleczka i masz wode gazowana o samaku buteleczki smakow tworzy sie z caly wypleniasz kwadrat szklem a reszte wypelniasz albo nowym materialem sprite albo nowym materialem cola albo nowym materialem ice tea albo nowym materialem mint to sa smaki reszte sam wymysl dodaj INVENTORY GUI bąbelkow pod komenda /babelki i kupujesz sodastream za 1000 bąbelkow pod komenda /buying sodastream a gotowe butleleczki pod /buying buteleczki smak i bąbelki mozna zarabiac za czas w grze oraz wyzwania sam wymysl reszte

Kodari AI
KodariMay 2 at 12:09 pm 20,673 (v2)

I’ll create a SodaStream beverage crafting plugin with custom materials, GUI shop, and bubble currency system.

SodaStreamPlugin
A unique beverage crafting system featuring SodaStream machines and flavor bottles. Players earn bubbles (bąbelki) through playtime and challenges to purchase equipment. Craft sparkling water using custom materials like Xuan rubies, then combine with flavors (Sprite, Cola, Ice Tea, Mint). Features GUI shop, custom recipes, durability system, automatic playtime rewards, and achievement-based challenges for earning currency.

Planning

Core Systems:

  1. Custom items: SodaStream machine, flavor bottles, Xuan ruby, flavor materials

  2. Bubble currency with playtime rewards (1 bubble/minute) and challenges

  3. Custom crafting: empty bottles (glass + Xuan), flavor bottles (glass + flavor materials)

  4. GUI shop for purchasing with commands /babelki and /buying

  5. Durability tracking for SodaStream and flavor bottles

  6. Challenge system (mining, mob kills, playtime milestones)

File Structure:

  • Main plugin class with managers

  • Currency system (BubbleManager, PlaytimeTracker)

  • Custom item system (CustomItemManager, ItemType enum)

  • Crafting system (RecipeManager, CraftingListener)

  • Durability system

  • Challenge system (Challenge types, manager, listener)

  • Commands (BabelkiCommand, BuyingCommand)

  • Inventory GUI framework + ShopGUI implementation

  • Player data storage

Perfect! I’ve created a complete SodaStream plugin for Minecraft with all requested features:

🎮 What I Built:

Core Features:

  • Custom bubble currency system (bąbelki) with automatic playtime rewards

  • SodaStream machine - 100 uses, creates sparkling water from water bottles

  • 5 custom materials: Xuan ruby (red), Sprite, Cola, Ice Tea, Mint essences

  • Flavor bottles - 50 uses each (Sprite, Cola, Ice Tea, Mint)

  • Multiple beverages: Sparkling water + 4 flavored variants

Crafting System:

  • Empty Bottle: White glass border + Xuan ruby in center

  • Flavor Bottles: Glass border + flavor essence in center

Usage:

  1. Right-click SodaStream with water bottle → Sparkling Water

  2. Right-click Sparkling Water with flavor bottle → Flavored Soda

Economy:

  • /babelki - Opens GUI shop with all items

  • /buying sodastream - Purchase SodaStream (1000 bubbles)

  • /buying buteleczki <flavor> - Purchase flavor bottles (250 bubbles)

Earning Bubbles:

  • Playtime: 1 bubble per minute

  • Challenges:

    • Mine 100 blocks → 50 bubbles

    • Kill 50 mobs → 100 bubbles

    • Play 1 hour → 500 bubbles

    • Craft 50 items → 75 bubbles

    • Walk 1000 blocks → 25 bubbles

Advanced Systems:

  • Full durability tracking with visual lore updates

  • Persistent data storage (bubbles, playtime, challenge progress)

  • Complete GUI framework with clickable buttons

  • Challenge completion notifications

  • All strings configurable in config.yml

The plugin includes Polish-friendly commands and uses XSeries for cross-version compatibility (1.8-1.21+).

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
23 1,411
src/main/java/com/example/sodastream/SodaStreamPlugin.java
package com.example.sodastream;

import com.example.sodastream.challenges.ChallengeListener;
import com.example.sodastream.challenges.ChallengeManager;
import com.example.sodastream.commands.BabelkiCommand;
import com.example.sodastream.commands.BuyingCommand;
import com.example.sodastream.crafting.CraftingListener;
import com.example.sodastream.crafting.RecipeManager;
import com.example.sodastream.currency.BubbleManager;
import com.example.sodastream.currency.PlaytimeTracker;
import com.example.sodastream.data.PlayerData;
import com.example.sodastream.durability.DurabilityManager;
import com.example.sodastream.inventory.gui.GUIListener;
import com.example.sodastream.inventory.gui.GUIManager;
import com.example.sodastream.items.CustomItemManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class SodaStreamPlugin extends JavaPlugin {
    
    @Getter private static SodaStreamPlugin instance;
    
    @Getter private CustomItemManager customItemManager;
    @Getter private BubbleManager bubbleManager;
    @Getter private PlaytimeTracker playtimeTracker;
    @Getter private RecipeManager recipeManager;
    @Getter private DurabilityManager durabilityManager;
    @Getter private ChallengeManager challengeManager;
    @Getter private GUIManager guiManager;
    
    private File dataFile;
    private FileConfiguration dataConfig;
    private Map<UUID, PlayerData> playerDataMap = new HashMap<>();
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        loadDataFile();
        
        customItemManager = new CustomItemManager(this);
        bubbleManager = new BubbleManager(this);
        playtimeTracker = new PlaytimeTracker(this);
        recipeManager = new RecipeManager(this);
        durabilityManager = new DurabilityManager(this);
        challengeManager = new ChallengeManager(this);
        guiManager = new GUIManager();
        
        recipeManager.registerRecipes();
        
        Bukkit.getPluginManager().registerEvents(new CraftingListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ChallengeListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("babelki").setExecutor(new BabelkiCommand(this));
        getCommand("buying").setExecutor(new BuyingCommand(this));
        
        playtimeTracker.startTracking();
        
        getLogger().info("SodaStreamPlugin enabled successfully!");
    }
    
    @Override
    public void onDisable() {
        playtimeTracker.stopTracking();
        saveData();
        getLogger().info("SodaStreamPlugin disabled successfully!");
    }
    
    private void loadDataFile() {
        dataFile = new File(getDataFolder(), "data.yml");
        if (!dataFile.exists()) {
            try {
                dataFile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        dataConfig = YamlConfiguration.loadConfiguration(dataFile);
        
        if (dataConfig.contains("players")) {
            for (String uuidString : dataConfig.getConfigurationSection("players").getKeys(false)) {
                UUID uuid = UUID.fromString(uuidString);
                PlayerData data = new PlayerData();
                data.setBubbles(dataConfig.getInt("players." + uuidString + ".bubbles", 0));
                data.setPlaytimeMinutes(dataConfig.getInt("players." + uuidString + ".playtime", 0));
                
                if (dataConfig.contains("players." + uuidString + ".challenges")) {
                    for (String challenge : dataConfig.getConfigurationSection("players." + uuidString + ".challenges").getKeys(false)) {
                        data.getChallengeProgress().put(challenge, dataConfig.getInt("players." + uuidString + ".challenges." + challenge, 0));
                    }
                }
                
                if (dataConfig.contains("players." + uuidString + ".completed")) {
                    data.getCompletedChallenges().addAll(dataConfig.getStringList("players." + uuidString + ".completed"));
                }
                
                playerDataMap.put(uuid, data);
            }
        }
    }
    
    public void saveData() {
        playerDataMap.forEach((uuid, data) -> {
            dataConfig.set("players." + uuid.toString() + ".bubbles", data.getBubbles());
            dataConfig.set("players." + uuid.toString() + ".playtime", data.getPlaytimeMinutes());
            
            data.getChallengeProgress().forEach((challenge, progress) -> {
                dataConfig.set("players." + uuid.toString() + ".challenges." + challenge, progress);
            });
            
            dataConfig.set("players." + uuid.toString() + ".completed", data.getCompletedChallenges().stream().toList());
        });
        
        try {
            dataConfig.save(dataFile);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    
    public PlayerData getPlayerData(UUID uuid) {
        return playerDataMap.computeIfAbsent(uuid, k -> new PlayerData());
    }
    
    public String getMessage(String path) {
        String prefix = getConfig().getString("messages.prefix", "&8[&bSodaStream&8] &r");
        String message = getConfig().getString("messages." + path, path);
        return colorize(prefix + message);
    }
    
    public String getMessage(String path, String... replacements) {
        String message = getMessage(path);
        for (int i = 0; i < replacements.length; i += 2) {
            if (i + 1 < replacements.length) {
                message = message.replace("{" + replacements[i] + "}", replacements[i + 1]);
            }
        }
        return message;
    }
    
    public String colorize(String text) {
        return text.replace("&", "§");
    }
}