mrvuuu_

make /shop sell items that i want

Kodari AI
KodariMay 19 at 10:11 pm 4,836 (v2)

I’ll create a simple shop plugin that allows players to sell items from their inventory.

SellShop
A lightweight economy plugin that enables players to sell items from their inventory for money. Features the /shop sell command to sell items in hand or all sellable items at once. Prices are fully configurable per item type. Integrates with Vault for economy support and includes customizable messages. Perfect for survival servers needing a simple item-selling system without complex GUI interfaces.

Done! Created SellShop - a simple plugin where players use /shop sell hand to sell the item they’re holding, or /shop sell all to sell all sellable items in their inventory. Prices are fully configurable in config.yml, and it integrates with Vault for economy support.

mrvuuu_

it dont let me paste in modrinth

Kodari AI
KodariMay 19 at 10:12 pm 1,299 (v2)

I need more details to help you. Can you clarify:

  1. What are you trying to paste? (Code? Configuration? A file?)

  2. Where on Modrinth are you trying to paste it? (Project description? Version changelog? Somewhere else?)

  3. What error or issue are you seeing? (Does it say the text is too long? Invalid format? Something else?)

Or if you’re trying to do something different with the plugin, let me know what you’d like changed!

mrvuuu_
1 image attached
Kodari AI
KodariMay 19 at 10:13 pm 1,759 (v2)

Ah, I see the issue! Modrinth expects a compiled JAR file, not source code or text.

To upload your plugin to Modrinth, you need to:

  1. Build the plugin JAR file using Gradle:

    • Open a terminal in your project directory

    • Run: ./gradlew build (or gradlew.bat build on Windows)

    • Find the compiled JAR in build/libs/SellShop-1.0.jar

  2. Upload the JAR to Modrinth:

    • Go to your Modrinth project page

    • Click “Upload a version”

    • Select the JAR file from build/libs/

    • Fill in version details, changelog, etc.

    • Submit

You cannot paste source code directly into Modrinth - it only accepts compiled JAR files.


If you’re trying to do something else (like share source code on GitHub, or paste configuration into a description field), let me know and I can help with that instead!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
7 358
src/main/java/com/sellshop/SellShop.java
package com.sellshop;

import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public class SellShop extends JavaPlugin {

    private Economy economy;
    private ConfigManager configManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        
        if (!setupEconomy()) {
            getLogger().severe("Vault not found! Disabling plugin.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        
        getCommand("shop").setExecutor(new SellCommand(this));
        
        getLogger().info("SellShop has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("SellShop has been disabled!");
    }

    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        economy = rsp.getProvider();
        return economy != null;
    }

    public Economy getEconomy() {
        return economy;
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }
}