sleepyroyt

Compilation failed with 33 error(s):

ERROR in src/main/java/com/sleepymc/sleepysell/multiplier/ItemCategory.java at line 17: variable ORES is already defined in enum ItemCategory private static final Set<Material> ORES = EnumSet.of( ^

fix the error

sleepyroyt

Compilation failed with 33 error(s):

ERROR in src/main/java/com/sleepymc/sleepysell/multiplier/ItemCategory.java at line 17: variable ORES is already defined in enum ItemCategory private static final Set<Material> ORES = EnumSet.of( ^

fix the error

sleepyroyt

create me a plugin named sleepysell which has in minecraft small font at the top like ѕʟᴇᴇᴘʏᴍᴄ that in gray which says place items here to sell make it exactly like donutsmp sell yous hould be able to sell any items make the plugin have a custom economy OF EVERY SINGLE ITEM IN THE GAME make the plugin 1.21+ anything compatible for both paper and purpur it should have /sell sell anything in the game make a custom economy which makes sense like diamonds 200 netherite scrap 150 and netherite 350 like that but make custom prices for eveyr single item in the game of minecraft 1.21.11 and it should all generated inside the folder in afile named prices with every single item in minecraft inside of it its sell price and make sure in my inventory whenever i hover over an item it says Worth: in green the money its worth if i sold it in /sell i cant move items when im in the sellgui and make sure it has the font i gaave earlier i want to sell the items when i tryed placing items inside it didnt work and i cant sell anything please fix it and use the correct font make it so that i can sell stuff in shulker and use the exact same proices for everything as the donutsmp make the font for the /sell all of it to minecraft small font not just sleepymc so it looks clean all of it should look clean make sure it has sellhistory and everything donutsmp sell plugin has the worth should also be in minecraft small font fix all of it stuff inside shulker should also count during selling add that to it

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
20 2,208
src/main/java/com/sleepymc/sleepysell/SleepySell.java
package com.sleepymc.sleepysell;

import com.sleepymc.sleepysell.commands.SellCommand;
import com.sleepymc.sleepysell.commands.SellHistoryCommand;
import com.sleepymc.sleepysell.economy.PriceManager;
import com.sleepymc.sleepysell.history.HistoryManager;
import com.sleepymc.sleepysell.inventory.gui.GUIListener;
import com.sleepymc.sleepysell.inventory.gui.GUIManager;
import com.sleepymc.sleepysell.listeners.ItemLoreListener;
import com.sleepymc.sleepysell.multiplier.MultiplierManager;
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 SleepySell extends JavaPlugin {
    private PriceManager priceManager;
    private GUIManager guiManager;
    private HistoryManager historyManager;
    private MultiplierManager multiplierManager;
    private Economy economy;

    @Override
    public void onEnable() {
        if (!setupEconomy()) {
            getLogger().severe("Vault not found! Disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        this.priceManager = new PriceManager(this);
        this.priceManager.loadPrices();

        this.guiManager = new GUIManager();
        this.historyManager = new HistoryManager(this);
        this.multiplierManager = new MultiplierManager(this);

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new ItemLoreListener(this), this);

        getCommand("sell").setExecutor(new SellCommand(this));
        getCommand("sellhistory").setExecutor(new SellHistoryCommand(this));

        getLogger().info("SleepySell has been enabled!");
    }

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

    private boolean setupEconomy() {
        if (Bukkit.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;
    }
}