sebbe_pl

make me a shop plugin PER WORLD that with use of multiverse will let me create different stores depending on world im in, so that i can make different store in every world, but make it easy to change prices add items and such make all possible in INVENTORY GUI also make it coop with multiverse and vault

sebbe_pl

make me a shop plugin PER WORLD that with use of multiverse will let me create different stores depending on world im in, so that i can make different store in every world, but make it easy to change prices add items and such make all possible in INVENTORY INVENTORY GUI also make it coop with multiverse and vault also add vault per world so that money you have for example on skyblock you dont have it on one block also add holograms with leaderboards per world like kills time played money and more but make it so that you just use lets say /holo moneyleaderboard/kills/blocksmined/playtime and then name the hologram and it spawn a full working hologram with prefixes and such

Kodari AI
KodariFeb 9 at 11:33 am 19,563 (v2)

I’ll create a comprehensive per-world shop plugin with economy, statistics, and holographic leaderboards.

WorldStores
A complete per-world shop and economy system with Multiverse integration. Each world maintains separate shops, economy balances, and player statistics. Features GUI-based shop management for admins, per-world Vault economy integration, automatic statistics tracking for kills, playtime, money, and blocks mined, plus holographic leaderboards that update in real-time. Admins can easily configure shops through interactive menus and spawn leaderboard holograms with simple commands.
WorldStores
A complete per-world shop and economy system with Multiverse integration. Each world maintains separate shops, economy balances, and player statistics. Features GUI-based shop management for admins, per-world Vault economy integration, automatic statistics tracking for kills, playtime, money, and blocks mined, plus holographic leaderboards that update in real-time. Admins can easily configure shops through interactive menus and spawn leaderboard holograms with simple commands.

Complete per-world shop system created! Features:

Shop System:

  • Per-world shops with GUI browsing (/shop)

  • Admin GUI for managing items (/shop admin)

  • Add items from hand, set prices via chat prompts

  • Items display with prices and click to buy

Economy:

  • Per-world money (balance on skyblock ≠ oneblock)

  • Auto-saves every 5 minutes

  • Integrated with shops

Statistics Tracking:

  • Per-world kills, playtime, money, blocks mined

  • Auto-updates every second (playtime)

  • Tracks kills and block breaks via events

Holograms:

  • /holo moneyleaderboard MyShop - spawn money leaderboard

  • /holo kills KillBoard - spawn kills leaderboard

  • /holo blocksmined MineBoard - spawn blocks mined leaderboard

  • /holo playtime TimeBoard - spawn playtime leaderboard

  • Auto-updates every 60 seconds

  • Shows top 10 with colored rank prefixes (#1 gold, #2 silver, #3 red)

All data separated by world, integrates with Multiverse and Vault!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
22 1,259
src/main/java/com/worldstores/WorldStoresPlugin.java
package com.worldstores;

import com.worldstores.command.HologramCommand;
import com.worldstores.command.ShopCommand;
import com.worldstores.economy.EconomyManager;
import com.worldstores.hologram.HologramManager;
import com.worldstores.inventory.gui.GUIListener;
import com.worldstores.inventory.gui.GUIManager;
import com.worldstores.listener.StatsListener;
import com.worldstores.shop.ShopManager;
import com.worldstores.stats.StatsManager;
import lombok.Getter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class WorldStoresPlugin extends JavaPlugin {
    
    private GUIManager guiManager;
    private ShopManager shopManager;
    private EconomyManager economyManager;
    private StatsManager statsManager;
    private HologramManager hologramManager;
    private Economy vaultEconomy;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        if (!setupVault()) {
            getLogger().severe("Vault not found! Disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        this.guiManager = new GUIManager();
        this.economyManager = new EconomyManager(this);
        this.statsManager = new StatsManager(this);
        this.shopManager = new ShopManager(this);
        this.hologramManager = new HologramManager(this);
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new StatsListener(this), this);
        
        getCommand("shop").setExecutor(new ShopCommand(this));
        getCommand("holo").setExecutor(new HologramCommand(this));
        
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            shopManager.saveShops();
            economyManager.saveBalances();
            statsManager.saveStats();
        }, 6000L, getConfig().getInt("settings.save-interval", 300) * 20L);
        
        Bukkit.getScheduler().runTaskTimer(this, 
            hologramManager::updateAllHolograms, 
            20L, 
            getConfig().getInt("settings.hologram-update-interval", 60) * 20L);
        
        getLogger().info("WorldStores enabled!");
    }
    
    @Override
    public void onDisable() {
        if (shopManager != null) shopManager.saveShops();
        if (economyManager != null) economyManager.saveBalances();
        if (statsManager != null) statsManager.saveStats();
        if (hologramManager != null) hologramManager.removeAllHolograms();
        
        getLogger().info("WorldStores disabled!");
    }
    
    private boolean setupVault() {
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        
        vaultEconomy = rsp.getProvider();
        return vaultEconomy != null;
    }
    
    public String getMessage(String key) {
        String msg = getConfig().getString("messages." + key, key);
        String prefix = getConfig().getString("messages.prefix", "&8[&bWorldStores&8]&7");
        return msg.replace("{prefix}", prefix).replace("&", "§");
    }
}