errorx.net

⚔️ FxPractice — Complete Minecraft Plugin Development Prompt

Develop a complete, production-ready Minecraft plugin named FxPractice, designed for a competitive Minecraft Practice PvP server.

Plugin Author: "NotErrorXPlayZz"

Plugin Prefix: "&#FF2E2E&lPRACTICE &8▶"

Target Environment: Paper Minecraft server. Keep the plugin compatible with the server version specified by the developer.

Language: Java

Plugin Type: Practice PvP management, Arena Management, FFA Management, Kit Management, GUI Management, Player Statistics, Hotbar Management, and Party Management.

  1. IMPORTANT PLUGIN ARCHITECTURE

My server will use these custom plugins:

  1. "FxPractice"
  2. "FxPracticeCore"
  3. "FxDuels"
  4. "FxArenaReset"
  5. "FxKitSystem"

FxPractice must integrate with these plugins where necessary.

Integration Rules

  • FxPractice handles arena creation, arena editing, FFA creation, arena and FFA configuration, kit linking, arena spawnpoints, kit storage, and the commands explicitly assigned to it.
  • FxPracticeCore handles practice hotbar management, queue GUIs, settings GUIs, FFA GUIs, player visibility, and other core practice features.
  • FxDuels handles duel matchmaking and duel-related gameplay.
  • FxArenaReset handles arena resetting.
  • FxKitSystem handles additional kit-system functionality where appropriate.

Important: Do not implement duplicate systems that conflict with the other plugins.

When an external plugin is not installed, FxPractice must not crash. Use a clean integration system, such as Bukkit services, documented APIs, or optional plugin hooks.

FxPractice must be independently loadable for its own commands and configuration management.

Do not require all the other custom plugins just to start FxPractice.

---

  1. COMMAND SYSTEM

The main command is:

"/practice"

Support these aliases:

  • "/p"
  • "/fxp"
  • "/fp"
  • "/fxpractice"

All aliases must execute the same command handler.

2.1 Main Commands

"/practice"

Open the main practice dashboard GUI.

"/practice wand"

Give the player the Arena Selection Wand.

"/practice createarena <name>"

Create an arena using the currently selected Position 1 and Position 2.

"/practice deletearena <name>"

Delete the specified arena after validating its existence.

"/practice editarena <name>"

Enter edit mode for the specified arena and teleport the player to the arena.

"/practice savearena <name>"

Save the current arena configuration, including its edited boundaries, spawnpoints, settings, and linked kits.

"/practice arenalist"

Open a paginated GUI containing all configured arenas.

"/practice reload"

Reload all FxPractice configuration files and messages without requiring a server restart.

The reload command must validate configuration files and report errors clearly rather than silently replacing valid settings with broken defaults.

2.2 Arena Kit Commands

"/practice arena <arena> kit link <kit_name>"

Link an existing kit to the specified arena.

"/practice arena <arena> kit unlink <kit_name>"

Unlink the specified kit from the arena.

"/practice arena <arena> kit unlikall"

Unlink all kits from the specified arena.

Also support the corrected spelling:

"/practice arena <arena> kit unlinkall"

Both commands must perform the same action.

Validate that the arena and kit exist before performing operations.

2.3 Arena Player Limit

"/practice arena <arena> maxplayer <amount>"

Set the maximum number of players allowed in the specified arena.

Requirements:

  • The amount must be a positive integer.
  • Reject invalid numbers.
  • Save the setting persistently.
  • Enforce the configured player limit when the arena is used.
  • Display the configured maximum in arena information where appropriate.

2.4 Arena Visibility

"/practice arena <arena> visibility <private/public>"

Set the arena visibility.

Public:

  • The arena can be displayed in public arena listings.
  • Players can access it through the appropriate public matchmaking or joining system.

Private:

  • The arena must not appear in public arena listings.
  • Only authorized administrative or explicitly permitted private access should be allowed.

Do not confuse arena visibility with whether staff can edit an arena.

2.5 Arena Spawnpoints

"/practice arena <arena> setspawnpoint <player_number>"

Set a spawnpoint for a specific player number.

Examples:

"/practice arena boxing setspawnpoint 1"

"/practice arena boxing setspawnpoint 2"

"/practice arena boxing setspawnpoint 3"

The command must save the executing player's current location as the selected numbered spawnpoint.

Requirements:

  • Spawnpoints must be stored separately.
  • Each spawnpoint must save its world, X, Y, Z, yaw, and pitch.
  • Spawnpoint numbers must be positive integers.
  • The number identifies the spawnpoint, not a player's Minecraft username.
  • Display a configurable success message.
  • Validate that the world exists when loading a spawnpoint.

For example, spawnpoint 1 is the first player's spawn location, and spawnpoint 2 is the second player's spawn location.

Support additional spawnpoint numbers for arenas that require them.

---

  1. ARENA SELECTION WAND

The Arena Selection Wand must use:

Material: "DIAMOND_AXE"

Display Name:

"&#FF2E2E&lArena Select Wand"

Lore:

  • "&7Wand"
  • "&r"
  • "&#FF2E2EInformation:"
  • "&#FF2E2E● Left-click &fto select Position 1!"
  • "&#FF2E2E● Right-click &fto select Position 2!"
  • "&r"
  • "&e▶ &l&nLEFT CLICK&r &eto Select pos1"
  • "&e▶ &l&nRIGHT CLICK&r &eto Select pos2"

Wand Functionality

When a player receives the wand using "/practice wand":

  • Left-click a block to select Position 1.
  • Right-click a block to select Position 2.
  • Save the selected positions for that player.
  • Send a configurable message when each position is selected.
  • Display the selected coordinates in the confirmation message.
  • Prevent the wand from performing its selection action more than once per click.
  • Cancel the normal block interaction when necessary to prevent accidental block damage or placement.
  • Allow different players to select positions independently.

Once both positions are selected, the player can execute:

"/practice createarena <name>"

The plugin must calculate and store the cuboid region defined by both positions.

The wand must not be usable by players without the appropriate permission.

---

  1. ARENA LIST GUI

Command:

"/practice arenalist"

Display all configured arenas in a paginated inventory GUI.

Requirements

  • Show arena names.
  • Show each arena's visibility, player limit, and linked-kit information where appropriate.
  • Clicking an arena entry teleports the player to the arena's configured location or edit location, subject to permissions.
  • Previous Page and Next Page buttons must work correctly.
  • Do not display a Previous Page button on the first page.
  • Do not display a Next Page button when there are no additional pages.
  • Handle empty arena lists without errors.
  • Refresh the GUI when the player changes pages.

Configurable Chat/List Message Format

arenalist: header: "&#FF2E2EThis is the list of all arena!" page: "&7Page List %current%/%max%" arena-entry: "&7- %arena_name%" previous: "&6◀ Previous page" next: "Next page ▶"

Implement the arena list as an interactive inventory GUI with clickable arena entries and working pagination. Do not make it chat-only.

Use the supplied text and colors as the default style.

---

  1. FFA MANAGEMENT SYSTEM

FxPractice must provide a separate FFA management system.

FFA regions and arena regions must be stored independently.

5.1 FFA Commands

"/practice createffa <name>"

Create an FFA region using the selected Position 1 and Position 2.

"/practice deleteffa <name>"

Delete the specified FFA.

"/practice editffa <name>"

Enter edit mode and teleport the player to the FFA.

"/practice saveffa <name>"

Save the FFA configuration.

"/practice ffalist"

Open the paginated FFA list GUI.

5.2 FFA Kit Commands

"/practice ffa <ffa_name> kit link <kit_name>"

Link a kit to an FFA.

"/practice ffa <ffa_name> kit unlink <kit_name>"

Unlink a kit from an FFA.

"/practice ffa <ffa_name> kit unlikall"

Unlink all kits from the specified FFA.

Also support:

"/practice ffa <ffa_name> kit unlinkall"

Both spellings must work.

5.3 FFA Player Limit

"/practice ffa <ffa_name> maxplayer <amount>"

Set the maximum player count for the specified FFA.

Validate the amount and persist the setting.

An FFA player limit must apply to the correct FFA, not globally to all FFAs.

5.4 FFA Visibility

"/practice ffa <ffa_name> visibility <public/private>"

Set the visibility of the specified FFA.

Use the same visibility logic as arenas.

Public FFAs may appear in public FFA listings.

Private FFAs must not appear in public listings.

5.5 FFA Spawnpoint

"/practice ffa <ffa_name> setspawnpoint"

Save the executing player's current location as the FFA spawnpoint.

Requirements:

  • Store the world, coordinates, yaw, and pitch.
  • Validate that the FFA exists.
  • Save the spawnpoint persistently.
  • Allow the spawnpoint to be changed by executing the command again.

5.6 FFA List GUI

Command:

"/practice ffalist"

Display all configured FFAs in a paginated GUI.

Use the same pagination design as the arena list.

When an authorized player clicks an FFA entry, teleport them to its configured edit or inspection location.

The GUI must support:

  • Previous page.
  • Next page.
  • Correct page numbering.
  • Empty lists.
  • Configurable entries.
  • Permission checks.

---

  1. CONFIGURABLE MESSAGES

Create "Messages.yml".

All messages must be editable.

Use this prefix by default:

"&#FF2E2E&lPRACTICE &8▶"

Use modern hex-color formatting, supporting Minecraft color formats compatible with the target server version.

The plugin must correctly translate configured colors before displaying messages.

6.1 Arena Messages

prefix: "&#FF2E2E&lPRACTICE &8▶"

createarena: "%prefix% &#94FE47Arena %arena_name% has successfully created!" deletearena: "%prefix% &#FF2E2EArena %arena_name% has successfully deleted!" editarena: "%prefix% &#F2B234You can now edit this arena!" savearena: "%prefix% &#94FE47This arena has successfully saved!"

arenalinkkit: "%prefix% &#F2B234Kit %kit% has been linked with this arena!" arenaunlinkkit: "%prefix% &#F2B234Kit %kit% has been unlinked from this arena!"

arenaspawnpoint: "%prefix% &#94FE47You have successfully created player %num% spawnpoint!"

arenamaxplayer: "%prefix% &#F2B234Arena %arena_name% max players set to %number%"

arenavisibilitypublic: "%prefix% &#94FE47Arena %arena_name% visibility set to &lPUBLIC!"

arenavisibilityprivate: "%prefix% &#94FE47Arena %arena_name% visibility set to &#FF2E2E&lPRIVATE!"

6.2 FFA Messages

createffa: "%prefix% &#94FE47FFA has been successfully created!" deleteffa: "%prefix% &#FF2E2EFFA has been successfully deleted!" editffa: "%prefix% &#F2B234You can now edit this FFA!" saveffa: "%prefix% &#94FE47You have successfully saved this FFA!"

ffalinkkit: "%prefix% &#F2B234Kit %kit% has been linked with this FFA!" ffaunlinkkit: "%prefix% &#F2B234Kit %kit% has been unlinked from this FFA!"

ffaspawnpoint: "%prefix% &#94FE47FFA spawnpoint has been successfully set!"

ffamaxplayer: "%prefix% &#F2B234FFA %ffa_name% max players set to %number%"

ffavisibilitypublic: "%prefix% &#94FE47FFA %ffa_name% visibility set to &lPUBLIC!"

ffavisibilityprivate: "%prefix% &#94FE47FFA %ffa_name% visibility set to &#FF2E2E&lPRIVATE!"

For FFA visibility, maximum players, and kit linking/unlinking, use the same behavior as the corresponding arena commands.

However, use FFA-specific messages and the correct FFA name.

6.3 FFA List Messages

ffalist: header: "&#FF2E2EThis is the list of all FFA!" page: "&7Page List %current%/%max%" ffa-entry: "&7- %ffa_name%" previous: "&6◀ Previous page" next: "Next page ▶"

Use the same pagination functionality as the arena list.

6.4 Additional Messages

Create configurable messages for:

  • No permission.
  • Player-only command.
  • Invalid command usage.
  • Arena not found.
  • Arena already exists.
  • FFA not found.
  • FFA already exists.
  • Kit not found.
  • Kit already linked.
  • Kit not linked.
  • All kits unlinked.
  • Position 1 selected.
  • Position 2 selected.
  • Both positions required.
  • Invalid player limit.
  • Invalid visibility.
  • Invalid spawnpoint number.
  • Spawnpoint successfully set.
  • Wand received.
  • Configuration reloaded.
  • Reload failed.
  • Arena saved.
  • FFA saved.
  • Teleport successful.
  • Teleport failed.
  • Unknown subcommand.
  • Invalid page.
  • No arenas available.
  • No FFAs available.
  • Player data loaded.
  • Player data saved.
  • Kit saved.
  • Kit deleted.
  • Kit editor opened.
  • Party created.
  • Party disbanded.
  • Party invite sent.
  • Party invite received.
  • Party kicked.
  • Party banned.
  • Party chat toggled.
  • Not in a party.
  • Already in a party.
  • Target player offline.
  • Player visibility enabled.
  • Player visibility disabled.
  • Queue GUI opened.
  • FFA GUI opened.
  • Settings GUI opened.

All messages must be editable through "Messages.yml".

Never hardcode user-facing messages unnecessarily.

---

  1. KIT MANAGEMENT

Implement the following commands:

"/practice kit save <name>"

"/practice kit delete <name>"

"/practice kiteditor"

"/kiteditor"

Kit Saving

When a player executes:

"/practice kit save <name>"

Save the player's current inventory and relevant equipment as a reusable kit.

Where supported, save:

  • Main inventory.
  • Armor.
  • Offhand.
  • Item enchantments.
  • Custom item names.
  • Item lore.
  • Potion effects if the kit system supports them.
  • Other required kit metadata.

Save kits inside the "Kits" folder.

Example:

"Kits/nethpot.yml"

Each kit must have its own persistent configuration.

Validate kit names and prevent accidental overwriting unless explicitly confirmed or configured.

Kit Deletion

"/practice kit delete <name>"

Delete the specified kit after checking that it exists.

When a kit is deleted, remove or clean up its links in arena and FFA configurations to prevent invalid references.

Kit Editor

"/practice kiteditor"

"/kiteditor"

Open the kit editor GUI defined in "Guis/Kiteditor.yml".

The editor must integrate with FxKitSystem when that plugin exposes the necessary API.

Do not assume that the external kit editor exists if FxKitSystem is not installed.

---

  1. PARTY SYSTEM COMMANDS

Implement the following party commands, provided they do not conflict with the dedicated FxPracticeCore or FxDuels responsibilities.

"/party create"

Create a party.

"/party disband"

Disband the party.

"/partychat"

Toggle party chat.

"/party kick <name>"

Kick a member from the party.

"/party invite <player>"

Invite a player to the party.

"/party ban <player>"

Ban a player from joining the party.

"/party gamemodes"

Open a GUI displaying the available practice gamemodes.

Party Requirements

  • A player may belong to only one party at a time.
  • Only the party leader may invite, kick, ban, or disband.
  • Invitations must expire after a configurable duration.
  • Banned players cannot join that party.
  • Party chat must only reach party members.
  • Handle offline players safely.
  • Persist party data only if necessary; temporary party memberships may be cleared after a server restart.
  • Use configurable messages.

If FxPracticeCore already implements the party system, FxPractice must register or delegate to that implementation rather than create a conflicting second system.

---

  1. OTHER PLAYER COMMANDS

Register the following commands where appropriate:

"/leavefight"

"/leavematch"

"/ffa join <name>"

Leave Commands

"/leavefight" and "/leavematch" should delegate to the active fight or match system.

If a player is not participating in a fight or match, show a configurable message.

Do not allow players to exploit leave commands to bypass match cleanup or arena restrictions.

FFA Join

"/ffa join <name>"

Join the specified FFA.

Requirements:

  • Validate that the FFA exists.
  • Reject access to private FFAs for unauthorized players.
  • Enforce the configured player limit.
  • Validate the FFA spawnpoint.
  • Teleport the player to the correct location.
  • Apply an appropriate linked kit if required by the FFA system.
  • Prevent duplicated items and incorrect inventory restoration.
  • Integrate with FxPracticeCore and FxArenaReset when necessary.

Use the exact FFA names configured by the administrator.

---

  1. PRACTICE HOTBAR SYSTEM

Create "Guis/hotbar.yml".

The hotbar items must be configurable.

Important: These are actual protected player inventory items, not ordinary GUI buttons.

They must be given through the appropriate practice hotbar system.

10.1 Queue Fight

queue-fight: material: DIAMOND_SWORD slot: 0 display_name: "&#47B6FF☀ Queue Fight" action: OPEN_GUI gui: "queue.yml"

On right-click, open "Guis/Queue.yml".

10.2 FFA Fight

ffa-fight: material: NETHERITE_SWORD slot: 1 display_name: "&#47B6FF⚗ FFA Fight" action: OPEN_GUI gui: "ffa.yml"

On right-click, open "Guis/Ffa.yml".

10.3 Settings

settings: material: CHEST slot: 3 display_name: "&#69F43F⚐ Settings" action: OPEN_GUI gui: "Settings.yml"

On right-click, open the settings GUI.

10.4 Create Party

create-party: material: END_CRYSTAL slot: 4 display_name: "&#EE62B1☀ Create Party" action: PLAYER_COMMAND command: "party create"

On right-click, execute the equivalent of:

"/party create"

Execute it as the player, not as console.

10.5 Kit Editor

kiteditor: material: SKULL_BANNER_PATTERN slot: 5 display_name: "&#EB6429Kit Editor" action: PLAYER_COMMAND command: "kiteditor"

On right-click, execute:

"/kiteditor"

10.6 Player Visibility: Show

player-visibility-show: material: LIME_DYE slot: 8 display_name: "&fPlayer &7▶ [&#69F43FShow&7]" lore: - "&fRight-Click to hide players!"

When clicked:

  • Hide other players from the clicking player.
  • Replace the hotbar item with the hidden-state item.
  • Do not hide the clicking player from themselves.

10.7 Player Visibility: Hidden

player-visibility-hidden: material: RED_DYE slot: 8 display_name: "&fPlayer &7▶ [&#FF2E2EHidden&7]" lore: - "&fRight-Click to show players!"

When clicked:

  • Show other players to the clicking player.
  • Replace the item with the show-state item.

Player visibility must be individual. Hiding players for one user must not hide them for everyone else.

Hotbar Protection Requirements

All designated practice hotbar items must be protected.

Players must not be able to:

  • Move these items into another inventory slot.
  • Swap them using number keys.
  • Move them using the offhand swap key.
  • Drop them.
  • Move them into chests or other inventories.
  • Replace them through ordinary inventory interactions.
  • Duplicate them using inventory exploits.

Handle inventory clicks, drag events, item drops, swaps, and other relevant interactions.

Prevent duplicate hotbar items when players reconnect or change worlds.

The plugin should restore missing hotbar items when appropriate.

Do not interpret this as disabling the player's entire inventory. Only the designated practice items must be locked.

The hotbar must not be activated by executing an inventory command. It should work automatically when the player enters the appropriate practice state or joins the practice server, according to configuration.

---

  1. FFA GAMEMODE GUI

Create "Guis/Ffa.yml".

Default configuration:

title: "&8▶ Server FFA | Dashboard"

size: 27

filler: material: BLACK_STAINED_GLASS_PANE display_name: ""

gamemodes: nethpot: material: NETHERITE_SWORD slot: 11 display_name: "&#69F43FNethpot FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join nethpot"

smpkit: material: DIAMOND_SWORD slot: 12 display_name: "&#69F43FSMPKit FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join smpkit"

axepvp: material: DIAMOND_AXE slot: 13 display_name: "&#69F43FAxePvP FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join axepvp"

sword: material: NETHERITE_SWORD slot: 15 display_name: "&#69F43FSword FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join sword"

crystalffa: material: END_CRYSTAL slot: 16 display_name: "&#69F43FCrystal FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join crystalffa"

mace: material: MACE slot: 17 display_name: "&#69F43FMace FFA" lore: - "&7FFA" - "&r" - "&fFight with any player and" - "&fmake your skills better!" - "&r" - "&#FF2E2E✗ &fDont use Hacks" - "&#FF2E2E✗ &fDont use Macro" - "&#FF2E2E✗ &fDont use Glitch" - "&r" - "&e▶ &l&nCLICK&r &eto Go!" action: PLAYER_COMMAND command: "ffa join mace"

FFA GUI Behavior

  • Inventory size must be 27 slots.
  • Fill empty slots with black stained glass panes.
  • Do not overwrite configured gamemode slots with filler items.
  • Clicking a gamemode must execute the configured player command.
  • Every configured gamemode must have its own correct command.
  • Prevent players from taking items out of the GUI.
  • All items, names, lore, slots, and commands must be editable.
  • Do not hardcode the GUI contents in Java when they can be loaded from YAML.

---

  1. QUEUE GUI

Create "Guis/Queue.yml".

The queue GUI must provide access to the practice gamemodes available through the queue system.

Requirements:

  • Configurable title and inventory size.
  • Configurable filler.
  • Configurable gamemode icons.
  • Configurable slots, display names, and lore.
  • Support clicking a gamemode to join its queue.
  • Prevent players from taking GUI items.
  • Integrate with FxPracticeCore and FxDuels where appropriate.

Do not pretend a queue exists if the relevant queue implementation is not installed or available.

Display a configurable error message when the queue system is unavailable.

---

  1. SETTINGS GUI

Create "Guis/Settings.yml".

Provide a configurable settings dashboard.

Include the player visibility setting and allow additional settings to be added through YAML.

Requirements:

  • Configurable title.
  • Configurable inventory size.
  • Configurable filler.
  • Configurable item names, lore, and slots.
  • Click actions must be configurable.
  • Prevent players from taking GUI items.
  • Keep each player's settings independent.

The player visibility setting must synchronize with the hotbar visibility item.

---

  1. KIT EDITOR GUI

Create "Guis/Kiteditor.yml".

Provide the configuration structure for the kit editor.

Include configurable:

  • GUI title.
  • Inventory size.
  • Filler.
  • Kit entries.
  • Kit display names.
  • Kit slots.
  • Click actions.
  • Return buttons.

Integrate with FxKitSystem if available.

Do not allow players to modify another player's kit without appropriate permission.

---

  1. PLAYER DATA STORAGE

Create a folder named:

"Data/"

Store persistent player statistics using UUIDs instead of usernames as primary identifiers.

Example:

"Data/550e8400-e29b-41d4-a716-446655440000.yml"

Save the following statistics:

  • Kills.
  • Deaths.
  • Killstreak.
  • Loss streak.
  • Wins, if supported.
  • Losses, if supported.
  • Other practice statistics required by the plugin.

Example:

uuid: "PLAYER_UUID" name: "PlayerName"

statistics: kills: 0 deaths: 0 killstreak: 0 lossestreak: 0 wins: 0 losses: 0

Data Requirements

  • Load player data when appropriate.
  • Save data safely.
  • Use UUIDs so username changes do not erase statistics.
  • Avoid unnecessary disk writes every tick.
  • Handle player disconnections correctly.
  • Save outstanding data during plugin shutdown.
  • Avoid overwriting valid player data with defaults after a loading error.
  • Keep data storage compatible with future statistics additions.

Track kills, deaths, streaks, wins, and losses only through events or integrations that reliably identify the relevant match result.

Do not count the same kill or death multiple times.

---

  1. KIT STORAGE

Create:

"Kits/"

Store every saved kit inside this folder.

Example:

Kits/ ├── nethpot.yml ├── smpkit.yml ├── axepvp.yml ├── sword.yml ├── crystalffa.yml └── mace.yml

These filenames are examples only. Administrators must be able to create and delete kits dynamically.

Each kit must preserve the configured inventory and equipment information.

Arena and FFA configurations must store references to linked kits rather than creating unnecessary duplicate kit files.

---

  1. ARENA AND FFA DATA STORAGE

Create a persistent data structure for arenas and FFAs.

Recommended layout:

FxPractice/ ├── config.yml ├── Messages.yml ├── plugin.yml ├── Data/ ├── Kits/ ├── Arenas/ ├── FFA/ └── Guis/ ├── Ffa.yml ├── Queue.yml ├── hotbar.yml ├── Settings.yml └── Kiteditor.yml

Each arena must store:

  • Name.
  • World.
  • Position 1.
  • Position 2.
  • Maximum player count.
  • Visibility.
  • Spawnpoints.
  • Linked kits.
  • Other arena settings.

Each FFA must store:

  • Name.
  • World.
  • Position 1.
  • Position 2.
  • Maximum player count.
  • Visibility.
  • FFA spawnpoint.
  • Linked kits.
  • Other FFA settings.

All data must survive server restarts.

The plugin must create missing configuration files and folders automatically.

Do not erase existing configurations when creating defaults.

Implementation note: "plugin.yml" is a Java plugin descriptor and belongs in the JAR's root, not in the external data folder. It should not be generated as an ordinary runtime configuration file.

---

  1. CONFIG.YML

Create an editable "config.yml".

Include:

  • Plugin prefix.
  • Author information.
  • Debug mode.
  • Default arena visibility.
  • Default FFA visibility.
  • Default arena player limit.
  • Default FFA player limit.
  • Wand material.
  • Wand display name.
  • Wand lore.
  • Arena and FFA save settings.
  • Player data settings.
  • Hotbar settings.
  • GUI settings.
  • Optional plugin integration settings.
  • Teleport settings.
  • Logging settings.

All default settings must be documented with comments where appropriate.

Do not require server restarts for ordinary configuration changes if they can be safely reloaded.

---

  1. PLUGIN.YML AND AUTHOR INFORMATION

Create a correct "plugin.yml" inside the compiled plugin JAR.

It must include:

  • Plugin name: "FxPractice"
  • Plugin version.
  • Main Java class.
  • Author: "NotErrorXPlayZz"
  • Description.
  • Main command: "practice"
  • Command aliases: "p", "fxp", "fp", "fxpractice"
  • Other commands registered by FxPractice.
  • Permissions and their default values.
  • Optional dependencies where appropriate.

Use the following stylish author credit in configuration comments and server startup logs:

"&#FF2E2E&lFxPractice &8▶ &#47B6FFMade By &f&lNotErrorXPlayZz"

Example startup message:

[FxPractice] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [FxPractice] FxPractice has been enabled! [FxPractice] Made By NotErrorXPlayZz [FxPractice] Arena and FFA systems loaded. [FxPractice] Configuration loaded successfully. [FxPractice] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Display a stylish author credit on every successful plugin startup.

Do not print false success messages when the configuration or data loading fails.

---

  1. PERMISSIONS

Implement configurable permissions.

Suggested permission nodes:

fxpractice.admin fxpractice.wand fxpractice.createarena fxpractice.deletearena fxpractice.editarena fxpractice.savearena fxpractice.arenalist fxpractice.arena.kit fxpractice.arena.maxplayer fxpractice.arena.visibility fxpractice.arena.spawnpoint

fxpractice.createffa fxpractice.deleteffa fxpractice.editffa fxpractice.saveffa fxpractice.ffalist fxpractice.ffa.kit fxpractice.ffa.maxplayer fxpractice.ffa.visibility fxpractice.ffa.spawnpoint

fxpractice.kit.save fxpractice.kit.delete fxpractice.kiteditor fxpractice.reload

fxpractice.party fxpractice.ffa.join

Use appropriate permission defaults.

Administrative commands should not be available to ordinary players unless explicitly configured.

The "/practice" main command should open the practice dashboard for authorized users or follow the configured access policy.

---

  1. COMMAND TAB COMPLETION

Implement tab completion for all supported commands.

Examples:

"/practice arena <TAB>"

Suggest existing arena names.

"/practice ffa <TAB>"

Suggest existing FFA names.

"/practice arena <arena> kit link <TAB>"

Suggest available kits that can be linked.

"/practice arena <arena> kit unlink <TAB>"

Suggest kits currently linked to that arena.

"/practice ffa <ffa_name> kit link <TAB>"

Suggest available kits.

"/practice createarena <TAB>"

Accept a new arena name.

"/practice createffa <TAB>"

Accept a new FFA name.

"/practice arena <arena> visibility <TAB>"

Suggest "public" and "private".

"/practice ffa <ffa_name> visibility <TAB>"

Suggest "public" and "private".

Only show commands and suggestions that the sender is authorized to use.

---

  1. ERROR HANDLING AND SECURITY

The plugin must:

  • Validate command arguments.
  • Validate arena and FFA names.
  • Prevent duplicate arena and FFA creation.
  • Prevent invalid player limits.
  • Prevent invalid spawnpoint numbers.
  • Handle unloaded or missing worlds safely.
  • Handle corrupted configuration files without deleting valid data.
  • Prevent unauthorized access to private arenas and FFAs.
  • Prevent unauthorized kit changes.
  • Prevent GUI item stealing.
  • Prevent hotbar item duplication.
  • Avoid blocking the main server thread with unnecessary file operations.
  • Avoid memory leaks from player-specific listeners or tasks.
  • Clean up temporary edit states when players disconnect.
  • Handle server shutdown safely.
  • Avoid console errors during normal operations.
  • Use UUIDs for player data.
  • Provide informative error logs.

---

  1. DEVELOPMENT REQUIREMENTS

Deliver the complete Java source code and a buildable project.

Use a clean package structure, such as:

me.noterrorxplayzz.fxpractice ├── FxPractice.java ├── commands/ ├── listeners/ ├── arenas/ ├── ffa/ ├── kits/ ├── parties/ ├── players/ ├── gui/ ├── integrations/ ├── storage/ ├── config/ └── utilities/

The plugin must compile without errors.

Do not provide incomplete classes, pseudocode, placeholder methods, or missing event listeners.

Do not claim that a feature works unless its implementation is included.

Include:

  • All Java source files.
  • Maven "pom.xml" or an equivalent build configuration.
  • "plugin.yml".
  • Default YAML configuration files.
  • Instructions for compiling the JAR.
  • Instructions for installing the plugin.
  • A list of commands and permissions.
  • Notes describing integration with FxPracticeCore, FxDuels, FxArenaReset, and FxKitSystem.

Test the important functionality before declaring the plugin complete.

At minimum, validate:

  1. Plugin startup and shutdown.
  2. Configuration creation and reload.
  3. Arena creation, editing, saving, and deletion.
  4. Wand position selection.
  5. Arena spawnpoint creation.
  6. FFA creation, editing, saving, and deletion.
  7. FFA joining and spawnpoint handling.
  8. Kit saving, deleting, and linking.
  9. GUI pagination.
  10. Hotbar item protection.
  11. Player visibility toggling.
  12. Player statistics persistence.
  13. Permission checks.
  14. Tab completion.
  15. Optional integration behavior when other plugins are missing.

FINAL GOAL

Create a fully functional, configurable, optimized, and maintainable FxPractice plugin for a Minecraft Practice PvP server.

The plugin should provide professional arena and FFA management, persistent player statistics, configurable kits, interactive GUIs, protected practice hotbar items, and integration with the other FxPractice plugins.

Preserve the specified commands, aliases, message formats, colors, GUI slots, and configuration structure wherever possible.

Author: NotErrorXPlayZz

Kodari AI
KodariOct 24 at 9:04 am 4
FxPractice
A comprehensive Minecraft Practice PvP plugin providing arena and FFA management with wand-based region selection, persistent kit storage, configurable GUI dashboards, protected practice hotbar items, player statistics tracking, and party system integration. Features include arena/FFA creation, editing, spawnpoint configuration, visibility controls, player limits, kit linking, paginated list GUIs, tab completion, and optional integration with companion plugins while maintaining standalone functionality.
  1. Set up the Paper project, configuration, persistence, and optional integration API.

  2. Implement arena/FFA and kit commands, wand selection, FFA joining, and protected management GUIs.

  3. Add player statistics and a temporary party fallback that yields to FxPracticeCore when available.

Created the FxPractice Paper project with arena/FFA persistence and administration, wand-based region selection, spawnpoints, kit storage/linking, paginated GUIs, FFA joining with inventory restoration, UUID-based kill/death statistics, and temporary party management. Configuration files, permissions, command aliases, and setup notes are included.

Integrations follow the requested ownership split: FxPractice does not duplicate FxPracticeCore’s protected hotbar. Queue, match, kit-editor, party, and visibility hooks can be supplied through the Bukkit PracticeBridge; without the relevant bridge, queue and external editor actions report unavailable. The local kit-editor fallback lists kits but does not edit FxKitSystem data.

I haven’t validated this against a live Paper server.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
31 2,221
src/main/java/me/noterrorxplayzz/fxpractice/FxPractice.java
package me.noterrorxplayzz.fxpractice;

import com.cryptomorin.xseries.XMaterial;
import me.noterrorxplayzz.fxpractice.commands.FfaCommand;
import me.noterrorxplayzz.fxpractice.commands.PartyCommand;
import me.noterrorxplayzz.fxpractice.commands.PracticeCommand;
import me.noterrorxplayzz.fxpractice.commands.UtilityCommand;
import me.noterrorxplayzz.fxpractice.config.MessageService;
import me.noterrorxplayzz.fxpractice.config.Settings;
import me.noterrorxplayzz.fxpractice.gui.GuiManager;
import me.noterrorxplayzz.fxpractice.integrations.PracticeAPI;
import me.noterrorxplayzz.fxpractice.integrations.PracticeBridge;
import me.noterrorxplayzz.fxpractice.listeners.PartyChatListener;
import me.noterrorxplayzz.fxpractice.listeners.PlayerDataListener;
import me.noterrorxplayzz.fxpractice.listeners.SelectionManager;
import me.noterrorxplayzz.fxpractice.listeners.WandListener;
import me.noterrorxplayzz.fxpractice.parties.PartyManager;
import me.noterrorxplayzz.fxpractice.storage.KitStore;
import me.noterrorxplayzz.fxpractice.storage.PlayerDataStore;
import me.noterrorxplayzz.fxpractice.storage.RegionStore;
import me.noterrorxplayzz.fxpractice.util.ChatUtil;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Pattern;

public final class FxPractice extends JavaPlugin {
    private static final Pattern VALID_NAME = Pattern.compile("[A-Za-z0-9_-]{1,32}");
    private Settings settings;
    private MessageService messages;
    private RegionStore regions;
    private KitStore kits;
    private PlayerDataStore playerData;
    private SelectionManager selections;
    private GuiManager guis;
    private PartyManager parties;
    private final Map<UUID, String> editing = new HashMap<>();
    private final Map<UUID, String> ffaPlayers = new HashMap<>();
    private final Map<UUID, InventorySnapshot> inventorySnapshots = new HashMap<>();
    private NamespacedKey wandKey;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        ensureResource("Messages.yml");
        ensureResource("Guis/Ffa.yml");
        ensureResource("Guis/Queue.yml");
        ensureResource("Guis/Settings.yml");
        ensureResource("Guis/Kiteditor.yml");
        ensureResource("Guis/hotbar.yml");

        settings = new Settings(this);
        try {
            settings.reload();
        } catch (IOException | org.bukkit.configuration.InvalidConfigurationException exception) {
            getLogger().severe("FxPractice configuration could not be loaded: " + exception.getMessage());
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        messages = new MessageService(settings);
        regions = new RegionStore(this);
        boolean regionsLoaded = regions.loadAll();
        kits = new KitStore(this);
        playerData = new PlayerDataStore(this);
        selections = new SelectionManager();
        guis = new GuiManager(this);
        parties = new PartyManager(this);
        wandKey = new NamespacedKey(this, "arena_selection_wand");

        PracticeCommand practiceCommand = new PracticeCommand(this);
        getCommand("practice").setExecutor(practiceCommand);
        getCommand("practice").setTabCompleter(practiceCommand);
        FfaCommand ffaCommand = new FfaCommand(this);
        getCommand("ffa").setExecutor(ffaCommand);
        getCommand("ffa").setTabCompleter(ffaCommand);
        UtilityCommand utility = new UtilityCommand(this);
        getCommand("leavefight").setExecutor(utility);
        getCommand("leavematch").setExecutor(utility);
        getCommand("kiteditor").setExecutor(utility);
        PartyCommand partyCommand = new PartyCommand(this);
        getCommand("party").setExecutor(partyCommand);
        getCommand("partychat").setExecutor(partyCommand);

        getServer().getPluginManager().registerEvents(guis, this);
        getServer().getPluginManager().registerEvents(new WandListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerDataListener(this), this);
        getServer().getPluginManager().registerEvents(new PartyChatListener(this), this);
        registerApi();

        getLogger().info("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
        getLogger().info(ChatUtil.color("&#FF2E2E&lFxPractice &8▶ &#47B6FFMade By &f&lNotErrorXPlayZz"));
        getLogger().info("FxPractice has been enabled.");
        if (regionsLoaded) {
            getLogger().info("Loaded " + regions.names(true).size() + " arenas and " + regions.names(false).size() + " FFAs.");
            getLogger().info("Configuration loaded successfully.");
        } else {
            getLogger().warning("Some arena or FFA files could not be loaded; see the errors above. They were left untouched.");
        }
        getLogger().info("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
    }

    @Override
    public void onDisable() {
        if (playerData != null) playerData.saveAll();
        if (getServer().getServicesManager().isProvidedFor(PracticeAPI.class)) getServer().getServicesManager().unregisterAll(this);
    }

    private void ensureResource(String path) {
        File file = new File(getDataFolder(), path);
        if (file.exists()) return;
        File parent = file.getParentFile();
        if (parent != null) parent.mkdirs();
        saveResource(path, false);
    }

    private void registerApi() {
        PracticeAPI api = new PracticeAPI() {
            @Override public boolean hasArena(String name) { return regions.exists(true, name); }
            @Override public boolean isArenaPublic(String name) { return regions.get(true, name) != null && regions.get(true, name).getString("visibility", "private").equalsIgnoreCase("public"); }
            @Override public int getArenaMaxPlayers(String name) { return regions.get(true, name) == null ? 0 : regions.get(true, name).getInt("max-player"); }
            @Override public boolean canEnterArena(String name, int currentPlayers) { return regions.get(true, name) != null && currentPlayers < getArenaMaxPlayers(name); }
            @Override public org.bukkit.Location getArenaSpawn(String name, int playerNumber) { return regions.getLocation(true, name, "spawnpoints." + playerNumber); }
            @Override public boolean hasFfa(String name) { return regions.exists(false, name); }
            @Override public boolean isFfaPublic(String name) { return regions.get(false, name) != null && regions.get(false, name).getString("visibility", "private").equalsIgnoreCase("public"); }
            @Override public int getFfaMaxPlayers(String name) { return regions.get(false, name) == null ? 0 : regions.get(false, name).getInt("max-player"); }
            @Override public boolean canEnterFfa(String name, int currentPlayers) { return regions.get(false, name) != null && currentPlayers < getFfaMaxPlayers(name); }
            @Override public org.bukkit.Location getFfaSpawn(String name) { return regions.getLocation(false, name, "spawnpoint"); }
        };
        getServer().getServicesManager().register(PracticeAPI.class, api, this, ServicePriority.Normal);
    }

    public boolean reloadSettings() {
        try {
            settings.reload();
            regions.loadAll();
            return true;
        } catch (IOException | org.bukkit.configuration.InvalidConfigurationException exception) {
            getLogger().severe("FxPractice reload failed; the active settings were retained: " + exception.getMessage());
            return false;
        }
    }

    public boolean joinFfa(Player player, String name) {
        var data = regions.get(false, name);
        if (data == null) {
            messages.send(player, "ffa-not-found");
            return false;
        }
        if (ffaPlayers.containsKey(player.getUniqueId())) {
            messages.send(player, "already-in-ffa");
            return false;
        }
        if (!data.getString("visibility", "private").equalsIgnoreCase("public")
                && !player.hasPermission("fxpractice.admin") && !player.hasPermission("fxpractice.ffa.private")) {
            messages.send(player, "private-region");
            return false;
        }
        long occupants = ffaPlayers.values().stream().filter(value -> value.equalsIgnoreCase(name)).count();
        if (occupants >= data.getInt("max-player", 16)) {
            messages.send(player, "ffa-full");
            return false;
        }
        org.bukkit.Location spawn = regions.getLocation(false, name, "spawnpoint");
        if (spawn == null || spawn.getWorld() == null) {
            messages.send(player, "teleport-failed");
            return false;
        }
        inventorySnapshots.put(player.getUniqueId(), InventorySnapshot.capture(player.getInventory()));
        player.getInventory().clear();
        List<String> linkedKits = data.getStringList("kits");
        if (!linkedKits.isEmpty() && !kits.apply(player, linkedKits.get(0))) {
            restoreInventory(player);
            messages.send(player, "kit-not-found");
            return false;
        }
        if (!player.teleport(spawn)) {
            restoreInventory(player);
            messages.send(player, "teleport-failed");
            return false;
        }
        ffaPlayers.put(player.getUniqueId(), data.getString("name", name));
        messages.send(player, "teleport-success");
        return true;
    }