Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a16f619
Create SellPlugin.java with initialization code
Faboit1 Apr 11, 2026
8c9156d
Create CategoryItemsGUI.java for displaying items with pagination sup…
Faboit1 Apr 11, 2026
e704b8f
Create ProgressBarGUI.java for showing selling progress animation
Faboit1 Apr 11, 2026
156bd5c
Update SellPlugin.java with complete initialization
Faboit1 Apr 12, 2026
05d1562
Create ProgressBarGUI.java for animated progress bar display
Faboit1 Apr 12, 2026
18fc6d8
Create SellManager.java with selling logic and action bar notifications
Faboit1 Apr 12, 2026
32c5c01
Add CategoryGUI.java with 9x5 menu layout
Faboit1 Apr 12, 2026
f254b9b
Create GUIListener.java for handling GUI interactions
Faboit1 Apr 12, 2026
c236133
Create SellAllCommand.java for /sellall command
Faboit1 Apr 12, 2026
f7cd9dd
Create ConfigManager.java
Faboit1 Apr 12, 2026
d7ed507
Updated CategoryItemsGUI.java with new implementation
Faboit1 Apr 12, 2026
23ce04d
Fix ChatColor concatenation using toString() in CategoryGUI.java
Faboit1 Apr 12, 2026
eb5a436
Refactor SellPlugin initialization and setup economy
Faboit1 Apr 12, 2026
08e0f85
Refactor inventory title creation in CategoryGUI
Faboit1 Apr 12, 2026
2e6a410
feat: full GUI overhaul - category shop, progress bar, item list, act…
Copilot Apr 12, 2026
37c22c3
fix: guard division by zero in progress bar, extract sound constant, …
Copilot Apr 12, 2026
1ea9e4c
Merge pull request #1 from Faboit1/copilot/add-gui-features-and-progr…
Faboit1 Apr 12, 2026
7437a1a
feat: polish GUI layout, add title notification, remove stray Swing file
Copilot Apr 13, 2026
19ca0c6
Merge pull request #3 from Faboit1/copilot/update-gui-layouts
Faboit1 Apr 13, 2026
c6d2b03
Bump version from 1.0-SNAPSHOT to 1.1-SNAPSHOT
Faboit1 Apr 13, 2026
93f0b93
Update pom.xml
Faboit1 Apr 13, 2026
5b17f65
Revamp sell menu: remove glass/chest, sell-on-close, snake path progr…
Copilot Apr 13, 2026
648ed95
Extract magic tolerance constant to EPSILON in CategoryProgressGUI
Copilot Apr 13, 2026
d28c3a8
Merge pull request #4 from Faboit1/copilot/revamp-prices-gui-layout
Faboit1 Apr 13, 2026
e9d0170
Implement all sell-plugin improvements: config options, money-based m…
Copilot Apr 13, 2026
481ac10
Address code review feedback: fix config comment and use display name…
Copilot Apr 13, 2026
0bb577f
Merge pull request #5 from Faboit1/copilot/add-config-options-for-sel…
Faboit1 Apr 13, 2026
f77eaa1
feat: add confirmation GUI to sell-all action
Copilot Apr 13, 2026
87eb61e
refactor: address code review feedback - single-pass preview, closeIn…
Copilot Apr 13, 2026
622d0da
Merge pull request #6 from Faboit1/copilot/add-confirmation-to-sell-a…
Faboit1 Apr 13, 2026
17e337f
multiplier manager + config updated
Copilot Apr 13, 2026
db104db
implement all requested features: geometric multiplier, green money, …
Copilot Apr 13, 2026
3b629a3
fix code review issues: finalSlot in lambda, LinkedHashMap→HashMap, r…
Copilot Apr 13, 2026
e6a9b24
Merge pull request #7 from Faboit1/copilot/update-multiplier-config
Faboit1 Apr 13, 2026
60dc14a
feat: space progress GUI milestones 1 tile apart with horizontal snak…
Copilot Apr 13, 2026
73da315
feat: replace horizontal snake with diagonal V-shape path matching us…
Copilot Apr 13, 2026
af63377
feat: replace V-shape path with W-shape matching user's 1,10,19,28,37…
Copilot Apr 13, 2026
43aed99
Merge pull request #8 from Faboit1/copilot/adjust-progress-gui-tile-s…
Faboit1 Apr 13, 2026
8eaca8c
Update progress GUI path: start at slot 10, shift second U to cols 5-7
Copilot Apr 13, 2026
484ed7c
Merge pull request #9 from Faboit1/copilot/update-progress-gui-values
Faboit1 Apr 13, 2026
20d2dee
feat: number shortening, daily category bonuses, improved GUI text
Copilot Apr 24, 2026
926fedd
fix: address code review feedback – clean up DailyBonusManager and fo…
Copilot Apr 24, 2026
22f89b8
Merge pull request #10 from Faboit1/copilot/shorten-numbers-and-updat…
Faboit1 Apr 24, 2026
28ca1d0
fix: exclude armor and off-hand slots from sellall
Copilot Apr 24, 2026
be253c6
Merge pull request #11 from Faboit1/copilot/fix-sellall-to-exclude-armor
Faboit1 Apr 24, 2026
fdbcf9f
feat: add shulker box sell support
Copilot May 8, 2026
230fa64
Merge pull request #12 from Faboit1/copilot/add-sell-shulker-support
Faboit1 May 9, 2026
034704a
Fix compilation error: add missing SellManager import in GUIListener.…
Copilot May 9, 2026
5c3fa95
Merge pull request #13 from Faboit1/copilot/fix-failed-checks
Faboit1 May 9, 2026
18acef4
feat: add sell worth and fast sell flow
Copilot Jun 2, 2026
9206f85
fix: polish worth tooltip flow
Copilot Jun 2, 2026
c6e8238
fix: use WorthPacketListener.this.plugin in anonymous PacketAdapter c…
Copilot Jun 3, 2026
aea3f85
Merge pull request #15 from Faboit1/copilot/add-sellworth-feature
Faboit1 Jun 3, 2026
1908db3
Make all in-game text configurable via config.yml messages section
Copilot Jul 10, 2026
d931170
Revamp sell GUI, add /sellmulti and /sellworth commands
Copilot Jul 17, 2026
dc2701e
Merge pull request #17 from Faboit1/copilot/make-text-configurable
Faboit1 Jul 17, 2026
09856a0
Fix worth tooltip: refresh on item gain and prevent creative duplicates
claude Jul 29, 2026
40c9f87
Merge pull request #18 from Faboit1/claude/item-worth-display-bugs-1h…
Faboit1 Jul 29, 2026
b45f5ae
Match worth marker with contains() to stop creative re-baking
claude Jul 30, 2026
cab8a9c
Add /showworth per-player toggle and full Folia support
claude Aug 12, 2026
bc301e5
Merge pull request #19 from Faboit1/claude/item-worth-display-bugs-1h…
Faboit1 Aug 12, 2026
afd8662
Add enchantment pricing, feature toggles, config migration; fix worth…
claude Aug 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.yourname</groupId>
<artifactId>SellPlugin</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.2-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
Expand Down Expand Up @@ -45,6 +45,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>net.dmulloy2</groupId>
<artifactId>ProtocolLib</artifactId>
<version>5.4.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>su.nightexpress.nightcore</groupId>
<artifactId>NightCore</artifactId>
Expand Down
46 changes: 40 additions & 6 deletions src/main/java/com/yourname/sellplugin/SellPlugin.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
package com.yourname.sellplugin;

import com.yourname.sellplugin.command.SellAllCommand;
import com.yourname.sellplugin.command.SellCommand;
import com.yourname.sellplugin.command.SellMultiCommand;
import com.yourname.sellplugin.command.FastSellAllCommand;
import com.yourname.sellplugin.command.ShowWorthCommand;
import com.yourname.sellplugin.command.TopSellCommand;
import com.yourname.sellplugin.command.WorthCommand;
import com.yourname.sellplugin.economy.EconomyManager;
import com.yourname.sellplugin.gui.GUIListener;
import com.yourname.sellplugin.listener.WorthPacketListener;
import com.yourname.sellplugin.listener.WorthRefreshListener;
import com.yourname.sellplugin.manager.ConfigManager;
import com.yourname.sellplugin.manager.ConfigMigrator;
import com.yourname.sellplugin.manager.MultiplierManager;
import com.yourname.sellplugin.manager.PriceManager;
import com.yourname.sellplugin.manager.SellManager;
import com.yourname.sellplugin.manager.WorthVisibilityManager;
import org.bukkit.plugin.java.JavaPlugin;

public class SellPlugin extends JavaPlugin {
Expand All @@ -14,18 +25,22 @@ public class SellPlugin extends JavaPlugin {
private ConfigManager configManager;
private PriceManager priceManager;
private MultiplierManager multiplierManager;
private SellManager sellManager;
private WorthVisibilityManager worthVisibilityManager;
private WorthPacketListener worthPacketListener;

@Override
public void onEnable() {
// Initialize Config
saveDefaultConfig();
new ConfigMigrator(this).migrate();
configManager = new ConfigManager(this);

// Initialize Managers
priceManager = new PriceManager(this);
priceManager.loadPrices();

multiplierManager = new MultiplierManager(this);
sellManager = new SellManager(this);
worthVisibilityManager = new WorthVisibilityManager(this);

economyManager = new EconomyManager(this);
if (!economyManager.setupEconomy()) {
Expand All @@ -34,9 +49,20 @@ public void onEnable() {
return;
}

// Register Commands & Events
getCommand("sell").setExecutor(new SellCommand(this));
getCommand("sellall").setExecutor(new SellAllCommand(this));
getCommand("fastsellall").setExecutor(new FastSellAllCommand(this));
getCommand("topsell").setExecutor(new TopSellCommand(this));
getCommand("sellmulti").setExecutor(new SellMultiCommand(this));
getCommand("sellworth").setExecutor(new WorthCommand(this));
ShowWorthCommand showWorthCommand = new ShowWorthCommand(this);
getCommand("showworth").setExecutor(showWorthCommand);
getCommand("showworth").setTabCompleter(showWorthCommand);
getServer().getPluginManager().registerEvents(new GUIListener(this), this);
getServer().getPluginManager().registerEvents(new WorthRefreshListener(this), this);

worthPacketListener = new WorthPacketListener(this);
worthPacketListener.register();

getLogger().info("SellPlugin has been enabled successfully.");
}
Expand All @@ -46,11 +72,19 @@ public void onDisable() {
if (multiplierManager != null) {
multiplierManager.saveAll();
}
if (worthVisibilityManager != null) {
worthVisibilityManager.saveNow();
}
if (worthPacketListener != null) {
worthPacketListener.unregister();
}
getLogger().info("SellPlugin has been disabled.");
}

public EconomyManager getEconomyManager() { return economyManager; }
public ConfigManager getConfigManager() { return configManager; }
public PriceManager getPriceManager() { return priceManager; }
public ConfigManager getConfigManager() { return configManager; }
public PriceManager getPriceManager() { return priceManager; }
public MultiplierManager getMultiplierManager() { return multiplierManager; }
public SellManager getSellManager() { return sellManager; }
public WorthVisibilityManager getWorthVisibilityManager() { return worthVisibilityManager; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class FastSellAllCommand implements CommandExecutor {

private final SellPlugin plugin;

public FastSellAllCommand(SellPlugin plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText("player-only-command", "&cOnly players can use this command."));
return true;
}

if (!player.hasPermission("sellplugin.use")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

plugin.getSellManager().sellAll(player);
return true;
}
}
32 changes: 32 additions & 0 deletions src/main/java/com/yourname/sellplugin/command/SellAllCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import com.yourname.sellplugin.gui.SellAllGUI;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class SellAllCommand implements CommandExecutor {
private final SellPlugin plugin;

public SellAllCommand(SellPlugin plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText("player-only-command", "&cOnly players can use this command."));
return true;
}

if (!player.hasPermission("sellplugin.use")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

new SellAllGUI(plugin, player).open(player);
return true;
}
}
21 changes: 14 additions & 7 deletions src/main/java/com/yourname/sellplugin/command/SellCommand.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import com.yourname.sellplugin.gui.SellGUI;
import com.yourname.sellplugin.gui.ShopMainGUI;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
Expand All @@ -16,21 +16,28 @@ public SellCommand(SellPlugin plugin) {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can use this command.");
// Handle /sell reload
if (args.length > 0 && args[0].equalsIgnoreCase("reload")) {
if (!sender.hasPermission("sellplugin.reload")) {
sender.sendMessage(plugin.getConfigManager().getText("reload-no-permission", "&cYou do not have permission to reload the config."));
return true;
}
plugin.getConfigManager().reload();
sender.sendMessage(plugin.getConfigManager().getText("reload-success", "&aSellPlugin configuration reloaded."));
return true;
}

Player player = (Player) sender;
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText("player-only-command", "&cOnly players can use this command."));
return true;
}

if (!player.hasPermission("sellplugin.use")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

SellGUI gui = new SellGUI(plugin, player);
gui.open(player);

new ShopMainGUI(plugin, player).open(player);
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import com.yourname.sellplugin.gui.SellMultiGUI;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class SellMultiCommand implements CommandExecutor {
private final SellPlugin plugin;

public SellMultiCommand(SellPlugin plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText("player-only-command", "&cOnly players can use this command."));
return true;
}

if (!plugin.getConfigManager().isProgressGuiEnabled()) {
player.sendMessage(plugin.getConfigManager().getText("feature-disabled", "&cThis feature is currently disabled."));
return true;
}

if (!player.hasPermission("sellplugin.use")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

new SellMultiGUI(plugin, player).open(player);
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import com.yourname.sellplugin.util.Scheduler;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* {@code /showworth [true|false]} — lets a player show or hide the worth
* tooltip for themselves. With no argument it toggles the current state.
*/
public class ShowWorthCommand implements CommandExecutor, TabCompleter {

private final SellPlugin plugin;

public ShowWorthCommand(SellPlugin plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText(
"player-only-command", "&cOnly players can use this command."));
return true;
}

if (!player.hasPermission("sellplugin.use")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

boolean nowVisible;
if (args.length == 0) {
nowVisible = plugin.getWorthVisibilityManager().toggle(player.getUniqueId());
} else {
Boolean parsed = parseBoolean(args[0]);
if (parsed == null) {
player.sendMessage(plugin.getConfigManager().getText(
"showworth-usage", "&cUsage: /showworth [true|false]"));
return true;
}
nowVisible = parsed;
plugin.getWorthVisibilityManager().setVisible(player.getUniqueId(), nowVisible);
}

String key = nowVisible ? "showworth-enabled" : "showworth-disabled";
String def = nowVisible
? "&aItem worth is now &lshown&r&a in your inventory."
: "&eItem worth is now &lhidden&r&e in your inventory.";
player.sendMessage(plugin.getConfigManager().getText(key, def));

// Resend the inventory so the change is reflected immediately. Runs on
// the player's own region thread for Folia compatibility.
Scheduler.runEntityLater(plugin, player, () -> {
if (player.isOnline()) {
player.updateInventory();
}
}, 1L);
return true;
}

private Boolean parseBoolean(String arg) {
String a = arg.toLowerCase();
return switch (a) {
case "true", "on", "show", "yes", "enable", "enabled" -> Boolean.TRUE;
case "false", "off", "hide", "no", "disable", "disabled" -> Boolean.FALSE;
default -> null;
};
}

@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
if (args.length == 1) {
return Stream.of("true", "false")
.filter(s -> s.startsWith(args[0].toLowerCase()))
.collect(Collectors.toList());
}
return List.of();
}
}
38 changes: 38 additions & 0 deletions src/main/java/com/yourname/sellplugin/command/TopSellCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.yourname.sellplugin.command;

import com.yourname.sellplugin.SellPlugin;
import com.yourname.sellplugin.gui.TopSellGUI;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class TopSellCommand implements CommandExecutor {

private final SellPlugin plugin;

public TopSellCommand(SellPlugin plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player player)) {
sender.sendMessage(plugin.getConfigManager().getText("player-only-command", "&cOnly players can use this command."));
return true;
}

if (!plugin.getConfigManager().isTopSellEnabled()) {
player.sendMessage(plugin.getConfigManager().getText("feature-disabled", "&cThis feature is currently disabled."));
return true;
}

if (!player.hasPermission("sellplugin.topsell")) {
player.sendMessage(plugin.getConfigManager().getMessage("no-permission"));
return true;
}

new TopSellGUI(plugin, player, 0).open(player);
return true;
}
}
Loading