qsqu

My server is paper version 1.21.11

i want to make a plugin and the job for this plugin is in a defined region by worldguard this region will be the event .. what is the even > a player in the defined area should kill 10 players if he Succeed to do so he will be rewarded with the thing i determine in the config of the plugin i also want to have the ability to change the number needed to get the reward the highest player with kills should have a red dot above his head via fancyholograms i use it as well also there should be a minimum count of players in order for the event to start like 5 players and when a players joins it should be writen to him just him in the chat that he is in a queue with a join sound also when a player wins should announce in broadcast %player% Won the match or the game or figure out a proper name for the game and put it there the plugin should have a config to edit things and also should work with justcombat / worldguard / fancyholograms also the event should be every 5 hours or duration i determine from config also there must be a menu in the game like /pluginname menu and from this menu i can put the reward

Kodari AI
KodariNov 5 at 4:36 pm 2
KillZoneEvent
A Minecraft Paper plugin that runs a PvP kill-streak event within a WorldGuard-defined region. The event starts automatically every configurable interval (default 5 hours) when a minimum player count (configurable, default 5) is present in the region. Players queue by entering the area, receiving a private chat message and join sound. The first player to reach the configurable kill target (default 10) wins, triggering a global broadcast announcement. The winner receives configurable rewards via a GUI menu accessible through /killzone menu. The plugin integrates with FancyHolograms to display a red dot above the current kill leader's head. All settings including region name, kill target, reward items, event interval, and minimum players are fully configurable in config.yml.
  1. Build the timed WorldGuard-region kill event with a configurable player threshold, kill goal, queue, and winner broadcast.

  2. Add configurable reward handling and an in-game menu to set the reward item.

  3. Integrate the leader marker with FancyHolograms and declare compatible plugin hooks.

Created the Bloodhunt plugin with a WorldGuard region queue, timed starts, configurable minimum players and kill goal, winner rewards, and a red leader marker through FancyHolograms.

Set event.world and event.region in config.yml to your arena’s world and WorldGuard region ID. Players queue by entering the region or using /bloodhunt join; the event starts on the configured interval when enough players are queued. Set the reward item in /bloodhunt menu by clicking the reward slot with an item on your cursor. Click with an empty cursor to clear it.

WorldGuard is required; FancyHolograms is optional. JustCombat is declared as a soft dependency, and kills are counted from standard Bukkit player-death eventsβ€”not a JustCombat-specific API. No JustCombat API documentation was available, so custom integration with its API isn’t included.

qsqu

add a thing like a timer to add it in the spawn area so players can know when the event will start just like - '&#C0C4A1Event Starts in: &f%pluginname_timeleft%'

Kodari AI
KodariNov 5 at 4:43 pm 1
  • Expose the next-start countdown as %bloodhunt_timeleft%.

  • Register it with PlaceholderAPI when available and add the optional dependency.

  • Give you the FancyHolograms text line to display it at spawn.

Added the %bloodhunt_timeleft% PlaceholderAPI placeholder. It displays the time until the next scheduled start as HH:MM:SS.

Install PlaceholderAPI alongside FancyHolograms, then add this line to your spawn hologram’s text:

YAML
- '&#C0C4A1Event Starts in: &f%bloodhunt_timeleft%'
qsqu

Can i manually start the bloodhunt ?

Kodari AI
KodariNov 5 at 4:54 pm 1

Not currently. Bloodhunt only starts on its configured schedule; /bloodhunt start isn’t implemented yet. The existing commands are /bloodhunt join, leave, status, and menu.

qsqu

there shouldn't be /bloodhunt join or leave only join and leaves based on the region if he joined the region he counts only there shouldn't be a command for that

and add /bloodhunt start and the msgs on the region shouldn't appear it should appear only at the time of the event

and when i join the arena it says You must be inside the Bloodhunt region to join when im already inside the arena that shouldn't be the case ..

also when i join and the arena or the queue start there should be effect around me like lignering potion effect but red like instant health but just around me

Kodari AI
KodariNov 5 at 5:04 pm 1
  1. Replace command-based joining/leaving with automatic queueing on WorldGuard region entry and exit, and fix the false β€œmust be inside” check.

  2. Add /bloodhunt start for a manual start.

  3. Keep event messages for event time, and add a red lingering particle effect when players enter the arena and when the queue starts.

Region entry and exit now silently add/remove players from the queue or active matchβ€”there are no /bloodhunt join or /bloodhunt leave commands. The false β€œmust be inside” check is fixed by checking the move destination and the player’s actual world.

Added admin-only /bloodhunt start; it starts immediately when enough players are queued in the region. Players get a red particle effect when they enter and when the event starts.

qsqu

Listen all good but when the player join the arena region in the normal time it shouldn't show anything no msgs no effects nothing ok ? only when the event starts only !

and the effect shouldn't disappear shortly after the player join it should last until the event start with 5 players or more

and add a /bloodhunt reload

Kodari AI
KodariNov 5 at 5:20 pm 1
  1. Make region entry silent with no particles; show the red effect only when the event starts and keep it active during the event.

  2. Add /bloodhunt reload to reload configuration and refresh the event schedule safely.

Region entry is now silent: no messages, sounds, or particles. Red particles begin when Bloodhunt starts and continue around participants until the match ends.

Added admin-only /bloodhunt reload; it reloads config.yml and resets the next scheduled start based on the configured interval.

qsqu

also it should say in the chat to the player only You've entered the bloodhunt %countremainingplayertostart% more players to start !

Kodari AI
KodariNov 5 at 5:23 pm 1
  • Send a configurable queue-entry message only to the player entering the region.

  • Replace %countremainingplayertostart% with the number still needed to meet the minimum player count.

Added a configurable messages.queue-joined message sent only to the player entering the region. %countremainingplayertostart% is replaced with how many more players are needed to reach the minimum.

qsqu

also i can't put the reward when i type /bloodhunt menu and hold the item with my mouse to put in the reward slot it doesn't work the item gets back to the slot everytime i lift it try to fix it

Kodari AI
KodariNov 5 at 5:31 pm 1
  • Keep menu clicks cancelled to prevent normal inventory transfers.

  • Apply the reward slot and cursor changes on the next server tick so the cancelled click can’t revert the display.

Fixed the reward menu: after saving the selected item, it now updates the reward slot and clears the cursor on the next tick, preventing the cancelled click from reverting the slot display.

qsqu

Good now about the '&#C0C4A1Event Starts in: &f%bloodhunt_timeleft%' it really shows the remaining time but its paused it should keep counting consistanily

Kodari AI
KodariNov 5 at 5:39 pm 1
  1. Keep the countdown based on the live next-start timestamp.

  2. Configure FancyHolograms to refresh holograms containing %bloodhunt_timeleft% every second.

Fixed: Bloodhunt now sets FancyHolograms text holograms containing %bloodhunt_timeleft% to refresh every second, so the displayed countdown keeps ticking. Keep using the same hologram line.

qsqu

Alr here's some errors 1 THE REWARD THING TO ADD ISN'T FIXED LETS MAKE IT WHEN I HOLD THE ITEM AND TYPE /bloodhunt set reward it should automatically change the reward to what i had in hand

And when i enter the arena 'not in the event time' it says You've entered the Bloodhunt! 5 more players to start! this shouldn't be the case ! cause there's no event even if players joined the arena cause its not its time

also when the event time comes announce in the chat &#8B0000&lB&#910404&ll&#960808&lo&#9C0C0C&lo&#A11010&ld&#A71414&lh&#AC1818&lu&#B21C1C&ln&#B72020&lt &#BD2424&lE&#C22828&lv&#C82D2D&le&#CD3131&ln&#D33535&lt &#D83939&lS&#DE3D3D&lt&#E34141&la&#E94545&lr&#EE4949&lt&#F44D4D&le&#FA5151&ld&#FF5555&l!

also when a player leaves the queue within the event time u should tell him just like the entry but left msg also alert the other players one player left and notify them with new number required to start after he left ..

Kodari AI
KodariNov 5 at 6:03 pm 2
  1. Add /bloodhunt set reward to save the held item.

  2. Only accept/announce queue activity during the event window; announce the event start at its scheduled time.

  3. Add the leaver’s private message and notify queued players of the updated player count.

  • Added /bloodhunt set reward: hold an item in your main hand to save it as the reward. The reward menu remains available.

  • Region entry is silent outside the event window. At the scheduled time, the requested gradient announcement is broadcast; players already inside are counted silently, and the match starts when the minimum is reached.

  • When someone leaves the queue, they get a private message and the remaining queued players are told who left and how many more are needed. This also notifies players when someone disconnects.

qsqu

also there's error in the time remaining when the event really started the count resets immedialy no it should be 00:00:00 until the match ends

also when the players ignore the event for 5 min the event should be canceled and resechulede the time

Kodari AI
KodariNov 5 at 6:04 pm 1
  1. Keep %bloodhunt_timeleft% at 00:00:00 from event start until the match ends.

  2. Cancel an unstarted event after five minutes and reschedule the next start.

%bloodhunt_timeleft% now stays at 00:00:00 throughout an active match. If the event doesn’t start within five minutes, the queue is cleared and the next event is rescheduled from then.

qsqu

no not the event doesn’t start within five minutes >> if no players entered the arena for 5 min straight the event gets canceled only

Kodari AI
KodariNov 5 at 6:07 pm 1

Updated the timeout: the event is canceled and rescheduled only after the queue has been empty for five minutes. Each new entrant resets that five-minute timer, and queued players prevent cancellation while they’re waiting.

qsqu

Exactly bravo

Kodari AI
KodariNov 5 at 6:08 pm 1

Glad that’s the behavior you wanted!

qsqu

also can the dot above the player be bigger or lets make it a symbol β–Ό like this but make a bit bigger

Kodari AI
KodariNov 5 at 6:10 pm 1

Replaced the leader marker dot with a red β–Ό and scaled it to 1.5Γ— so it’s more visible.

qsqu

few things to go the red dot above the player became so laggy it should be smooth and moving directly with the player

also the waiting effect isn't there anymore the potion effect i talked about earlier also the when the match starts there is a effect to the players remove it instead put an effect like the glowing effect not potion effect ! but just the looks of it and the one have the highest kills should be red the rest should be normal

Kodari AI
KodariNov 5 at 6:31 pm 2
  1. Make the kill-leader marker smooth and follow the player directly.

  2. Restore the waiting potion effect and remove the match-start potion effect.

  3. Show only the highest-kill player with a red visual glow; leave everyone else normal.

  1. The leader marker now refreshes every tick during the match and stops when the match ends.

  2. I’ll check the existing queue and match-start effect handling, then restore the waiting effect and remove the unwanted start effect.

  3. I’ll add a red visual glow only for the kill leader, without applying a potion effect.

The match-start red particle effect is removed. I couldn’t find the name of the waiting potion effect in the current chat, so I won’t guess; I’m making the kill leader’s outline red and visual-only now.

  • The marker now follows the leader with per-tick updates.

  • Removed the red particle effect from all players at match start. The player with the most kills gets a red glowing outline; the others aren’t given one.

  • I couldn’t find the waiting potion effect’s name in this chat. Which potion effect should players receive while queued?

qsqu

also add /bloodhunt forcestart its function is to start the bloodhunt no matter what no matter the time or not matter the count in the arena

Kodari AI
KodariNov 5 at 6:33 pm 1
  1. Add /bloodhunt forcestart with the existing command’s permission and argument conventions.

  2. Start the event immediately, bypassing both the scheduled time and minimum-player check.

Added /bloodhunt forcestart for admins. It starts Bloodhunt immediately, regardless of the schedule or minimum player countβ€”even if the arena is empty.

qsqu

also the function of the /gloodhunt start it push time to make it 0:00:0 only

Kodari AI
KodariNov 5 at 6:35 pm 1
  • Change /bloodhunt start to set the scheduled countdown to zero and open the normal event window.

  • Keep the minimum-player requirement; only /bloodhunt forcestart bypasses it.

  • Show 00:00:00 during the event window, then let the existing timeout/reschedule behavior continue.

/bloodhunt start now sets the countdown to 00:00:00 and opens the normal event window; it does not bypass the minimum-player requirement. Use /bloodhunt forcestart to start regardless of player count.

qsqu

the player in queue has no effect at all what's wrong ? fix that also remove the dot tag its not needed anymore since we have the glowing effect but its not red can u make it red ?

Kodari AI
KodariNov 5 at 6:48 pm 2
  1. Trace and fix why queued players aren’t receiving the waiting effect.

  2. Remove the obsolete dot tag.

  3. Make the kill leader’s glow red.

The queue effect was never being applied. I’ve wired a configurable SPEED potion effect into every queue-entry path and restore any prior Speed effect when players leave or the match starts. Next I’m removing the obsolete marker and fixing the leader outline color.

The queue effect was missing because no code applied a potion effect when players joined the queue. Queue players now receive the configurable SPEED effect, and their previous Speed effect is restored when they leave or the match starts.

I also removed the floating dot marker and its update task. The kill leader’s glow is now red on each viewer’s scoreboard, including custom scoreboards that were ignoring the old color setting.

qsqu

not speed but instant health ingering effect is i mentioned !

Kodari AI
KodariNov 5 at 6:50 pm 1

I’ll replace the queue’s Speed effect with the requested Instant Health effect and check the existing effect settings before patching.

Changed the queue effect to INSTANT_HEALTH. Note that Instant Health heals immediately; it doesn’t linger as a continuous potion effect.

qsqu

now if i killed like 7 and no one comes more like for 10 mins straight what happens i just wait forever?

Kodari AI
KodariNov 5 at 6:53 pm 1

Yes. Once the match is active, the five-minute empty-queue cancellation no longer applies. With 7 kills, you’ll keep waiting until someone reaches the kill goal or leaves the arena; there’s no timeout for an active match.

qsqu

what do u suggest we add on this matter?

Kodari AI
KodariNov 5 at 6:54 pm 1

I’d add a match inactivity timeout: if no one gets a kill for 5 minutes, end the match and declare the player with the most kills the winner. If it’s tied, declare a draw. That way an active match can’t leave players waiting indefinitely, while a match with ongoing action continues normally.

qsqu

Yes but with less reward like half the prize maybe

Kodari AI
KodariNov 5 at 7:00 pm 1
  1. Trace the match-end, inactivity, and prize payout logic.

  2. Add a 5-minute no-kill timeout that awards the leader half the normal prize; ties remain a draw.

[Generation stopped]

qsqu

Add a 5-minute no-kill timeout that awards the half prize

add a manual /bloodhunt set halfreward also hold the item and type it

Kodari AI
KodariNov 5 at 7:02 pm 1
  1. Add a 5-minute no-kill timeout that ends the match and awards the leader half the configured prize.

  2. Add /bloodhunt set halfreward, using the item in the admin’s hand as the reward.

[Generation stopped]

qsqu

Trace the match-end, inactivity

Add a 5-minute no-kill timeout that ends the match and awards the leader half the configured prize.

Add /bloodhunt set halfreward, using the item in the admin’s hand as the reward.

Kodari AI
KodariNov 5 at 7:04 pm 1
  1. Trace match lifecycle, kill tracking, and reward payout; add a five-minute no-kill finish with half reward.

  2. Add /bloodhunt set halfreward to save the admin’s held item as that reward.

Added a five-minute no-kill timeout. It ends the match and gives the online player with the most kills the configured half-reward item; if nobody has a kill, the match ends without a winner or reward.

Added /bloodhunt set halfreward: hold the desired item and run the command to save it. Configure this item before the timeout occurs.

qsqu

Can we add firework effect to winner like colorful star firework ?

Kodari AI
KodariNov 5 at 7:05 pm 1

Added a colorful star firework for the winner after a regular Bloodhunt win or a 5-minute inactivity timeout. It uses multiple colors, flicker, and a trail.

qsqu

i gave the player the potion itself !!!!?

Kodari AI
KodariNov 5 at 7:11 pm 1

[Generation stopped]

qsqu

i put it to the test the player in the waiting should not have the potion function effect itself no ! just the effect the look only !! when u through the potion

Kodari AI
KodariNov 5 at 7:14 pm 1
  • Remove all potion-effect application and restoration for queued players.

  • Show only Instant Health-colored potion particles around queued players, refreshed each manager tick.

  • Keep the visual limited to players currently in the queue.

Removed the actual Instant Health potion effect. Players waiting in the queue now only see red Instant Health-style particles around them; no potion effect is applied.

qsqu

make it 3 rocket lunch at the same time not one

Kodari AI
KodariNov 5 at 7:20 pm 1

I’ll update the winner effect to launch three colorful star fireworks together instead of one.

The winner effect now launches three colorful star fireworks at the same time.

qsqu

add /bloodhunt cancel/stop also if a players from the same team get abuse the kill count this shouldn't be count we use justteams for this also the system should not count the kill of the same person twice it should be a different player this only applies to the current match and the data of the match resets after it ends

Kodari AI
KodariNov 5 at 7:40 pm 1
  1. Add /bloodhunt cancel and /bloodhunt stop to safely end an active event.

  2. Prevent repeat kills by the same player and kills between teammates, with match-only tracking reset at the end.

Added /bloodhunt cancel and /bloodhunt stop; either ends the event or entry window without awarding a prize and resets the schedule.

Kills from the same Bukkit scoreboard team are ignored, and each killer can only earn credit for killing a given player once per match. That tracking resets when a match starts or ends. This team check works if JustTeams exposes its teams through Bukkit scoreboards; its API isn’t available in the project’s references, so I couldn’t verify whether it does.

qsqu

so u still need something for justteams in order to prevent teammate kills ?

Kodari AI
KodariNov 5 at 7:45 pm 1

Yesβ€”if you want teammate kills reliably blocked using JustTeams’ actual team membership, I need to confirm how JustTeams exposes that data (its API or another supported integration). The current check only looks at Bukkit scoreboard teams, so it will work only if JustTeams also puts players on those teams.

qsqu

justteams have the team tag on scoreboard and on tap also if a player is on the same team

Kodari AI
KodariNov 5 at 7:46 pm 1

That confirms it: if JustTeams assigns teammates to the same Bukkit scoreboard team, the check we added will ignore their kills. No separate JustTeams API is needed. The visible tag alone wouldn’t be enough if it were only text, but shared scoreboard-team membership is.

qsqu

ok compile and that's it

Kodari AI
KodariNov 5 at 7:47 pm 1

Click Compile in the top bar, then Compile in the window. When it succeeds, click Download to get the plugin jar.

qsqu

Bloodhunt could not start: 1/5 players are queued in the region. this msg shouldn't be exist nor broadcasted

also the potion effect look should be conistant not inconistant

also when u kill the same player twice u should notifiy the killer that it won't count and type the reason same thing for team member

Kodari AI
KodariNov 5 at 7:59 pm 1
  1. Remove the queued-player minimum-count message/broadcast.

  2. Make the queue’s visual particle effect consistent.

  3. Notify killers when repeat or teammate kills don’t count, including the reason.

  • Removed the minimum-player failure broadcast and its config message; the minimum-player start check still works.

  • Queue particles now refresh every 2 ticks for a steadier visual, without applying a potion effect.

  • Teammate kills and repeat kills won’t count. The killer now gets a message explaining why, including on existing configs that don’t have the new message settings yet.

qsqu

what is the msg for explantion ?

Kodari AI
KodariNov 5 at 8:00 pm 1

The messages are:

  • Teammate kill: β€œThis kill will not count: the player you killed is on your team.”

  • Same player killed again: β€œThis kill will not count: you already received credit for killing this player during this match.”

qsqu

there's a bug that need to be fixed when a player leaves the area through /spawn or any other way than actially steps on the outline of arena the effect sticks and the system still count it as player in the queue ?!?!

Kodari AI
KodariNov 5 at 8:08 pm 1
  • Reconcile queued players and match participants against the configured WorldGuard region every particle refresh.

  • Remove players who are offline or outside, clear their queued particles, and exclude them from the active match.

Fixed: every 2 ticks, Bloodhunt now checks queued players and match participants against the arena. Players who leave by /spawn, teleport, or other means are removed, their queue particles stop, and they no longer count in the match.

qsqu

also the effect of the waiting the particals i mean it a bit too much can u make it less?

Kodari AI
KodariNov 5 at 8:10 pm 1
  • Reduce the particle count per refresh while keeping the same visual style and refresh timing.

Reduced the waiting-area particles from 8 to 3 per refresh. The visual style and refresh timing stay the same.

qsqu

Ok when a 5 players enter the match finally there's a waiting time this time should be filled with title to the player title player title countdown to 5 then the match actually finally start and the countdown sound with every countdown should be a sound

Kodari AI
KodariNov 5 at 8:14 pm 1
  • Start a five-second countdown when the queued players reach the configured minimum.

  • Show each countdown number as a title and play a sound for queued players.

  • Cancel the countdown if the queue drops below the minimum; begin the match after β€œ1.”

When the queue reaches the configured minimum, queued players now see a title countdown from 5 to 1, with a sound on each number. The match starts after the countdown; if the queue falls below the minimum, the countdown is canceled.

qsqu

there's bug when 5 players enters the arena nothing happens the game doesn't actually start and the countdown title isn't there /title player title 5,4,3,2,1

Kodari AI
KodariNov 5 at 8:25 pm 1
  • Make the once-per-second tick start/recover the countdown whenever enough eligible players are queued, so it can’t get stuck waiting for a join event.

  • Keep the countdown titles visible as 5, 4, 3, 2, 1 before starting.

Fixed the countdown recovery: the once-per-second tick now starts it whenever five eligible players are queued, even if the normal join trigger was missed. It shows 5, 4, 3, 2, 1 and starts the match; if starting fails while five players are still eligible, it retries the countdown.

qsqu

the teammate kills still counts we need to fix that %justteams%

add feature /bloodhunt ignore antiabuse which disable both the teammate kills and repeat kills and actually count them

Kodari AI
KodariNov 5 at 8:41 pm 1
  1. Fix teammate detection using JustTeams’ %justteams% placeholder.

  2. Add /bloodhunt ignore antiabuse to toggle teammate and repeat-kill checks and counting.

Fixed teammate detection to compare the %justteams% value through PlaceholderAPI, with the scoreboard check as a fallback.

Added admin command /bloodhunt ignore antiabuse. It toggles both teammate-kill and repeat-kill checks; while disabled, those kills count. The setting resets when the server restarts.

qsqu

add /bloodhunt enable antiabuse

also here's the justteams placholders api file if that gonna help you

πŸ“Ž 1 file 9,844 chars
πŸ“„
pasted-code-1793911359959.txt
txt 323 lines
β–Ά
# ╔══════════════════════════════════════════════════════════════════════════╗
# β•‘  justTeams Β· placeholders.yml                                            β•‘
# β•‘                                                                          β•‘
# β•‘  PlaceholderAPI output and formatting for team names, tags and stats.    β•‘
# β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

placeholders-version: 5

# JustTeams Placeholder Configuration
# Placeholder configuration for JustTeams

# ────────────────────────────────────────────────────────────────────────────
# ADMIN CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
admin:
  # Admin action icons
  config_updated_icon: "βš™ "
  database_connected_icon: "πŸ”— "
  database_error_icon: "⚠ "
  force_disbanded_icon: "πŸ’₯ "
  force_kicked_icon: "πŸ‘’ "
  plugin_reloaded_icon: "πŸ”„ "
  
  # Admin GUI formatting
  back_button: "← Back to Team List"
  click_format: "Click to manage this team"
  disband_warning: "⚠ DISBAND TEAM ⚠"
  manage_title_format: "Manage: %team%"
  members_format: "Members: %count%"
  owner_format: "Owner: %owner%"
  team_name_format: "%team%"

# ────────────────────────────────────────────────────────────────────────────
# COLORS CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
colors:
  # Primary brand colors
  accent: "#FFD700"
  primary: "#4C9DDE"
  secondary: "#4C96D2"
  
  # Status colors
  error: "#FF4444"
  info: "#00BFFF"
  success: "#00FF00"
  warning: "#FFA500"
  
  # Background colors
  background_accent: "#3C3C3C"
  background_primary: "#2C2C2C"
  background_secondary: "#1A1A1A"
  
  # Text colors
  text_disabled: "#666666"
  text_muted: "#888888"
  text_primary: "#FFFFFF"
  text_secondary: "#CCCCCC"

# ────────────────────────────────────────────────────────────────────────────
# DATE & TIME CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
date_time:
  join_date_format: "dd MMM yyyy"
  timezone: "UTC"
  unknown_date: "Unknown"

# ────────────────────────────────────────────────────────────────────────────
# ECONOMY CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
economy:
  currency_symbol: "$"
  deposit_label: "Deposit"
  transfer_label: "Transfer"
  withdraw_label: "Withdraw"

# ────────────────────────────────────────────────────────────────────────────
# ENDER CHEST CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
ender_chest:
  available_icon: "βœ“ "
  locked_icon: "πŸ”’ "

# ────────────────────────────────────────────────────────────────────────────
# ERROR ICONS & MESSAGES
# ────────────────────────────────────────────────────────────────────────────
errors:
  already_in_team_icon: "πŸ‘₯ "
  command_not_found_icon: "❓ "
  insufficient_rank_icon: "🚫 "
  invalid_characters_icon: "⚠ "
  invalid_input_icon: "❌ "
  name_too_long_icon: "πŸ“ "
  name_too_short_icon: "πŸ“ "
  no_permission_icon: "πŸ”’ "
  player_not_in_team_icon: "πŸ‘€ "
  profanity_detected_icon: "🚨 "
  team_name_taken_icon: "πŸ“ "
  team_not_found_icon: "πŸ” "
  team_tag_taken_icon: "🏷 "
  unknown_error_icon: "❌ "

# ────────────────────────────────────────────────────────────────────────────
# GUI CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
gui:
  # Border and fill items
  border_item: "GRAY_STAINED_GLASS_PANE"
  border_name: " "
  
  # Navigation icons
  back_icon: "← "
  close_icon: "βœ— "
  next_icon: "β†’ "
  previous_icon: "← "
  
  # Status icons
  error_icon: "βœ— "
  loading_icon: "⏳ "
  no_data_icon: "β—‹ "

# ────────────────────────────────────────────────────────────────────────────
# HOME TELEPORTATION CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
home:
  cooldown_icon: "⏰ "
  warmup_icon: "⏳ "

# ────────────────────────────────────────────────────────────────────────────
# JOIN REQUESTS CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
join_requests:
  no_requests_icon: "β—‹ "
  requests_pending_icon: "πŸ“‹ "

# ────────────────────────────────────────────────────────────────────────────
# NUMBERS & FORMATTING
# ────────────────────────────────────────────────────────────────────────────
numbers:
  # Currency formatting
  currency_format: "#,##0.00"
  currency_symbol: "$"
  
  # Large number abbreviations
  billion: "B"
  million: "M"
  thousand: "K"
  
  # Percentage formatting
  percentage_format: "#.##%"

# ────────────────────────────────────────────────────────────────────────────
# PLATFORM INDICATORS CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
platform:
  # Java Edition indicator
  java:
    enabled: true
    color: "#00FF00"
    icon: "[JE]"
    format: " <#00FF00>[JE]"
  
  # Bedrock Edition indicator
  bedrock:
    enabled: true
    color: "#00D4FF"
    icon: "[BE]"
    format: " <#00D4FF>[BE]"
  
  # Show platform indicators in GUIs and chat
  show_in_gui: true
  show_in_chat: true
  show_gamertags: true

# ────────────────────────────────────────────────────────────────────────────
# PLAYER ROLES CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
roles:
  co_owner:
    color: "#FF6B6B"
    icon: "β—† "
    name: "Co-Owner"
    priority: 2
  
  member:
    color: "#FFFFFF"
    icon: "● "
    name: "Member"
    priority: 3
  
  owner:
    color: "#FFD700"
    icon: "β˜… "
    name: "Owner"
    priority: 1

# ────────────────────────────────────────────────────────────────────────────
# SORTING CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
sort:
  alphabetical:
    icon: ""
    name: "Alphabetical"
  
  join_date:
    icon: ""
    name: "Join Date"
  
  online_status:
    icon: ""
    name: "Online Status"
  
  # Prefixes for selected/unselected items
  selected_prefix: "β–ͺ "
  unselected_prefix: "β–ͺ "

# ────────────────────────────────────────────────────────────────────────────
# STATUS INDICATORS
# ────────────────────────────────────────────────────────────────────────────
status:
  offline:
    color: "#FF4444"
    icon: "● "
  
  online:
    color: "#00FF00"
    icon: "● "
  
  pvp_disabled:
    color: "#FF4444"
    icon: "βš” "
  
  pvp_enabled:
    color: "#00FF00"
    icon: "βš” "

# ────────────────────────────────────────────────────────────────────────────
# SUCCESS ICONS & MESSAGES
# ────────────────────────────────────────────────────────────────────────────
success:
  action_completed_icon: "βœ… "
  data_updated_icon: "πŸ’Ύ "
  member_updated_icon: "πŸ‘€ "
  settings_saved_icon: "βš™ "
  settings_updated_icon: "πŸ”§ "
  team_updated_icon: "πŸ›‘ "

# ────────────────────────────────────────────────────────────────────────────
# TEAM CHAT CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
team_chat:
  character_prefix: "#"
  character_required_space: false

# ────────────────────────────────────────────────────────────────────────────
# TEAM DISPLAY CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
team_display:
  # Team display format for %justteams_display% placeholder
  # Placeholders: %team_name%, %team_tag%, %team_color%, %team_icon%
  format: ""
  
  # Fallback when player is not in a team
  no_team: "No Team"
  
  # Display options
  show_icon: true
  show_name: false
  show_tag: true
  
  # Team color configuration
  team_color: "#4C9DDE"
  
  # Team icon configuration
  team_icon: "βš” "
  
  # Team tag formatting
  tag_color: "#FFD700"
  tag_prefix: "["
  tag_suffix: "]"

# ────────────────────────────────────────────────────────────────────────────
# TEAM MANAGEMENT CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
team_management:
  # Member action icons
  member_demoted_icon: "↓ "
  member_joined_icon: "+ "
  member_kicked_icon: "πŸ‘’ "
  member_left_icon: "- "
  member_promoted_icon: "↑ "
  
  # Invitation icons
  invitation_accepted_icon: "βœ“ "
  invitation_declined_icon: "βœ— "
  invitation_sent_icon: "β†’ "

# ────────────────────────────────────────────────────────────────────────────
# WARPS CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
warps:
  password_protected_label: "πŸ”’ Password Protected"
  private_label: "πŸ”’ Private"
  public_label: "🌐 Public"

# ────────────────────────────────────────────────────────────────────────────
# FEATURE COSTS & RESTRICTIONS CONFIGURATION
# ────────────────────────────────────────────────────────────────────────────
restrictions:
  # Feature cost display
  economy_cost_format: "$"
  items_cost_format: "x "
  feature_disabled_icon: "🚫 "
  feature_enabled_icon: "βœ… "
  
  # World restriction display
  disabled_worlds_format: "Disabled in: "
  enabled_worlds_format: "Available in: "
  
  # Cost breakdown display
  cost_breakdown_header: "Cost Breakdown:"
  no_cost_label: "Free"
  total_cost_format: "Total: "
Kodari AI
KodariNov 5 at 8:43 pm 1
  • Add /bloodhunt enable antiabuse as an explicit, idempotent way to turn teammate/repeat-kill prevention back on.

  • Include the new subcommand in command usage.

Added /bloodhunt enable antiabuse. It explicitly re-enables teammate and repeat-kill prevention; /bloodhunt ignore antiabuse remains the toggle to disable or re-enable it.

The attached placeholders.yml configures team display formatting, but doesn’t specify the PlaceholderAPI placeholder for identifying a player’s team.

qsqu

which file should i provide maybe config ?

Kodari AI
KodariNov 5 at 8:43 pm 1

Not another config fileβ€”the one you attached only controls formatting. Please provide the JustTeams API file or documentation that shows how to get a player’s team. If you don’t have that, send the exact JustTeams version and the team placeholder name it provides (if known).

qsqu
πŸ“Ž 1 file 26,360 chars
πŸ“„
pasted-code-1793911499848.txt
txt 732 lines
β–Ά
# ╔══════════════════════════════════════════════════════════════════════════╗
# β•‘  justTeams Β· config.yml                                                  β•‘
# β•‘                                                                          β•‘
# β•‘  Main plugin settings: teams, creation, bank, homes, warps, cross-server β•‘
# β•‘  sync and performance. Every option is documented below.                 β•‘
# β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

# Configuration version - DO NOT MODIFY
config-version: 36

# ────────────────────────────────────────────────────────────────────────────
#                         Proxy Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure cross-server functionality for network setups.
# Supports BungeeCord, Velocity, and Waterfall proxies.
#
proxy_settings:
  # Proxy type selection
  # Options: "NONE", "BUNGEE", "VELOCITY"
  type: "VELOCITY"

# ────────────────────────────────────────────────────────────────────────────
#                        Database Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Choose your preferred storage method for team data.
# H2 is recommended for single servers, MySQL for networks.
#
storage:
  # Database type: "h2", "mysql", "mariadb"
  type: "mariadb"

  # MySQL/MariaDB Settings
  mysql:
    host: "178.63.186.241"
    port: 3306
    database: "s1_clans"
    username: "u1_aq0dwx3uKh"
    password: "NS+0ctLk!QA^nEJeMeq.h6b3"
    
    # Connection security
    use_ssl: false
    allow_public_key_retrieval: true
    use_unicode: true
    character_encoding: "utf8mb4"
    collation: "utf8mb4_unicode_ci"
    
    # Connection timeouts (milliseconds)
    connection_timeout: 30000
    socket_timeout: 60000
    auto_reconnect: true
    fail_over_read_only: false
    max_reconnects: 3

    # Connection Pool Settings (Optimized for both H2 and MySQL)
  connection_pool:
    # H2 defaults: max_size=4, min_idle=1
    # MySQL defaults: max_size=10, min_idle=3  
    max_size: 10
    min_idle: 3
    
    # Timeouts in milliseconds
    idle_timeout: 300000          # 5 minutes
    max_lifetime: 1800000         # 30 minutes
    connection_timeout: 30000     # 30 seconds (match MySQL timeout)
    validation_timeout: 5000      # 5 seconds
    
    # Connection testing
    connection_test_query: "SELECT 1"
    
    # Leak detection (0 = disabled, >0 = milliseconds before leak warning)
    leak_detection_threshold: 0

# ────────────────────────────────────────────────────────────────────────────
#                         Redis Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Redis provides instant cross-server messaging (< 100ms latency).
# When enabled, Redis handles real-time updates while MySQL stores data.
# If Redis fails, the plugin automatically falls back to MySQL polling.
#
redis:
  # Enable Redis for instant cross-server communication
  # Set to 'false' to use only MySQL (1-second polling)
  enabled: true
  
  # Redis server connection details
  host: "178.63.186.241"
  port: 6381
  
  # Authentication (leave empty if not required)
  password: ""
  
  # SSL/TLS encryption for Redis connection
  use_ssl: false
  
  # Connection timeout in milliseconds
  # Lower values fail faster, higher values tolerate network delays
  timeout: 5000
  
  # Connection pool settings
  pool:
    # Maximum total connections in pool
    max_total: 30
    
    # Maximum idle connections to keep open
    max_idle: 10
    
    # Minimum idle connections to maintain
    min_idle: 2

# ────────────────────────────────────────────────────────────────────────────
#                        Feature Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Enable or disable specific features to customize functionality.
# Each feature can be toggled independently.
#
features:
  # Core Team Management
  team_creation: true
  team_disband: true
  team_invites: true
  team_join_requests: true
  team_blacklist: true
  team_transfer: true
  team_public_toggle: true
  team_rename: true
  
  # Member Management
  member_kick: true
  member_promote: true
  member_demote: true
  member_leave: true
  
  # Information Features
  team_info: true
  team_tag: true
  team_description: true
  team_leaderboard: true
  
  # Home System
  team_home: false
  team_home_set: false
  team_home_teleport: false
  
  # Warp System
  team_warps: false
  team_warp_set: false
  team_warp_delete: false
  team_warp_teleport: false
  
  # PvP Features
  team_pvp: false
  team_pvp_toggle: false
  
  # Economy Features (Requires Vault)
  team_bank: false
  team_bank_deposit: false
  team_bank_withdraw: false
  
  # Storage Features
  team_enderchest: false
  
  # Communication Features
  team_chat: true
  team_message_command: true
  
  # Visual Features
  team_glow: false
  
  # Cross-Server Display
  show_cross_server_status: true

# ────────────────────────────────────────────────────────────────────────────
#                          General Settings
# ────────────────────────────────────────────────────────────────────────────
#
# Core plugin settings affecting overall behavior.
#
settings:
  # Debug Options
  debug: false

  # Which name to show for players in menus, member lists and team heads.
  # Leave empty to use the real Minecraft username (default).
  # Set a PlaceholderAPI placeholder to use that instead, for example: '%cmi_user_nickname%'
  # If PlaceholderAPI is missing or the placeholder has no value, the real username is used.
  player_name_placeholder: '%phoenix_player_name%'

  # Per-player language / localization.
  #   default: the language code served from messages.yml (your base file).
  # Additional languages live in the lang/ folder as lang/.yml (e.g. lang/es.yml).
  # Any message a translation file is missing falls back to messages.yml, so partial
  # translations never break. Players pick their language with /team usersettings.
  #
  # autocomplete_files: when true, on load every lang/.yml is filled with any keys
  #   it is missing (copied from messages.yml) so each file always holds the complete key
  #   set, ready to translate. The server log reports how many keys each language still
  #   has in the base language. Set false to leave your language files untouched.
  language:
    default: en
    autocomplete_files: true

  # Server Configuration
  # single_server_mode: Set to true if you have only ONE server
  #   - Disables cross-server features for better performance
  #   - Use with H2 database for standalone servers
  # Set to false for multi-server networks with MySQL
  single_server_mode: false
  
  # server-identifier: Unique name for this server in your network
  #   - Must be different for each server (e.g., "survival", "creative", "lobby")
  #   - Only used when single_server_mode is false
  #   - Used to track which server players are on
  server-identifier: "lobby1"
  
  # Theme Colors
  main_color: "#4C9DDE"
  accent_color: "#FFD700"
  currency_format: ""
  
  # Team Glow Settings
  # owner: Dark Red (DARK_RED)
  # co_owner: Red (RED) - optional, falls back to mod if not set or similar
  # mod: Dark Green (DARK_GREEN)
  # member: White (WHITE)
  glow:
    enabled: false
    colors:
      owner: "DARK_RED"
      co_owner: "RED"
      mod: "DARK_GREEN"
      member: "WHITE"
    # If true, you can only see the glow of your OWN team members.
    # If false, you see everyone's glow (if they are in a team).
    only_show_own_team: true
    # Maximum distance (in blocks) to see the glow. Default: 30
    range: 30
    # Interval (in ticks) to check for glow updates. Default: 20 (1 second)
    check_interval: 20

  # Show in-game notification to admins when PacketEvents is missing
  # Set to false to disable the in-game reminder
  notify-missing-packetevents: true

  # --- bStats Metrics ---
  # bStats collects some anonymous data for plugin authors like server version, number of players, etc.
  # To see what data is collected, go to https://bstats.org/what-is-collected/
  # You can disable this here if you wish.
  bstats:
    enabled: false

  # --- FastStats Metrics ---
  # FastStats provides detailed plugin analytics and error tracking.
  # See https://faststats.dev/ for more information.
  # You can disable this here if you wish.
  faststats:
    enabled: false

  # Team Limits
  max_team_size: 50

  # Permission-based team sizes
  # Permission format: justteams.team.size.
  # The highest permission value will be used
  # If disabled or no permission found, uses max_team_size above
  permission_based_team_size: true

  min_name_length: 3
  max_name_length: 16
  max_tag_length: 6
  max_description_length: 64

  allow_formatting_codes: true
  blocked_formatting_codes:
    - "&k"
    - "&l"
    - "&m"
    - "&n"
    - "&o"

  rename_cooldown: 604800

  default_pvp_status: true
  default_public_status: false

  # Team Creation Settings
  creation:
    require_color: false
    default_color: ""
    use_gui_color_selection: true
    tag_optional: false
    # Description shown for a team until the owner sets one with /team setdesc.
    # Supports MiniMessage formatting. Applies to existing teams that never set a description too.
    default_description: "A new Team!"
    # Allow Unicode letters and digits (accents, Cyrillic, CJK, and so on) in team tags and names.
    # When false (default) tags and names stay ASCII letters/digits only. Symbols, spaces and
    # formatting characters are never allowed either way. On MySQL/MariaDB you need a utf8mb4
    # database/table charset for non-Latin characters to store correctly.
    allow_unicode: false
    # Allow Private Use Area characters (U+E000-U+F8FF) in team tags and names. These are the
    # codepoints resource packs use for custom glyphs/icons, so turn this on if your pack adds
    # icons you want players to use. Players without your resource pack see an empty box instead,
    # and each glyph still counts toward max_tag_length / max_name_length.
    # Set per context, so you can allow icons in tags while keeping names plain (or the reverse).
    # Independent of allow_unicode. Formatting characters can never be used either way.
    allow_custom_glyphs:
      tag: false
      name: false
    # Allow spaces in team names. When true, /team create   lets the name contain spaces
    # (e.g. "The Salty Crew"). When false, names must be a single word (letters, digits, underscore).
    # The tag always comes first either way, and teams can be referenced by their tag.
    allow_spaces_in_name: true

  # Cross-Server Synchronization (requires single_server_mode: false and MySQL)
  enable_cross_server_sync: true

  sync_optimization:
    heartbeat_interval: 600
    cross_server_sync_interval: 3
    critical_sync_interval: 1
    max_teams_per_batch: 100
    enable_lazy_loading: true
    team_cache_ttl: 1200
    enable_optimistic_locking: true
    max_sync_retries: 2
    sync_retry_delay: 1000
    max_batch_size: 500
    cache_cleanup_interval: 900
    async_database_operations: true
    bulk_operation_batch_size: 200
    connection_validation_interval: 60
    heartbeat_batch_size: 1
    enable_connection_pooling: true

  performance:
    enable_metrics: false
    log_slow_queries: true
    slow_query_threshold: 50
    detailed_sync_logging: false
    monitor_connection_pool: false
    connection_pool_log_interval: 60
    enable_debug_logging: false
    gui_update_throttle_ms: 100
    max_concurrent_db_operations: 5

# ────────────────────────────────────────────────────────────────────────────
#                        Team Tier Upgrade System
# ────────────────────────────────────────────────────────────────────────────
#
# Teams start at tier 1 and can spend bank money to progress through
# tiers. Each tier unlocks larger teams, a bigger ender chest, and
# small combat perks.
#
# Security guarantees (enforced in code, NOT just config):
#   - damage_bonus_percent is hard capped at 15% regardless of config
#   - max_members hard cap is 100
#   - enderchest_rows hard cap is 6 (Minecraft limit)
#   - home_cooldown_reduction_percent hard cap is 75%
#   - max tier hard cap is 10
#
# Only the team OWNER can purchase upgrades. Upgrades deduct from the
# team bank. Skipping tiers is not allowed - each upgrade steps +1.
# ────────────────────────────────────────────────────────────────────────────
team_upgrades:
  # Set to false to disable tier upgrades entirely. When disabled:
  #   - All teams stay at tier 1 with base stats
  #   - The Upgrades button is hidden in the team GUI
  #   - Ender chest falls back to settings.team_ender_chest.rows
  #   - Max team size falls back to settings.max_team_size / permissions
  enabled: true

  # What currency team tier upgrades are paid with:
  #   money  - charge the team bank balance (Vault). Uses each tier's 'cost'.
  #   points - charge the team's points. Uses each tier's 'points_cost'.
  #   both   - require BOTH: the team must have enough money AND enough points,
  #            and both are charged. If one deduction fails the other is refunded.
  cost_type: points

  tiers:
    1:
      # Tier 1 is the starting tier. Cost is ignored (you start here for free).
      max_members: 10
      enderchest_rows: 3
      damage_bonus_percent: 0
      home_cooldown_reduction_percent: 0
      cost: 0
      points_cost: 0
    2:
      max_members: 12
      enderchest_rows: 4
      damage_bonus_percent: 0
      home_cooldown_reduction_percent: 10
      cost: 10000
      points_cost: 100
    3:
      max_members: 15
      enderchest_rows: 5
      damage_bonus_percent: 0
      home_cooldown_reduction_percent: 20
      cost: 50000
      points_cost: 500
    4:
      max_members: 20
      enderchest_rows: 6
      damage_bonus_percent: 0
      home_cooldown_reduction_percent: 30
      cost: 150000
      points_cost: 1500
    5:
      max_members: 25
      enderchest_rows: 6
      damage_bonus_percent: 0
      home_cooldown_reduction_percent: 50
      cost: 500000
      points_cost: 5000

# ────────────────────────────────────────────────────────────────────────────
#                        Team PvP Settings
# ────────────────────────────────────────────────────────────────────────────
team_pvp:
  # Cooldown in seconds between PvP status toggles (per team)
  # Set to 0 to disable the cooldown
  # Bypass with justteams.bypass.pvp.cooldown permission
  toggle_cooldown: 300

  # Disable flight when a player takes damage from another player
  # Applies to all players, not just team members
  # Works with both elytra and creative/gamemode fly
  disable_fly_on_combat: false

# ────────────────────────────────────────────────────────────────────────────
#                        Broadcast Settings
# ────────────────────────────────────────────────────────────────────────────
#
# Control server-wide announcements for team events.
#
broadcasts:
  team-created: false
  team-disbanded: false

# ────────────────────────────────────────────────────────────────────────────
#                        Team Chat Settings
# ────────────────────────────────────────────────────────────────────────────
#
# Configure the team chat system.
# When character_enabled is true, players can prefix messages with the character to send team chat
# Set character to a symbol like "#" or "!" 
# IMPORTANT: Never leave character empty ("") as it will capture ALL messages!
#
team_chat:
  character_enabled: true
  character: "#"  # Use # prefix for team chat (e.g., "#hello team")
  require_space: false  # If true, requires space after character (e.g., "# hello team")

# ────────────────────────────────────────────────────────────────────────────
#                        Home Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure team home teleportation system.
#
team_home:
  warmup_seconds: 5
  cooldown_seconds: 300

# ────────────────────────────────────────────────────────────────────────────
#                        Warp Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure the team warp system.
#
team_warps:
  max_warps: 5
  warmup_seconds: 5
  cooldown_seconds: 300

# ────────────────────────────────────────────────────────────────────────────
#                        Bank Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure the team banking system (requires Vault).
#
team_bank:
  enabled: false
  max_balance: 1000000.0

# ────────────────────────────────────────────────────────────────────────────
#                     Ender Chest Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure the shared team ender chest.
#
team_enderchest:
  enabled: false
  rows: 3

# ────────────────────────────────────────────────────────────────────────────
#                      Team Allies Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure the team alliance system.
# Allows teams to form alliances with other teams.
#
team_allies:
  enabled: true
  max_allies: 3
  # Allow teams to toggle accepting join requests
  allow_request_toggle: true

# ────────────────────────────────────────────────────────────────────────────
#                    World Restrictions Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure per-world feature restrictions.
# Features can be disabled in specific worlds to prevent abuse.
#
# Available features to restrict:
#   - sethome: Prevents setting team home in specified worlds
#   - setwarp: Prevents creating team warps in specified worlds
#   - home: Prevents teleporting to team home from specified worlds
#   - warp: Prevents teleporting to team warps from specified worlds
#   - enderchest: Prevents accessing team ender chest in specified worlds
#   - bank: Prevents using team bank in specified worlds
#
world_restrictions:
  enabled: true
  
  # List of worlds where specific features are disabled
  # Add world names exactly as they appear in your server
  disabled_worlds:
    # Prevent ender chest access in dangerous worlds
    enderchest:
      - "world_nether"
      - "world_the_end"
    # Prevent setting home in PvP/event worlds
    sethome:
      - "pvp_world"
      - "event_world"
    # Prevent creating warps in PvP/event worlds
    setwarp:
      - "pvp_world"
      - "event_world"
    # Prevent teleporting home from PvP/event worlds
    home:
      - "pvp_world"
      - "event_world"
    # Prevent teleporting to warps from PvP worlds
    warp:
      - "pvp_world"
    # Prevent bank access in creative worlds
    bank:
      - "creative_world"

# ────────────────────────────────────────────────────────────────────────────
#                      Feature Costs Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure costs for using team features.
# Supports both Vault economy and item-based costs.
#
feature_costs:
  enabled: false
  
  # Economy costs (requires Vault)
  economy:
    enabled: false

    # Cost for these admin-only actions. The per-team actions (sethome, home,
    # enderchest, setwarp, warp, bank_deposit, bank_withdraw) are configured under
    # the 'clan-settings' section at the bottom of this file instead.
    team_creation: 0.0
    team_join: 0.0        # Cost for joining a team (invite accept, public join, join request accept)
    rename: 0.0

  # Permission-based join fees
  # When enabled, players can have different join fees based on permissions
  # Permission format: justteams.joinfee.
  # Example: justteams.joinfee.500 means player pays $500 to join any team
  # The highest permission value will be used
  # If disabled or no permission found, uses team_join cost above
  permission_based_join_fee:
    enabled: false
    max_fee: 10000.0      # Maximum join fee cap (prevents excessive permissions)
  
  # Item costs
  items:
    enabled: false
    
    # Item costs for each feature (format: "MATERIAL:AMOUNT")
    team_creation:
      - "DIAMOND:4"
    sethome:
      - "DIAMOND:2"
      - "EMERALD:1"
    home:
      - "ENDER_PEARL:1"
    enderchest:
      - "ENDER_CHEST:1"
    setwarp:
      - "DIAMOND:5"
      - "GOLD_INGOT:10"
    warp:
      - "GOLD_INGOT:2"
    
    # Whether to consume items on use (true) or just require them in inventory (false)
    consume_on_use: true

# ────────────────────────────────────────────────────────────────────────────
#                        Effects Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Configure sound and particle effects.
#
effects:
  sounds:
    enabled: true
    
    # General Sounds
    success: "BLOCK_NOTE_BLOCK_PLING"
    error: "BLOCK_NOTE_BLOCK_BASS"
    teleport: "BLOCK_BEACON_ACTIVATE"
    gui_open: "BLOCK_WOODEN_BUTTON_CLICK_ON"
    
    # Event Sounds
    team_created: "ENTITY_PLAYER_LEVELUP"
    team_disbanded: "BLOCK_NOTE_BLOCK_CHIME"
    member_join: "BLOCK_NOTE_BLOCK_HARP"
    member_leave: "BLOCK_NOTE_BLOCK_BELL"
    permission_change: "BLOCK_NOTE_BLOCK_FLUTE"
    warp_created: "BLOCK_NOTE_BLOCK_XYLOPHONE"
    warp_deleted: "BLOCK_NOTE_BLOCK_COW_BELL"
    home_set: "BLOCK_NOTE_BLOCK_GUITAR"
    bank_transaction: "BLOCK_NOTE_BLOCK_BIT"
    
  particles:
    teleport_warmup: "PORTAL"
    teleport_success: "END_ROD"

# ────────────────────────────────────────────────────────────────────────────
#                      Bedrock Edition Support
# ────────────────────────────────────────────────────────────────────────────
#
# Configure cross-platform support for Bedrock Edition players.
# Requires Floodgate plugin.
#
bedrock_support:
  enabled: true
  show_platform_indicators: true
  show_gamertags: true
  full_feature_support: true
  cross_platform_teams: true
  uuid_mode: "auto"

# ────────────────────────────────────────────────────────────────────────────
#                    Plugin Integrations
# ────────────────────────────────────────────────────────────────────────────
#
# Configure third-party plugin integrations for enhanced functionality.
#
integrations:
  # EternalCombat Integration
  # Prevents players from using team commands while in combat
  # Requires EternalCombat plugin: https://modrinth.com/plugin/eternalcombat
  eternalcombat:
    enabled: false
    # Block these actions while in combat
    prevent_teleport: true          # Prevent /team home and warp teleports
    prevent_leave: true              # Prevent leaving team
    prevent_disband: true            # Prevent disbanding team
    prevent_invite: true             # Prevent inviting players
    prevent_kick: true               # Prevent kicking members
    prevent_transfer: true           # Prevent transferring ownership
    prevent_bank_withdraw: true      # Prevent withdrawing from bank
    prevent_enderchest: true         # Prevent opening team enderchest
    prevent_settings_change: true    # Prevent changing team settings

  # ExcellentClaims Integration
  # Makes clan teleports respect land protection, so a team can't drop a home or warp
  # inside land they don't own or teleport onto someone else's claim.
  # A claim counts as the team's if any team member owns it.
  # Requires ExcellentClaims: https://github.com/nulli0n/ExcellentClaims-spigot
  excellentclaims:
    enabled: false
    # Block /team home and /team warp when the destination is inside a claim no team member owns
    prevent_teleport_into_claim: true
    # Block /team sethome and /team setwarp when you're standing in a claim no team member owns
    prevent_set_in_claim: true
# ═══════════════════════════════════════════════════════════════════════════
#  Delegated pricing (clan-settings)
# ═══════════════════════════════════════════════════════════════════════════
# You decide which team actions the TEAM OWNER may price for their own team, and
# the base price for each. For every action:
#   editable:      true lets the team owner set their own price from /team prices;
#                  false keeps it fixed at the value below (owner cannot change it).
#   default-value: the price charged when the team has not set its own.
#
# editable defaults to false, so nothing changes on update until you opt in. When
# you update from an older version, default-value is seeded from your existing
# feature_costs.economy price, so your prices are preserved.
#
# Team owners open a menu with /team prices; there they can set a price for any
# action marked editable, up to max-editable-price. Non-owners see it read-only.
# Actions not listed here (team creation, rename, join fee) stay admin-controlled.
clan-settings:
  # Highest price a team owner may set for any editable action.
  max-editable-price: 1000000.0
  # Show the join fee in the Team Prices menu so owners can enable/disable it and set the amount
  # (the amount is still capped by the justteams.joinfee. permission). Set false to hide it.
  join-fee-editable: false
  sethome:
    editable: false
    default-value: 100.0
  home:
    editable: false
    default-value: 50.0
  enderchest:
    editable: false
    default-value: 25.0
  setwarp:
    editable: false
    default-value: 200.0
  warp:
    editable: false
    default-value: 75.0
  bank_deposit:
    editable: false
    default-value: 0.0
  bank_withdraw:
    editable: false
    default-value: 10.0
Kodari AI
KodariNov 5 at 8:45 pm 1

This config doesn’t show how to look up a player’s team; it only contains settings and database connection details. Please send JustTeams’ API documentation or the part of its source/API that exposes a player’s team, or the exact PlaceholderAPI placeholder that returns a stable team identifier for a player.

Also, the config you pasted includes database credentials. Rotate that database password now, and change it anywhere else you reused it.

qsqu

u want this webhooks.yml ?

Kodari AI
KodariNov 5 at 8:46 pm 1

Yesβ€”send webhooks.yml, but redact any live webhook URLs or secrets.

qsqu
πŸ“Ž 1 file 13,169 chars
πŸ“„
pasted-code-1793911624624.txt
txt 452 lines
β–Ά
# ╔══════════════════════════════════════════════════════════════════════════╗
# β•‘  justTeams Β· webhooks.yml                                                β•‘
# β•‘                                                                          β•‘
# β•‘  Discord webhook notifications for team events. Get a webhook URL        β•‘
# β•‘  from Discord: Server Settings, Integrations, Webhooks.                  β•‘
# β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
#
# Configure Discord webhooks to receive notifications about team events
# Get your webhook URL from Discord: Server Settings β†’ Integrations β†’ Webhooks
#
# Color codes (decimal format for Discord embeds):
#   Green: 5763719    Success events (create, join, promote)
#   Red: 15548997      Destructive events (delete, kick, leave)
#   Blue: 5814783      Info events (transfer, demote, rename)
#   Gold: 16766720     Special events (levelup, achievements)
#   Purple: 10181046   Bank/Economy events
#
# ────────────────────────────────────────────────────────────────────────────

# Main webhook settings
webhook:
  # Enable or disable webhook notifications
  enabled: false
  
  # Your Discord webhook URL
  # Get this from: Discord Server β†’ Settings β†’ Integrations β†’ Webhooks β†’ New Webhook
  url: ""
  
  # Webhook display name in Discord
  username: "JustTeams Bot"
  
  # Webhook avatar URL (optional - leave empty for default)
  avatar_url: "https://i.imgur.com/your-bot-avatar.png"
  
  # Server name to display in embeds (useful for multi-server setups)
  server_name: "My Minecraft Server"
  
  # Enable rate limiting to prevent spam (recommended: true)
  rate_limiting:
    enabled: true
    # Maximum webhooks per minute
    max_per_minute: 20
    # Delay between webhook sends (milliseconds)
    min_delay_ms: 1000
  
  # Retry failed webhook sends
  retry:
    enabled: true
    # Number of retry attempts
    max_attempts: 3
    # Delay between retries (milliseconds)
    retry_delay_ms: 2000

# ────────────────────────────────────────────────────────────────────────────
#                          Event Configuration
# ────────────────────────────────────────────────────────────────────────────
#
# Enable/disable specific events and customize their appearance
#
# Available placeholders for all events:
#   {player} - Player name
#   {team} - Team name
#   {tag} - Team tag
#   {server} - Server name (from server_name above)
#   {time} - Current timestamp
#
# Event-specific placeholders are listed in each event section
#
# ────────────────────────────────────────────────────────────────────────────

events:
  # Team Creation
  team_create:
    enabled: true
    color: 5763719  # Green
    title: "πŸŽ‰ New Team Created"
    description: "**{player}** created a new team!"
    show_fields: true
    fields:
      - name: "Team Name"
        value: "{team}"
        inline: true
      - name: "Team Tag"
        value: "`{tag}`"
        inline: true
      - name: "Owner"
        value: "{player}"
        inline: true
    footer: "Team created on {server}"
    timestamp: true
  
  # Team Deletion/Disband
  team_delete:
    enabled: true
    color: 15548997  # Red
    title: "πŸ’” Team Disbanded"
    description: "**{player}** disbanded their team"
    show_fields: true
    fields:
      - name: "Team Name"
        value: "{team}"
        inline: true
      - name: "Team Tag"
        value: "`{tag}`"
        inline: true
      - name: "Former Owner"
        value: "{player}"
        inline: true
      # Additional placeholder: {member_count}
      - name: "Members"
        value: "{member_count}"
        inline: true
    footer: "Team disbanded on {server}"
    timestamp: true
  
  # Player Joins Team
  player_join:
    enabled: true
    color: 5763719  # Green
    title: "βœ… Player Joined Team"
    description: "**{player}** joined **{team}**"
    show_fields: true
    fields:
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
      # Additional placeholder: {member_count}
      - name: "Team Size"
        value: "{member_count} members"
        inline: true
    footer: "Joined on {server}"
    timestamp: true
  
  # Player Leaves Team
  player_leave:
    enabled: true
    color: 15548997  # Red
    title: "πŸ‘‹ Player Left Team"
    description: "**{player}** left **{team}**"
    show_fields: true
    fields:
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
      # Additional placeholder: {member_count}
      - name: "Team Size"
        value: "{member_count} members"
        inline: true
    footer: "Left on {server}"
    timestamp: true
  
  # Player Kicked from Team
  player_kick:
    enabled: true
    color: 15548997  # Red
    title: "🚫 Player Kicked"
    description: "**{kicked}** was kicked from **{team}**"
    show_fields: true
    fields:
      # Additional placeholder: {kicker}, {kicked}
      - name: "Kicked Player"
        value: "{kicked}"
        inline: true
      - name: "Kicked By"
        value: "{kicker}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Kicked on {server}"
    timestamp: true
  
  # Player Promoted
  player_promote:
    enabled: true
    color: 16766720  # Gold
    title: "⭐ Player Promoted"
    description: "**{player}** was promoted in **{team}**"
    show_fields: true
    fields:
      # Additional placeholders: {promoter}, {old_role}, {new_role}
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Promoted By"
        value: "{promoter}"
        inline: true
      - name: "New Role"
        value: "{new_role}"
        inline: true
      - name: "Previous Role"
        value: "{old_role}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Promoted on {server}"
    timestamp: true
  
  # Player Demoted
  player_demote:
    enabled: true
    color: 5814783  # Blue
    title: "⬇️ Player Demoted"
    description: "**{player}** was demoted in **{team}**"
    show_fields: true
    fields:
      # Additional placeholders: {demoter}, {old_role}, {new_role}
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Demoted By"
        value: "{demoter}"
        inline: true
      - name: "New Role"
        value: "{new_role}"
        inline: true
      - name: "Previous Role"
        value: "{old_role}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Demoted on {server}"
    timestamp: true
  
  # Ownership Transfer
  ownership_transfer:
    enabled: true
    color: 16766720  # Gold
    title: "πŸ‘‘ Ownership Transferred"
    description: "**{team}** has a new owner!"
    show_fields: true
    fields:
      # Additional placeholders: {old_owner}, {new_owner}
      - name: "Previous Owner"
        value: "{old_owner}"
        inline: true
      - name: "New Owner"
        value: "{new_owner}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Ownership transferred on {server}"
    timestamp: true
  
  # Team Renamed
  team_rename:
    enabled: true
    color: 5814783  # Blue
    title: "✏️ Team Renamed"
    description: "A team has been renamed"
    show_fields: true
    fields:
      # Additional placeholders: {old_name}, {new_name}
      - name: "Old Name"
        value: "{old_name}"
        inline: true
      - name: "New Name"
        value: "{new_name}"
        inline: true
      - name: "Changed By"
        value: "{player}"
        inline: true
    footer: "Renamed on {server}"
    timestamp: true
  
  # Team Tag Changed
  team_tag_change:
    enabled: true
    color: 5814783  # Blue
    title: "🏷️ Team Tag Changed"
    description: "**{team}** changed their tag"
    show_fields: true
    fields:
      # Additional placeholders: {old_tag}, {new_tag}
      - name: "Old Tag"
        value: "`{old_tag}`"
        inline: true
      - name: "New Tag"
        value: "`{new_tag}`"
        inline: true
      - name: "Team"
        value: "{team}"
        inline: true
      - name: "Changed By"
        value: "{player}"
        inline: true
    footer: "Tag changed on {server}"
    timestamp: true
  
  # Team PvP Toggled
  team_pvp_toggle:
    enabled: false  # Disabled by default (can be spammy)
    color: 5814783  # Blue
    title: "βš”οΈ Team PvP Status Changed"
    description: "**{team}** changed their PvP status"
    show_fields: true
    fields:
      # Additional placeholder: {pvp_status} (Enabled/Disabled)
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
      - name: "PvP Status"
        value: "{pvp_status}"
        inline: true
      - name: "Changed By"
        value: "{player}"
        inline: true
    footer: "PvP toggled on {server}"
    timestamp: true
  
  # Team Public Status Toggled
  team_public_toggle:
    enabled: false  # Disabled by default
    color: 5814783  # Blue
    title: "🌐 Team Visibility Changed"
    description: "**{team}** changed their visibility"
    show_fields: true
    fields:
      # Additional placeholder: {public_status} (Public/Private)
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
      - name: "Visibility"
        value: "{public_status}"
        inline: true
      - name: "Changed By"
        value: "{player}"
        inline: true
    footer: "Visibility changed on {server}"
    timestamp: true
  
  # Player Invited to Team
  player_invite:
    enabled: false  # Disabled by default (can be spammy)
    color: 5763719  # Green
    title: "πŸ“¨ Player Invited"
    description: "**{invited}** was invited to **{team}**"
    show_fields: true
    fields:
      # Additional placeholder: {inviter}, {invited}
      - name: "Invited Player"
        value: "{invited}"
        inline: true
      - name: "Invited By"
        value: "{inviter}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Invited on {server}"
    timestamp: true
  
  # Join Request Submitted
  join_request:
    enabled: false  # Disabled by default (can be spammy)
    color: 5814783  # Blue
    title: "πŸ“ Join Request Submitted"
    description: "**{player}** requested to join **{team}**"
    show_fields: true
    fields:
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Request submitted on {server}"
    timestamp: true
  
  # Join Request Accepted
  join_request_accept:
    enabled: false  # Disabled by default
    color: 5763719  # Green
    title: "βœ… Join Request Accepted"
    description: "**{accepter}** accepted **{player}**'s request"
    show_fields: true
    fields:
      # Additional placeholder: {accepter}
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Accepted By"
        value: "{accepter}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Request accepted on {server}"
    timestamp: true
  
  # Join Request Denied
  join_request_deny:
    enabled: false  # Disabled by default
    color: 15548997  # Red
    title: "❌ Join Request Denied"
    description: "**{denier}** denied **{player}**'s request"
    show_fields: true
    fields:
      # Additional placeholder: {denier}
      - name: "Player"
        value: "{player}"
        inline: true
      - name: "Denied By"
        value: "{denier}"
        inline: true
      - name: "Team"
        value: "{team} `{tag}`"
        inline: true
    footer: "Request denied on {server}"
    timestamp: true

# ────────────────────────────────────────────────────────────────────────────
#                         Advanced Settings
# ────────────────────────────────────────────────────────────────────────────

advanced:
  # Include server IP in footer (useful for multi-server networks)
  show_server_ip: false
  
  # Include player UUIDs in embeds (for debugging)
  show_uuids: false
  
  # Timeout for webhook connections (milliseconds)
  connection_timeout: 5000
  
  # Read timeout for webhook responses (milliseconds)
  read_timeout: 5000
  
  # Log webhook errors to console
  log_errors: true
  
  # Log successful webhook sends (for debugging)
  log_success: false
  
  # Use async webhook sending (recommended: true)
  async_sending: true
  
  # Queue webhooks if rate limit is hit
  queue_on_rate_limit: true
  
  # Maximum queue size (older messages will be dropped)
  max_queue_size: 50
Kodari AI
KodariNov 5 at 8:47 pm 1

Receivedβ€”webhook.url is blank, so there’s no secret to redact. What would you like me to do with this config: add it to the plugin, connect webhook notifications to team events, or troubleshoot something?

qsqu

So there's a small issue the glow doesn't keep tracking the highest one with kills , when the leader get killed the glow should transfer to to next highest kills if there's equal kills it should transfer to to first who got the number

make the waiting effect circular motion around the player in queue incrase the density a bit

Also when the match ends wait 2sec then teleport all players to /warp hunt they won't be teleported cause players can't teleport while in combat so u gotta first issue the command /justcombat untag %killer% to every player in the arena region in order for them to move

Kodari AI
KodariNov 6 at 2:36 pm 2
  1. Fix the kill-leader glow, including first-to-reach tie-breaking.

  2. Make the queue waiting effect a denser circular orbit.

  3. After a match, wait 2 seconds, untag arena players with /justcombat untag <player>, then send them to /warp hunt.

  1. Kill-leader glow: Dead players are excluded from leader selection, and the glow updates on death. Kill ordering now tracks who most recently reached each score, so ties go to whoever reached that kill count first.

  2. Queue effect: Replaced the scattered particles with a denser, rotating ring around each queued player.

  3. Match end: After 2 seconds, online players in the arena are all untagged via /justcombat untag <player>, then each executes /warp hunt. This runs for actual match endings, not when cancelling a pre-match queue.

qsqu

If the leader got killed in the middle of the progress say on 5 he can kill now same person and it counts in other words treat him just like a new player who just joined the arena

Kodari AI
KodariNov 6 at 2:40 pm 1
  1. On the glowing leader’s death, reset their kill count and victim history.

  2. Refresh the glow so the next eligible leader takes over.

When the glowing leader dies, their kills reset to 0 and their kill-credit history clears, so they can earn credit again for a player they previously killed. The leader glow refreshes to the next eligible player.

qsqu

add /bloodhunt version and the name of the author is Senseiexotic also suggest the commands when i type /bloodhunt so i don't have to type them manually

Kodari AI
KodariNov 6 at 2:46 pm 1
  1. Add /bloodhunt version.

  2. Set the plugin author to Senseiexotic.

  3. Add /bloodhunt subcommand suggestions through tab completion.

  1. Added /bloodhunt version, displaying the version from the plugin metadata.

  2. Set the plugin author to Senseiexotic.

  3. Added permission-aware tab completion for /bloodhunt and its nested arguments, and updated the command usage text.

qsqu

Make the waiting effect a bit lower like around the legs also when u type /verison shoukd show the author name along with it

Kodari AI
KodariNov 6 at 2:56 pm 1
  1. Lower the queue waiting effect to leg height.

  2. Include Senseiexotic in the version shown by /version.

[Generation stopped]

qsqu

Make the waiting effect a bit lower like around the legs also when u type /bloodhunt verison shoukd show the author name along with it

Kodari AI
KodariNov 6 at 2:57 pm 1
  1. Lower the queue waiting effect to leg height.

  2. Show the author in /bloodhunt version.

  1. Lowered the queue’s circular particle effect to leg height.

  2. /bloodhunt version now displays the author from the plugin metadata alongside the version.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 1,296
src/main/java/com/kodari/bloodhunt/BloodhuntPlugin.java
package com.kodari.bloodhunt;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class BloodhuntPlugin extends JavaPlugin {
    private RegionService regionService;
    private BloodhuntManager bloodhuntManager;
    private BloodhuntTimeLeftExpansion timeLeftExpansion;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        regionService = new RegionService(this);
        bloodhuntManager = new BloodhuntManager(this, regionService);
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            timeLeftExpansion = new BloodhuntTimeLeftExpansion(this, bloodhuntManager);
            timeLeftExpansion.register();
        }

        Bukkit.getPluginManager().registerEvents(bloodhuntManager, this);
        Bukkit.getPluginManager().registerEvents(new RewardMenu(this), this);
        BloodhuntCommand bloodhuntCommand = new BloodhuntCommand(this, bloodhuntManager);
        getCommand("bloodhunt").setExecutor(bloodhuntCommand);
        getCommand("bloodhunt").setTabCompleter(bloodhuntCommand);
        Bukkit.getScheduler().runTaskTimer(this, bloodhuntManager::tick, 20L, 20L);
        Bukkit.getScheduler().runTaskTimer(this, bloodhuntManager::refreshQueueParticles, 2L, 2L);

        for (Player player : Bukkit.getOnlinePlayers()) {
            Bukkit.getScheduler().runTaskLater(this, () -> bloodhuntManager.handleRegionEntry(player), 1L);
        }
    }

    @Override
    public void onDisable() {
        if (timeLeftExpansion != null) {
            timeLeftExpansion.unregister();
        }
        if (bloodhuntManager != null) {
            bloodhuntManager.shutdown();
        }
    }

    public ItemStack getRewardItem() {
        return getConfiguredRewardItem("reward.item", "reward.amount");
    }

    public ItemStack getHalfRewardItem() {
        return getConfiguredRewardItem("reward.half-item", "reward.half-amount");
    }

    private ItemStack getConfiguredRewardItem(String itemPath, String amountPath) {
        Object configured = getConfig().get(itemPath);
        ItemStack item = null;
        if (configured instanceof ItemStack stack) {
            item = stack.clone();
        } else if (configured instanceof String materialName) {
            item = XMaterial.matchXMaterial(materialName).map(XMaterial::parseItem).orElse(null);
            if (item != null) {
                item.setAmount(Math.max(1, getConfig().getInt(amountPath, 1)));
            }
        }
        return item;
    }

    public void saveRewardItem(ItemStack item) {
        saveRewardItem(item, "reward.item", "reward.amount");
    }

    public void saveHalfRewardItem(ItemStack item) {
        saveRewardItem(item, "reward.half-item", "reward.half-amount");
    }

    private void saveRewardItem(ItemStack item, String itemPath, String amountPath) {
        if (item == null || item.getType().isAir()) {
            getConfig().set(itemPath, null);
            getConfig().set(amountPath, 0);
        } else {
            ItemStack stored = item.clone();
            getConfig().set(itemPath, stored);
            getConfig().set(amountPath, stored.getAmount());
        }
        saveConfig();
    }

    public String message(String path) {
        return color(getConfig().getString("messages." + path, ""));
    }

    public String message(String path, String fallback) {
        return color(getConfig().getString("messages." + path, fallback));
    }

    public String color(String message) {
        Matcher matcher = Pattern.compile("&#([A-Fa-f0-9]{6})").matcher(message);
        StringBuffer colored = new StringBuffer();
        while (matcher.find()) {
            matcher.appendReplacement(colored, Matcher.quoteReplacement(
                    net.md_5.bungee.api.ChatColor.of("#" + matcher.group(1)).toString()));
        }
        matcher.appendTail(colored);
        return ChatColor.translateAlternateColorCodes('&', colored.toString());
    }
}