Problem
The /hs inv command creates a 9-slot inventory (single row), which can only display up to 9 players. Servers with more online players cannot see all entries. There is no pagination, no next/previous page buttons.
Root cause: CommandsManager.java line 147:
Inventory inv = Bukkit.createInventory(new HackedHolder(player), 9, "HackedServer");
All players are added via inv.addItem(head) in a loop with no bounds checking — players beyond 9 are silently dropped.
Suggested approach
- Expand the inventory to a larger size (e.g., 54 slots = 6 rows) to fit more players
- Add pagination with navigation items:
- Use the bottom row for navigation (previous page / next page arrows, page indicator)
- Top 5 rows (45 slots) for player heads
- Store the current page number in the
HackedHolder object
- Handle click events for the navigation items in
HackedPlayerListeners (currently all clicks are cancelled on line 62)
The HackedHolder class could be extended to track pagination state:
public class HackedHolder implements InventoryHolder {
private final Player viewer;
private int currentPage = 0;
// ...
}
Relevant files
hackedserver-spigot/src/main/java/org/hackedserver/spigot/commands/CommandsManager.java (line 147)
hackedserver-spigot/src/main/java/org/hackedserver/spigot/HackedHolder.java
hackedserver-spigot/src/main/java/org/hackedserver/spigot/listeners/HackedPlayerListeners.java (line 62)
Problem
The
/hs invcommand creates a 9-slot inventory (single row), which can only display up to 9 players. Servers with more online players cannot see all entries. There is no pagination, no next/previous page buttons.Root cause:
CommandsManager.javaline 147:All players are added via
inv.addItem(head)in a loop with no bounds checking — players beyond 9 are silently dropped.Suggested approach
HackedHolderobjectHackedPlayerListeners(currently all clicks are cancelled on line 62)The
HackedHolderclass could be extended to track pagination state:Relevant files
hackedserver-spigot/src/main/java/org/hackedserver/spigot/commands/CommandsManager.java(line 147)hackedserver-spigot/src/main/java/org/hackedserver/spigot/HackedHolder.javahackedserver-spigot/src/main/java/org/hackedserver/spigot/listeners/HackedPlayerListeners.java(line 62)