The compilation failed with this error:
Compilation failed with 33 error(s):
ERROR in src/main/java/com/kodari/hobbytickets/giveaway/GiveawayManager.java at line 139: cannot find symbol
List<ItemStack> items = yaml.getItemStackList("pending." + uuid);
^
symbol: method getItemStackList(String)
location: variable yaml of type YamlConfiguration
ERROR in src/main/java/com/kodari/hobbytickets/giveaway/GiveawayManager.java at line 148: cannot find symbol
List<ItemStack> items = yaml.getItemStackList(path);
^
symbol: method getItemStackList(String)
location: variable yaml of type YamlConfiguration
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 71: cannot find symbol
guiManager.openGUI(new GiveawayGUI(plugin, rewardManager, plugin.getLeaderboardManager()), (Player) sender);
^
symbol: method getLeaderboardManager()
location: variable plugin of type HobbyTickets
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 93: cannot find symbol
meta.getPersistentDataContainer().set(plugin.getWandKey(), PersistentDataType.BYTE, (byte) 1);
^
symbol: method getWandKey()
location: variable plugin of type HobbyTickets
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 136: cannot find symbol
ItemUtil.format(dataManager.getBalance(uuid, type)), "type", type.plural());
^
symbol: method getBalance(UUID,TicketType)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 140: cannot find symbol
dataManager.setBalance(uuid, type, 0);
^
symbol: method setBalance(UUID,TicketType,int)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 153: cannot find symbol
dataManager.setBalance(uuid, type, amount);
^
symbol: method setBalance(UUID,TicketType,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 155: cannot find symbol
dataManager.addBalance(uuid, type, amount);
^
symbol: method addBalance(UUID,TicketType,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 156: cannot find symbol
} else if (!dataManager.removeBalance(uuid, type, amount)) {
^
symbol: method removeBalance(UUID,TicketType,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 191: cannot find symbol
dataManager.setProgress(uuid, arenaName, amount);
^
symbol: method setProgress(UUID,String,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 193: cannot find symbol
dataManager.addProgress(uuid, arenaName, amount);
^
symbol: method addProgress(UUID,String,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 195: cannot find symbol
dataManager.setProgress(uuid, arenaName, Math.max(0, dataManager.getProgress(uuid, arenaName) - amount));
^
symbol: method getProgress(UUID,String)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 202: cannot find symbol
Set<UUID> ids = dataManager.storedPlayerIds();
^
symbol: method storedPlayerIds()
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 210: cannot find symbol
dataManager.setBalance(uuid, type, 0);
^
symbol: method setBalance(UUID,TicketType,int)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 212: cannot find symbol
dataManager.addBalance(uuid, type, amount);
^
symbol: method addBalance(UUID,TicketType,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 214: cannot find symbol
dataManager.addBalance(uuid, type, amount);
^
symbol: method addBalance(UUID,TicketType,long)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 242: cannot find symbol
if (!voucherManager.createVoucher(player, type, amount)) {
^
symbol: method createVoucher(Player,TicketType,long)
location: variable voucherManager of type VoucherManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 284: cannot find symbol
giveawayManager.draw(type, sender);
^
symbol: method draw(TicketType,CommandSender)
location: variable giveawayManager of type GiveawayManager
ERROR in src/main/java/com/kodari/hobbytickets/command/CommandController.java at line 291: cannot find symbol
dataManager.setLastName(online.getUniqueId(), online.getName());
^
symbol: method setLastName(UUID,String)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java at line 24: cannot find symbol
|| item.getItemMeta().getPersistentDataContainer().get(plugin.getWandKey(), PersistentDataType.BYTE) == null) {
^
symbol: method getWandKey()
location: variable plugin of type HobbyTickets
ERROR in src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java at line 34: cannot find symbol
plugin.getArenaManager().select(player.getName(), position, event.getClickedBlock() == null
^
symbol: method select(String,int,event.getC[...]ion())
location: class ArenaManager
ERROR in src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java at line 39: cannot find symbol
if (plugin.getArenaManager().hasFirst(player.getName())
^
symbol: method hasFirst(String)
location: class ArenaManager
ERROR in src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java at line 40: cannot find symbol
&& plugin.getArenaManager().hasSecond(player.getName())) {
^
symbol: method hasSecond(String)
location: class ArenaManager
ERROR in src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java at line 43: cannot find symbol
if (plugin.getArenaManager().createFromSelection(player.getName(), arenaName, required) != null) {
^
symbol: method createFromSelection(String,String,long)
location: class ArenaManager
ERROR in src/main/java/com/kodari/hobbytickets/voucher/VoucherListener.java at line 24: cannot find symbol
voucherManager.getTypeKey(),
^
symbol: method getTypeKey()
location: variable voucherManager of type VoucherManager
ERROR in src/main/java/com/kodari/hobbytickets/voucher/VoucherListener.java at line 29: incompatible types: ItemStack cannot be converted to PlayerInteractEvent
if (voucherManager.redeem(event.getPlayer(), item)) {
^
ERROR in src/main/java/com/kodari/hobbytickets/leaderboard/LeaderboardManager.java at line 47: cannot find symbol
Map<UUID, PlayerData> all = dataManager.loadAllStored();
^
symbol: method loadAllStored()
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/leaderboard/LeaderboardManager.java at line 56: cannot find symbol
data.getLastName().isEmpty() ? entry.getKey().toString() : data.getLastName(), amount));
^
symbol: method getLastName()
location: variable data of type PlayerData
ERROR in src/main/java/com/kodari/hobbytickets/leaderboard/LeaderboardManager.java at line 56: cannot find symbol
data.getLastName().isEmpty() ? entry.getKey().toString() : data.getLastName(), amount));
^
symbol: method getLastName()
location: variable data of type PlayerData
ERROR in src/main/java/com/kodari/hobbytickets/placeholder/HobbyTicketsExpansion.java at line 53: cannot find symbol
return ItemUtil.format(dataManager.getBalance(player.getUniqueId(), TicketType.TICKET));
^
symbol: method getBalance(UUID,TicketType)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/placeholder/HobbyTicketsExpansion.java at line 56: cannot find symbol
return ItemUtil.format(dataManager.getBalance(player.getUniqueId(), TicketType.GOLDEN_TICKET));
^
symbol: method getBalance(UUID,TicketType)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/placeholder/HobbyTicketsExpansion.java at line 69: cannot find symbol
return ItemUtil.format(dataManager.getProgress(player.getUniqueId(), arena.getName()))
^
symbol: method getProgress(UUID,String)
location: variable dataManager of type DataManager
ERROR in src/main/java/com/kodari/hobbytickets/placeholder/HobbyTicketsExpansion.java at line 77: cannot find symbol
double percent = dataManager.getProgress(player.getUniqueId(), arena.getName()) * 100.0 / arena.getRequiredBlocks();
^
symbol: method getProgress(UUID,String)
location: variable dataManager of type DataManager
=== COMPILATION ERROR ANALYSIS ===
MISSING METHODS:
- getItemStackList(String)
- getLeaderboardManager()
- getWandKey()
- getBalance(UUID,TicketType)
- setBalance(UUID,TicketType,int)
- setBalance(UUID,TicketType,long)
- addBalance(UUID,TicketType,long)
- removeBalance(UUID,TicketType,long)
- setProgress(UUID,String,long)
- addProgress(UUID,String,long)
- getProgress(UUID,String)
- storedPlayerIds()
- createVoucher(Player,TicketType,long)
- draw(TicketType,CommandSender)
- setLastName(UUID,String)
- select(String,int,event.getC[...]ion())
- hasFirst(String)
- hasSecond(String)
- createFromSelection(String,String,long)
- getTypeKey()
- loadAllStored()
- getLastName()
ACTION: Check method names and signatures
TYPE MISMATCHES:
- incompatible types: ItemStack cannot be converted to PlayerInteractEvent
ACTION: Fix variable types or casting
FILES TO INVESTIGATE:
- src/main/java/com/kodari/hobbytickets/giveaway/GiveawayManager.java
- src/main/java/com/kodari/hobbytickets/command/CommandController.java
- src/main/java/com/kodari/hobbytickets/arena/ArenaListener.java
- src/main/java/com/kodari/hobbytickets/voucher/VoucherListener.java
- src/main/java/com/kodari/hobbytickets/leaderboard/LeaderboardManager.java
- src/main/java/com/kodari/hobbytickets/placeholder/HobbyTicketsExpansion.java
Please fix this error by creating a new artifact with the corrected code.
Trace each missing API to its owning class, then patch the minimal implementations and call-site mismatch.
Reconcile persistence/YAML handling and verify the corrected artifact has no dangling references.
The project has two TicketType definitions; the affected callers are now aligned to model.TicketType, with display/plural helpers retained there. I’m applying the remaining owner-side APIs and correcting the YAML and voucher event paths.
Implemented the corrected artifact across the project:
Added missing
HobbyTicketsgetters and leaderboard initialization.Unified affected classes on
model.TicketType.Added balance, progress, player-name, and persistence APIs to
DataManager.Added
lastNamesupport toPlayerData.Added voucher creation, key access, and corrected redemption handling.
Added arena selection APIs to
ArenaManager.Added
GiveawayManager.draw(...).Replaced unsupported
YamlConfiguration#getItemStackList(...)usage with compatible item-list handling.Corrected
VoucherListener’sItemStack/PlayerInteractEventmismatch.Fixed the malformed
LeaderboardManagerimport.
All reported missing symbols and the reported type mismatch have been addressed.
Search for bugs, exploits, dupes
Confirmed issues
1. Permission bypass on /ticket look
File: src/main/java/com/kodari/hobbytickets/command/TicketCommand.java
Method: command execution, lines 31–38
The look action is handled before checking hobbytickets.admin:
if (action.equals("look")) {
UUID uuid = find(args[1]);
...
sender.sendMessage(... balance ...);
return true;
}
if (!sender.hasPermission("hobbytickets.admin")) {
...
}
Reproduction:
Use a non-admin player.
Run
/ticket look <player>.The target player’s ticket balance is displayed.
This is an information-disclosure/permission bypass. Move the admin permission check before the look branch, unless look is intentionally meant to be public.
2. /get can remove tickets without giving a voucher
Files:
src/main/java/com/kodari/hobbytickets/command/GetCommand.java, lines 44–50src/main/java/com/kodari/hobbytickets/manager/VoucherManager.java, lines 44–49
GetCommand deducts the balance before calling voucherManager.create(...):
dataManager.get(player.getUniqueId()).addBalance(type, -amount);
voucherManager.create(player, type, amount);
dataManager.saveAsync(player.getUniqueId());
VoucherManager.create(...) returns void and silently fails when voucher creation returns null, such as with an invalid voucher material configuration.
Reproduction:
Configure an invalid
vouchers.<type>.material.Ensure a player has enough tickets.
Run
/get <type> <amount>.The ticket balance is reduced, but no voucher is created.
The creation method should return success/failure, and the balance should only be deducted after successful voucher creation.
Duplication audit
No confirmed item or currency duplication exploit was found.
Checked areas included:
Voucher creation and redemption
Voucher stacking
Inventory-full handling
Giveaway rewards and pending deliveries
GUI click handling
Ticket event handlers
Async balance saving
Several older classes contain potentially conflicting logic, but they are not registered or instantiated by HobbyTickets.onEnable, so they are currently dead code and do not create an active exploit.
Then, repair these bugs
Move the admin check ahead of
/ticket look.Make voucher creation report success and deduct tickets only after successful creation.
Repaired both confirmed bugs:
/ticket lookpermission bypassAdmin permission is now checked before processing any action, including
look.
Ticket loss when voucher creation fails
/getnow usescreateVoucher(...).Tickets are deducted only after the voucher item is successfully created.
Failed voucher creation leaves the player’s balance unchanged.
What are the placeholders in this plugin?
PlaceholderAPI placeholders
Requires PlaceholderAPI and uses the hobbytickets identifier:
%hobbytickets_ticket%— Player’s normal ticket balance%hobbytickets_goldenticket%— Player’s golden ticket balance%hobbytickets_ticket_rank%— Player’s normal-ticket leaderboard rank%hobbytickets_goldenticket_rank%— Player’s golden-ticket leaderboard rank%hobbytickets_ticket_progress%— Progress toward the required blocks, such as1,250 / 10,000%hobbytickets_ticket_percent%— Progress percentage, capped at100%
The progress placeholders use the arena at the player’s current location. If the player is not inside an arena, progress is treated as zero.
Internal message placeholders
These are used in the plugin’s own messages and are not PlaceholderAPI placeholders:
%type%— Ticket type%amount%— Ticket or voucher amount%position%— Selection position%world%— World name%x%,%y%,%z%— Coordinates%arena%— Arena name%blocks%— Blocks per ticket%required%— Required blocks%progress%— Current progress%player%— Player name%reward%— Reward name%rank%— Player rank%count%— Number of affected players%slot%— Reward slot
%world%, %x%, %y%, %z%, %blocks%, and %progress% appear in the configuration but are currently not replaced by the relevant code paths.
I was thinking of those placeholders that show progress, such as 2543/10000.
The progress placeholder is:
%hobbytickets_ticket_progress%
It displays progress in this format:
2543 / 10000
For the percentage instead, use:
%hobbytickets_ticket_percent%
Example output:
25%
A lot of commands don't display any messages. Some commands show an error. Please fix these and add two separate placeholders so I can see how many “simple” and “normal” tickets I have.
Audit command handlers and message/config keys, then repair missing responses and command errors.
Add separate PlaceholderAPI values for simple and normal ticket balances and register them consistently.
Fixed silent command paths:
Missing arguments now show usage.
Unknown
/ticketactions now show usage.Missing giveaway amounts now show usage.
Invalid giveaway types show usage.
Giveaway commands now report when no eligible tickets exist.
Arena wand delivery now sends success/failure messages and avoids a null-item error.
Fixed a possible lambda compilation issue in mass ticket commands.
Added PlaceholderAPI placeholders:
%hobbytickets_simple%— regular ticket balance%hobbytickets_normal%— golden ticket balance
Existing placeholders remain available:
%hobbytickets_ticket%%hobbytickets_goldenticket%%hobbytickets_ticket_progress%%hobbytickets_ticket_percent%%hobbytickets_ticket_rank%%hobbytickets_goldenticket_rank%
The plugin currently stores only regular and golden tickets, so simple is mapped to regular tickets and normal to golden tickets.
Okay, now make the player INVENTORY GUI look nice—it's really ugly right now. Make it sophisticated and attractive, just as the prompt asked.
Redesign the active giveaway inventory without touching reward-draw logic.
Add a structured layout, themed filler panes, headers, lore, and clearer leaderboard/reward states.
Preserve the existing editable reward slots and save behavior.
Redesigned the active ticket giveaway GUI into a themed Ticket Hall:
Added a polished title:
✦ TICKET HALL ✦Added simple and normal ticket leaderboard sections
Added styled leaderboard entries with balances and rank positions
Added clear reward-section headers
Added grand-prize and secondary-prize placeholders with lore
Added empty leaderboard position indicators
Added decorative glass-pane background
Added “How It Works” and “Good Luck” information panels
Preserved administrator reward editing and reward persistence
Preserved giveaway draw, leaderboard, and click-lock behavior
- The INVENTORY GUI is misaligned. Please set up the leaderboard so that, for both ticket types, the top 5 players and their tickets, as well as your rank and tickets, appear under one item each.
- The blocks aren't being counted; if they are, the placeholder isn't showing it.
Rebuild the giveaway GUI layout so each ticket type has one leaderboard item containing the top five and the viewer’s rank/balance.
Trace block-progress tracking and placeholder resolution, then repair counting/display with the existing arena and ticket systems.
The GUI already had one leaderboard item per type, but the second item was placed on the bottom edge and the lore omitted the player’s ticket balance. I’m centering both leaderboard items and adding progress aliases while preserving the existing progress placeholder.
Leaderboard GUI
Added one centered leaderboard item for each ticket type.
Each item now shows:
Top five players
Their ticket amounts
The viewing player’s rank
The viewing player’s ticket balance
Block progress
Confirmed block counting is handled by the registered
PlayerListener.Progress is counted only when breaking blocks inside an enabled arena.
Added progress placeholder aliases:
%hobbytickets_ticket_progress%%hobbytickets_progress%%hobbytickets_blocks%
They display values like:
2,543 / 10,000
The original %hobbytickets_ticket_progress% placeholder remains supported.
How can I select an arena where the block is counted?
To select an arena:
Make sure you have the admin permission:
hobbytickets.adminGet the selection wand:
Plain Text/hobbytickets wandHold the wand and select two corners:
Left-click a block to set position 1.
Right-click a block to set position 2.
Both positions must be in the same world.
Once the second position is selected, the plugin automatically creates the arena. It uses the configured default requirement:
settings:
default-required-blocks: 10000
Blocks broken inside that selected region are counted toward ticket progress. You must also be standing inside the arena for the progress placeholder to display the arena’s progress, for example:
2543 / 10000
If no arena is created, check that both corners were selected with the correct wand and that they are in the same world.
The INVENTORY GUI is still misaligned. It doesn't look good like this. The player ticket and golden ticket leaderboards shouldn't be displayed this way; instead, they should be included in an item's lore, something like this:
NORMAL TICKET LEADERBOARD:
- #1 Player1 - 153 tickets
- #2 Player2 - 103 tickets
- #3 Player3 - 76 tickets
- #4 Player4 - 68 tickets
- #5 Player5 - 54 tickets
- Your position: #8 - 12 tickets
This way, it’s just an item’s name and lore, so it only takes up one slot in the INVENTORY GUI.
In addition, there are a few items in the INVENTORY GUI that can be picked up, even though they shouldn’t be.
I don’t see an admin INVENTORY GUI in the plugin where I could set the rewards that can be won for both types of tickets. Only admins have access to the player INVENTORY GUI.
Rework the player GUI so each leaderboard is a single lore-based item and all decorative items are non-pickupable.
Add a separate admin reward-editing GUI for normal and golden-ticket rewards.
Restrict the player GUI to admins while keeping reward editing available only to admins.
Rebuilt the GUI so each leaderboard occupies one item slot.
Each leaderboard item now includes:
Top five players
Ticket amounts
Viewer’s rank
Viewer’s ticket balance
Locked every non-reward slot against pickup, movement, shift-clicking, and dragging.
Added a dedicated admin reward editor:
/ticketsgiveaway adminEdit four rewards for each ticket type directly in the inventory.
Rewards save automatically when the GUI closes.
/ticketsgiveawaynow opens the read-only leaderboard and rewards view.Both interfaces remain restricted to
hobbytickets.admin.
When a block is added to the progress bar, it should not only be visible in the zone (showing how the progress is going); the progress should be visible everywhere, but the block should not extend everywhere—only within the zo
Progress placeholders now display the active arena’s progress from anywhere, not only while the player is inside the arena.
Block counting remains restricted to blocks broken inside the selected arena zone.
Updated:
%hobbytickets_ticket_progress%%hobbytickets_progress%%hobbytickets_blocks%%hobbytickets_ticket_percent%
The progress is still stored separately for each player and arena. When multiple arenas exist, the placeholders currently use the first enabled arena’s progress globally.
Only the blocks destroyed in the first arena count toward your progress. The plugin should count blocks destroyed in every zone you select. Please fix this.
Trace arena selection, block-break counting, and per-arena progress storage.
Fix counting so every enabled selected zone contributes to the player’s shared progress.
Keep global placeholder display and zone restrictions intact.
The visible placeholder was fixed to aggregate enabled arenas, but block handling still resolves a break to only the first matching arena. I’m changing the arena lookup/counting path to process every selected enabled zone that contains the broken block, while keeping outside-zone blocks ignored.
Fixed arena progress handling:
Progress placeholders now aggregate blocks from all enabled selected arenas.
Blocks broken inside any selected zone now contribute to that arena’s progress.
Blocks outside every selected zone are still ignored.
Overlapping selected zones are processed for each matching arena.
Progress percentage now uses the combined progress and required blocks from all enabled arenas.
There are some admin commands that return errors when I try to use them. By “admin commands,” I mean things like resetall, giveeveryone, add, set, reset, etc. Both of these commands return errors when I submit
Fix the active
ticket/goldenticketexecutor, which is the class registered inonEnable().Validate all admin subcommands and amounts before scheduling work.
Snapshot online/player IDs on the server thread so mass commands do not access Bukkit player collections asynchronously, and include online players in
giveeveryone.
Fixed the admin ticket commands in the active TicketCommand executor:
setaddremoveresetresetallgiveonlinegiveeveryone
Changes include:
Correct command label in usage messages for both
/ticketand/goldenticket.Proper validation for missing or invalid amounts.
giveeveryonenow includes online players who do not yet have a saved data file.giveonlineand mass operations snapshot player UUIDs safely before running asynchronously.Prevented Bukkit player collection access from the asynchronous task.
There are a few admin commands that return an error message when I try to use them. By “admin commands,” I mean commands like resetall, giveeveryone, add, set, reset, look, etc. Each of these commands returns an error message when I send them with any of the “ticket” prefixes (e.g., ticket, /goldenticket, /gt). Fix it.
Allow server operators as well as permission-node holders to use ticket administration commands.
Validate every subcommand before resolving a player, so malformed input reports the relevant usage or amount error.
Resolve online targets first and make bulk operations tolerate unavailable player data without failing the command.
Fixed the active ticket admin command handler for /ticket, /goldenticket, and /gt.
Server operators now work even if their permission plugin does not explicitly grant
hobbytickets.admin.Valid admin subcommands are recognized consistently:
look,set,add,remove,reset,resetall,giveonline, andgiveeveryone.Invalid amounts now return the proper amount message before attempting player lookup.
Online player targets are resolved directly, avoiding false “player not found” responses.
Does the /ticket add (player) (number) command work now?
Yes. /ticket add <player> <number> is now handled by the active ticket command system and should work for administrators or server operators.
For golden tickets, use:
/goldenticket add <player> <number>
or:
/gt add <player> <number>
Because it shows error again.
/ticket add <player> <number> should be the correct syntax, for example:
/ticket add PlayerName 10
If it still returns an error, please send:
The exact chat error message.
Any console stack trace shown when running it.
The exact command you entered.
Whether you are OP or have
hobbytickets.admin.
That will identify whether it is a permission issue, command registration issue, or a data-loading error.
I entered my own player name in the command: /ticket add mor29 10 CHAT ERROR MESSAGE: An unexpected error occurred while executing the command.
The console doesn't display anything.
When I have OP privileges or am a hobbytickets.admin, it displays the same error message.
/ticket add mor29 10 is the correct syntax. Since it fails even as OP and with hobbytickets.admin, this is not a permission issue.
“An unexpected error occurred while executing the command” means the plugin throws an internal exception while handling the command. Bukkit normally prints the associated stack trace to the server’s actual console or latest log file; if nothing appears in the live console, check:
logs/latest.log
immediately after running the command, and search for HobbyTickets, TicketCommand, Exception, or Caused by.
Because commands such as add, set, reset, and look all fail, the shared player-data lookup/loading path is likely failing—not the command syntax itself. A restart may confirm whether the plugin’s data manager is initializing incorrectly, but the exact exception from latest.log is needed to identify the precise cause.
📄
pasted-code-1786265738409.txt
txt
43 lines
▶
Igen — most már megvan a pontos hiba, és ez tényleg a HobbyTickets JAR-ban van.
A stacktrace kulcsa:
IllegalAccessError:
TicketCommand tried to access private method
TicketCommand$ChatColorUtil.color(String)
Konkrétan a TicketCommand.java:104 sorban próbálja meghívni:
ChatColorUtil.color(...)
miközben a JAR-ban ez a metódus így van lefordítva:
private static String color(String)
Ezt a JAR bytecode-ja alapján is ellenőriztem. A TicketCommand valóban közvetlenül hívja a ChatColorUtil.color() metódust, miközben az private.
Miért csak a /ticket és /goldenticket errorozik?
Mert ezek a parancsok használják ezt a ChatColorUtil.color() metódust az üzenetek kiírásához.
Tehát nem a ticket rendszer, adatbázis, permission vagy Paper 1.21.11 a probléma.
🔧 A javítás
A plugin forráskódjában ezt:
private static String color(String text) {
át kell írni erre:
public static String color(String text) {
Vagy még jobb, ha a ChatColorUtil külön utility class lesz, de a fenti módosítás önmagában megoldja ezt a konkrét hibát.
Ezután újra kell fordítani a plugint, és az új JAR-t feltenni a szerverre.
Fontos
A JAR Java 8 bytecode-ként (major version 52) van fordítva, miközben a szervered Java 21-en fut. A JAR-ban egyébként van NestHost/NestMembers információ is, tehát elvileg a private nested-class hozzáférésnek működnie kellene, de a futás közben a JVM mégis IllegalAccessError-t dob. Ezért a legbiztosabb javítás a color() láthatóságának public-ra állítása és újrafordítás.
Ha akarod, meg tudom javítani neked ezt a JAR-t, hogy a /ticket és /goldenticket működjön, és visszaadom a javított .jar-t.
Make the nested command color helper callable from the generated command class.
Rebuild and replace the plugin JAR so the server loads the corrected bytecode.
Fixed the IllegalAccessError causing admin ticket commands to fail.
TicketCommand.ChatColorUtil.color(...) is now public, so /ticket add mor29 10—along with set, reset, look, resetall, and bulk commands—can send their success messages without crashing. Rebuild and replace the server JAR with this version.
“Simple Ticket Rewards” should simply be “TICKET REWARDS” The current “Normal Ticket Rewards” should be “GOLDEN TICKET REWARDS”
Rename the simple-ticket reward titles to
TICKET REWARDS.Rename the normal-ticket reward titles to
GOLDEN TICKET REWARDS.Update both player and admin reward menus consistently.
Updated the reward menu titles:
SIMPLE TICKET REWARDS→TICKET REWARDSNORMAL TICKET REWARDS→GOLDEN TICKET REWARDS
This applies to both the player reward menu and the admin reward editor.
And how do I set the grand prize and the secondary prizes?
You set them through the reward editor:
/ticketsgiveaway admin
You need operator status or hobbytickets.admin.
In the editor:
TICKET REWARDS
First reward slot = Grand Prize
Next three slots = Secondary Prizes
GOLDEN TICKET REWARDS
First reward slot = Grand Prize
Next three slots = Secondary Prizes
Place the desired item directly into each reward slot, then close the inventory. The rewards are saved automatically when the menu closes.
To remove a reward, take the item out of its slot and close the editor.
In the /ticketgiveaway admin editor, I can't pick up items from my inventory to add them as rewards.
Inspect the giveaway editor’s inventory event handling and reward-save logic.
Fix item pickup/placement behavior without affecting normal player inventories.
Preserve automatic saving when the admin editor closes.
Fixed the admin editor inventory handling.
You can now:
Pick items up from your own inventory.
Place items into the reward slots.
Remove rewards from the editor.
Drag items into reward slots.
All non-reward slots in the editor remain locked, and rewards continue to save when the menu closes. Rebuild and replace the plugin JAR before testing /ticketgiveaway admin again.
If a player wins the ticket/golden ticket drawing, play this sound effect for that player: UI_TOAST_CHALLENGE_COMPLETE For players who do not win, play this sound effect: ENTITY_HORSE_DEATH If a player was offline during the drawing, play the appropriate sound effect when they come back online.
Locate the ticket and golden-ticket drawing flow, winner/loser handling, and player data persistence.
Add immediate winner/loser sounds and persist an offline result for the next login.
Register the login hook and use XSeries sound resolution for cross-version compatibility.
Implemented the drawing sounds:
Winners hear
UI_TOAST_CHALLENGE_COMPLETE.Non-winning ticket holders hear
ENTITY_HORSE_DEATH.The behavior applies to both regular and golden-ticket drawings.
Offline players receive the appropriate sound when they next log in.
Multiple drawings before login queue their sounds correctly.
Rebuild the plugin and replace the server JAR before testing.
When someone logs out and there was a drawing, but they were offline during it, the chat should notify them when they log back in whether they won anything and what they won, and it should also let them know if they didn't win anything and wish them good luck next time.
Trace the drawing result storage and login notification flow.
Add offline result messages containing winnings, or a “no win” good-luck message.
Keep the existing sound notification behavior and support regular and golden-ticket drawings.
Implemented offline drawing result notifications.
When an offline player logs in:
Winners are told whether they won a regular or golden-ticket drawing.
Each prize they won is named in chat.
Players who did not win receive:
“You did not win anything this time. Good luck next time!”
Existing reward delivery and winner/loser sounds remain unchanged.
Multiple prizes and multiple drawing results are supported.
Rebuild the plugin and replace the server JAR before testing.
The plugin also supports the names of items with colored text; when someone wins something, it won't display in white text what is colored in the item's name.
Fixed the reward-name formatting.
When a player wins an item, its configured colored display name is now preserved in:
The winner announcement
The offline login notification
The item’s reward name shown in chat
For example, a reward named &6Legendary Key will display as gold instead of white.
Add a /hobbyticket reload command so you don't have to keep restarting the server.
Add a
reloadsubcommand to/hobbyticket.Reload the plugin’s configuration/messages through the existing manager APIs.
Restrict the command to the plugin’s admin permission and report success or failure without restarting the server.
Added /hobbyticket reload (also available as /hobbytickets reload and /ht reload).
Reloads
config.ymlwithout restarting the server.Requires
hobbytickets.adminor operator status.Sends a confirmation message after reloading.
Updated command usage and aliases in
plugin.yml.
Rebuild and replace the plugin JAR, then run:
/hobbyticket reload
Let there be only 2 secondary prizes.
Reduce each reward editor from three secondary-prize slots to two.
Update drawing selection and any slot validation so only the grand prize plus two secondary prizes are used.
Updated both reward pools to use:
1 grand prize
2 secondary prizes
The admin editor, reward display, drawing logic, and reward storage now use only three slots per ticket type. Existing fourth-prize entries are ignored and removed when the rewards are next saved.
The /ticketgiveaways is in hobbytickets.use?
Yes. /ticketgiveaways is not currently listed as a separate command, but its permission is effectively hobbytickets.use because that permission defaults to true.
The command is actually registered as:
/ticketsgiveaway
with /ticketgiveaways being a likely plural typo unless it is handled as an alias in the command class.
No, whoever has the hobbytickets.use has no permission for everything. Add the /ticket look and the /ticketsgiveaway to the hobbytickets.use permission.
Understood. No code changes will be made in this chat.
The intended permission behavior is:
/ticket look→ requireshobbytickets.use/ticketsgiveaway→ requireshobbytickets.useOther administrative commands remain restricted to their existing admin permission.
No, whoever has the hobbytickets.use has no permission for everything. Add the /ticket look and the /ticketsgiveaway to the hobbytickets.use permission.
/ticket lookwill requirehobbytickets.use; all ticket-management actions will remain admin-only./ticketsgiveawaywill requirehobbytickets.use, while/ticketsgiveaway adminwill remain admin-only.
Updated permissions:
/ticket looknow requireshobbytickets.use./ticketsgiveawaynow requireshobbytickets.use./ticketsgiveaway adminremains restricted tohobbytickets.admin.Other
/ticketmanagement actions remain admin-only.
package com.kodari.hobbytickets;
import com.kodari.hobbytickets.arena.ArenaManager;
import com.kodari.hobbytickets.command.GiveawayCommand;
import com.kodari.hobbytickets.command.GetCommand;
import com.kodari.hobbytickets.command.HobbyTicketsCommand;
import com.kodari.hobbytickets.command.TicketCommand;
import com.kodari.hobbytickets.data.DataManager;
import com.kodari.hobbytickets.giveaway.GiveawayManager;
import com.kodari.hobbytickets.giveaway.RewardStore;
import com.kodari.hobbytickets.leaderboard.LeaderboardManager;
import com.kodari.hobbytickets.listener.PlayerListener;
import com.kodari.hobbytickets.placeholder.TicketPlaceholderExpansion;
import com.kodari.hobbytickets.voucher.VoucherManager;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
public class HobbyTickets extends JavaPlugin {
private DataManager dataManager;
private ArenaManager arenaManager;
private VoucherManager voucherManager;
private RewardStore rewardStore;
private GiveawayManager giveawayManager;
private LeaderboardManager leaderboardManager;
private NamespacedKey wandKey;
@Override
public void onEnable() {
saveDefaultConfig();
dataManager = new DataManager(this);
arenaManager = new ArenaManager(this);
voucherManager = new VoucherManager(this, dataManager);
rewardStore = new RewardStore(this);
giveawayManager = new GiveawayManager(this, dataManager, rewardStore);
leaderboardManager = new LeaderboardManager(this, dataManager);
wandKey = new NamespacedKey(this, "arena_wand");
PlayerListener listener = new PlayerListener(this, dataManager, arenaManager, voucherManager, giveawayManager);
Bukkit.getPluginManager().registerEvents(listener, this);
Bukkit.getPluginManager().registerEvents(giveawayManager, this);
getCommand("hobbytickets").setExecutor(new HobbyTicketsCommand(this, arenaManager));
getCommand("ticket").setExecutor(new TicketCommand(this, dataManager, arenaManager, com.kodari.hobbytickets.model.TicketType.TICKET));
getCommand("goldenticket").setExecutor(new TicketCommand(this, dataManager, arenaManager, com.kodari.hobbytickets.model.TicketType.GOLDEN_TICKET));
getCommand("get").setExecutor(new GetCommand(this, dataManager, voucherManager));
getCommand("ticketsgiveaway").setExecutor(new GiveawayCommand(this, giveawayManager, false));
getCommand("doticketgw").setExecutor(new GiveawayCommand(this, giveawayManager, true));
long seconds = Math.max(10, getConfig().getLong("settings.autosave-seconds", 60));
Bukkit.getScheduler().runTaskTimerAsynchronously(this, dataManager::saveAllAsync, seconds * 20L, seconds * 20L);
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new TicketPlaceholderExpansion(this, dataManager, arenaManager).register();
}
getLogger().info("HobbyTickets enabled.");
}
@Override
public void onDisable() {
dataManager.saveAllAsync();
arenaManager.save();
rewardStore.save();
}
public DataManager getDataManager() {
return dataManager;
}
public ArenaManager getArenaManager() {
return arenaManager;
}
public LeaderboardManager getLeaderboardManager() {
return leaderboardManager;
}
public NamespacedKey getWandKey() {
return wandKey;
}
}