Y
  1. Remove item and remove category command not working.
  2. Lore of categories should be customisable.
  3. Add player command /sell and /sellgui which will open a INVENTORY GUI where players will be able to put items and it will be sold. Add more player command: 1./sell hand which will sell all hand items without opening INVENTORY GUI. ./sell (all/inventory) which will sell all items from inventory without opening INVENTORY GUI. Total amount player got on selling will show above hotbar and in chat to player after selling.
  4. players will be able to all prices of item by player command /worth which will open a INVENTORY GUI of 6 rows where all the item listed in five rows just like in image I gave you. And in the 6th row there will be next page and previous page button and one sorting button will be sorting by price (highest price, lowest price) and there will be one filter by category of item. In price sorter there will also be a name option which will sort by name in alphabetical order. There will be a refresh button in the middle. Items will sort on click line by line (for example, if player click price sorter as it is default set to highest price in highest price items will be shown in decreasing order as decrasing price and vice versa with lowest price. And category sorting it will be set default at all and on clicking such as it goes to blocks the worth will only show worth of blocks. Price will be able to sort on any category.). Lore, icon, material and name of every button should be customisable.
  5. We should be able to customize the category of sorting and every slot of bottom buttons. Lore, icon, material and name of every button should be customisable. There will not be any item or we cannot put any items in bottom row of every INVENTORY GUI as it is only for buttons.
  6. There will be 3 buttons in sell INVENTORY GUI in bottom row. Worth button which will open /worth command , a close button which will close the INVENTORY GUI and there will be a button which will calculate total price of items in INVENTORY GUI and show in lore. See in image paper shows the total price calculator, barrier as sell and close button and book as worth button. Lore, icon, material and name of every button should be customisable.
  7. Make different folder sell and worth
  8. We should be able to fill the bottom layer where all the buttons are.
  9. Store player data of selling. Add a player command /sellhistory which will show the sell history of player, INVENTORY GUI will have 6 rows and in bottom most row there will be price sorter like worth and a player head which will show total amount player earned earned on selling. There will be next page and previous page button. Lore, icon, material and name of every button should be customisable. See I image to get a idea of sell history. There will be a refresh button in the middle. Admission will be able to see sell history of other players also by /sellhistory <playername>
  10. I will provide images and videos to get idea of sellgui, worth, sorting and sell history to take as refrence. Title of every INVENTORY GUI should also be customisable. Don't show page no In title. Don't add page indicator system in sell worth system.
  11. Pre Configure all items of minecraft in worth with pre configured prices. We should be able to change price from item worth yml file. Don't add spawners in pre configuration.
  12. Add the following admin commands:

a. /dsw addhanditem <sellprice>  this command will add holded item in sell worth. b. /dsw removehanditem  this will remove holded item from sell worth. c. /dsw changeprice  this will open a worth INVENTORY GUI and when admin click a item open a sign board where admin will write new sell price of that item and sell price changes. d. /dsw reload e. /dsw guide which will guide about commands in chat.

  1. On using command /worth will open a INVENTORY GUI showing all items with sell prices in lore but when player uses /worth <itemname> it will show price of that item in chat. See in image for an idea.
  2. Lore, icon, material and name of every button should be customisable.
  3. Items which is not in worth means not sellable and if that item is put in sell INVENTORY GUI don't sell that item on closing inventory give that item back to player. And don't calculate price of item in sell INVENTORY GUI because it is not sellable.
  4. The above sell and worth are inbuilt features of this plugin. And also update /dshop guide about this new feature.
  5. Make every thing like commands, functions, buttons etc. Means every single thing in this plugin work properly without any errors.
  6. Optimize this plugin.
  7. Make the plugin work in any version of java and bedrock or pocket edition same as java edition supporting geysermc and floodgate.

Make everything simple, easy to understand, and customisable without any errors.

3 images attached
Kodari AI
KodariMay 23 at 6:41 pm 99,234 (v2)

I’ll help you implement this comprehensive sell/worth system. This is a large feature set, so let me start by reading the existing code to understand the current structure.

This is a massive feature addition. I’ll implement the complete sell/worth system with history tracking. Let me break this down into manageable parts and implement it systematically.

Implementation Plan:

  1. Create sell/worth managers and data structures

  2. Add player data tracking

  3. Create sell, worth, and history GUIs

  4. Add commands (/sell, /worth, /sellhistory, /dsw)

  5. Pre-configure all Minecraft items

  6. Fix existing bugs

  7. Update configurations

Let me start implementing:

Now let me create the GUI configuration files:

Now I need to create the GUI implementations. Let me create the sell GUI first:

Due to the size of this implementation, let me continue with the WorthGUI and other components in the next parts. Let me create the Worth GUI with sorting and filtering:

Now let me create the commands. First, the sell command:

Now let me create the DSW admin command. This will be very comprehensive:

Now I need to update the main plugin class to register all the new managers and commands:

Due to the massive size of this implementation, I need to create all the new manager and command files. Let me create them systematically:

Now let me create the configuration files. First, the sell GUI config:

Now let me add the worth.yml file with pre-configured Minecraft items. Due to the size, I’ll include a comprehensive set:

Now let me update plugin.yml to add the new commands:

Now let me update the ConfigManager to load the new configuration files:

Let me now create all the implementation files. Given the complexity and size, I’ll create them comprehensively:

Now let me create the comprehensive configuration files. First, let’s create sellgui.yml:

Due to the massive size of worth.yml with all Minecraft items, let me create a comprehensive version:

Now let me create the main commands. These are comprehensive implementations. First, the SellCommand:

Now let me create the WorthCommand:

Now let me create the SellHistoryCommand:

Now the DSWCommand (admin commands for worth management):

Due to the response length, I need to continue in a follow-up message with the GUI implementations. Let me now create the GUI files:

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
CHANGELOG.md
FEATURES.md
IMPLEMENTATION_SUMMARY.md
QUANTITY_PRICING_GUIDE.md
QUICK_CUSTOMIZATION_GUIDE.md
README.md
SETUP.md
SIMPLIFIED_LORE_SYSTEM.md
TECHNICAL_CHANGES.md
UPDATE_SUMMARY.md
Code
62 10,821
src/main/java/com/demonshops/DemonShops.java
package com.demonshops;

import com.demonshops.commands.*;
import com.demonshops.config.ConfigManager;
import com.demonshops.economy.EconomyManager;
import com.demonshops.inventory.gui.GUIListener;
import com.demonshops.inventory.gui.GUIManager;
import com.demonshops.manager.PlayerDataManager;
import com.demonshops.manager.ShopManager;
import com.demonshops.manager.WorthManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class DemonShops extends JavaPlugin {
    
    private ConfigManager configManager;
    private GUIManager guiManager;
    private EconomyManager economyManager;
    private ShopManager shopManager;
    private WorthManager worthManager;
    private PlayerDataManager playerDataManager;
    
    @Override
    public void onEnable() {
        getLogger().info("═══════════════════════════════════════════════════════════");
        getLogger().info("    DemonShops v" + getDescription().getVersion() + " - Loading...");
        getLogger().info("═══════════════════════════════════════════════════════════");
        
        saveDefaultConfig();
        
        configManager = new ConfigManager(this);
        configManager.loadAllConfigs();
        getLogger().info("✓ Configurations loaded successfully");
        
        economyManager = new EconomyManager(this);
        if (!economyManager.hasProvider()) {
            getLogger().warning("⚠ No economy provider found!");
            getLogger().warning("  Install Vault, CoinsEngine, or EssentialsX");
            getLogger().warning("  Shop will not function without economy!");
        } else {
            getLogger().info("✓ Economy provider: " + getConfig().getString("economy-provider", "VAULT"));
        }
        
        shopManager = new ShopManager(this);
        int categories = shopManager.getCategories().size();
        getLogger().info("✓ Loaded " + categories + " shop categories");
        
        worthManager = new WorthManager(this);
        int worthItems = worthManager.getAllWorthItems().size();
        getLogger().info("✓ Loaded " + worthItems + " worth items");
        
        playerDataManager = new PlayerDataManager(this);
        getLogger().info("✓ Player data manager initialized");
        
        guiManager = new GUIManager();
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getLogger().info("✓ GUI system initialized");
        
        getCommand("shop").setExecutor(new ShopCommand(this));
        DShopCommand dshopCmd = new DShopCommand(this);
        getCommand("dshop").setExecutor(dshopCmd);
        getCommand("dshop").setTabCompleter(dshopCmd);
        
        SellCommand sellCmd = new SellCommand(this);
        getCommand("sell").setExecutor(sellCmd);
        getCommand("sell").setTabCompleter(sellCmd);
        getCommand("sellgui").setExecutor(sellCmd);
        
        WorthCommand worthCmd = new WorthCommand(this);
        getCommand("worth").setExecutor(worthCmd);
        getCommand("worth").setTabCompleter(worthCmd);
        
        SellHistoryCommand sellHistoryCmd = new SellHistoryCommand(this);
        getCommand("sellhistory").setExecutor(sellHistoryCmd);
        getCommand("sellhistory").setTabCompleter(sellHistoryCmd);
        
        DSWCommand dswCmd = new DSWCommand(this);
        getCommand("dsw").setExecutor(dswCmd);
        getCommand("dsw").setTabCompleter(dswCmd);
        
        getLogger().info("✓ Commands registered");
        
        if (Bukkit.getPluginManager().getPlugin("floodgate") != null) {
            getLogger().info("✓ Floodgate detected - Bedrock Edition support enabled!");
        }
        if (Bukkit.getPluginManager().getPlugin("Geyser-Spigot") != null) {
            getLogger().info("✓ Geyser detected - Cross-platform support active!");
        }
        if (Bukkit.getPluginManager().getPlugin("floodgate") != null || 
            Bukkit.getPluginManager().getPlugin("Geyser-Spigot") != null) {
            getLogger().info("  → Java & Bedrock players can use the shop!");
        }
        
        getLogger().info("═══════════════════════════════════════════════════════════");
        getLogger().info("    DemonShops enabled successfully!");
        getLogger().info("    Use /dshop guide for complete documentation");
        getLogger().info("═══════════════════════════════════════════════════════════");
    }
    
    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        getLogger().info("DemonShops has been disabled!");
    }
    
    public void reload() {
        getLogger().info("Reloading DemonShops...");
        reloadConfig();
        configManager.reloadAll();
        getLogger().info("Configurations reloaded");
        shopManager.reload();
        getLogger().info("Shop data reloaded - " + shopManager.getCategories().size() + " categories loaded");
        worthManager.reload();
        getLogger().info("Worth data reloaded - " + worthManager.getAllWorthItems().size() + " items");
        getLogger().info("DemonShops reload complete!");
    }
}