jeff bezos

make a command with /sell that opens a gui that when you place items in they sell and give the money to the players balance make the prices higher by how rare they are

Kodari AI
KodariOct 24 at 10:51 am 1
SellGUI
A Minecraft plugin featuring a /sell command that opens a GUI-based selling interface. Players place items into the inventory slots and the plugin automatically calculates their value based on item rarity, sells them, and deposits the earnings directly into the player's balance. The GUI framework handles click events, prevents item removal, and provides instant feedback on transaction completion. Rarer items yield higher prices, encouraging exploration and collection of valuable resources.
  1. Create the Paper plugin entry point and /sell command, requiring a Vault economy provider.

  2. Add a deposit GUI with rarity-based prices; items sell when the player clicks Sell or closes the menu.

Created /sell with a deposit GUI. Items are sold when the player clicks Sell Items or closes the menu; failed sales return the items. Prices scale by rarity: common $1, uncommon $8, rare $75, and epic $500 per item.

The plugin requires Vault and an economy provider.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 317
src/main/java/com/kodari/raresell/RareSellPlugin.java
package com.kodari.raresell;

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

public class RareSellPlugin extends JavaPlugin {
    private Economy economy;

    @Override
    public void onEnable() {
        RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
        if (registration == null || registration.getProvider() == null) {
            getLogger().severe("No Vault economy provider found; disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        economy = registration.getProvider();
        getCommand("sell").setExecutor(new SellCommand(economy));
        getServer().getPluginManager().registerEvents(new SellListener(), this);
    }
}