Serkan

Build a Complete Minecraft Plugin Called Mchat

Develop a complete, production-quality Minecraft plugin named Mchat for my Pixelia SMP server.

  1. Server Compatibility and Core Rules
  • Server software: Paper 1.21.11.
  • Java version: Java 21.
  • Plugin name: Mchat.
  • All player-facing text, GUI titles, item names, descriptions, error messages, and help text must be in Turkish.
  • The plugin must be lightweight, reliable, and easy to maintain.
  • Deliver the complete source project and a compiled, functional "Mchat.jar".

CRITICAL REQUIREMENT: DO NOT INTERFERE WITH NORMAL CHAT

Mchat must NOT replace, reformat, recolor, cancel, intercept, or otherwise modify the server's normal chat system.

Do not register a general chat formatter. Do not replace chat prefixes, suffixes, rank formatting, player names, or message formatting. Do not interfere with existing chat plugins.

Implement only the specific interactive features described below.

For recognized shortcuts, transform only the relevant shortcut into its configured interactive component while preserving the rest of the player's original message exactly as handled by the existing chat system.

For example, if a player writes:

"Hello everyone! [para]"

the normal chat system must continue to handle "Hello everyone!" exactly as before, and only "[para]" should become the configured clickable balance display.

If the existing chat API cannot safely support this without interfering with the normal chat pipeline, investigate the compatible Paper API and implement the least invasive solution. Do not silently introduce a custom chat formatter.

If a particular feature cannot be implemented without violating this requirement, document the limitation instead of breaking normal chat.

  1. Clean and Easy-to-Edit Project Structure

The project and configuration files must be organized vertically and logically. Do not put unrelated settings together in one enormous file.

Use a structure similar to this:

Mchat/ ├── pom.xml ├── src/ │ └── main/ │ ├── java/ │ │ └── .../ │ │ └── mchat/ │ │ ├── Mchat.java │ │ ├── commands/ │ │ │ └── HelpCommand.java │ │ ├── listeners/ │ │ │ ├── ShortcutListener.java │ │ │ └── PlayerInteractionListener.java │ │ ├── placeholders/ │ │ │ ├── BalanceProvider.java │ │ │ ├── CrystalProvider.java │ │ │ ├── PcProvider.java │ │ │ ├── PlaytimeProvider.java │ │ │ ├── TeamProvider.java │ │ │ └── ItemProvider.java │ │ ├── gui/ │ │ │ ├── InventoryViewGui.java │ │ │ └── ShulkerViewGui.java │ │ ├── integrations/ │ │ │ ├── VaultIntegration.java │ │ │ ├── PlaceholderApiIntegration.java │ │ │ ├── SimpleTeamsIntegration.java │ │ │ └── ShardsIntegration.java │ │ └── utils/ │ │ ├── TextFormatter.java │ │ └── DurationFormatter.java │ └── resources/ │ ├── plugin.yml │ ├── config.yml │ ├── messages.yml │ ├── shortcuts/ │ │ ├── item.yml │ │ ├── inventory.yml │ │ ├── balance.yml │ │ ├── crystal.yml │ │ ├── playtime.yml │ │ ├── team.yml │ │ ├── shulker.yml │ │ ├── pc.yml │ │ ├── server-address.yml │ │ └── website.yml │ └── gui/ │ ├── inventory.yml │ └── shulker.yml └── README.md

This is the intended organizational design, not a requirement to create empty classes. Implement each class only when it has a real responsibility.

Keep the code modular, readable, and consistently formatted. Each feature must have a clear place in the project.

Configuration principles

  • All player-facing shortcut text and formatting must be editable in the corresponding file inside "shortcuts/".
  • Inventory and shulker GUI titles, layouts, item names, descriptions, and filler items must be editable in their respective GUI files.
  • General help and error messages belong in "messages.yml".
  • Shared technical settings belong in "config.yml".
  • Use direct configuration values rather than indirect localization keys when a direct value makes editing easier.
  • Do not hardcode colors, message layouts, item names, or display strings in Java when they can be configured.
  • Use clear YAML comments to explain each setting in Turkish.
  • Preserve custom configuration values on restart and plugin updates.
  • Automatically create missing default files without overwriting existing customized files.

Use a consistent supported formatting system, preferably MiniMessage through the Adventure API. Colors such as blue and green must be configurable. Do not use "&l" anywhere in generated user-facing text or configuration defaults.

  1. Shortcut: [i] — Held Item Display

When a player writes "[i]" in chat, replace that shortcut with a clickable display of the item they are currently holding.

Example:

"... 1x Odun"

The display must use the actual item name and quantity.

Requirements:

  • If the held item has a custom display name, show that name.
  • Otherwise, use a proper Turkish display name for the Minecraft material.
  • Respect the actual stack amount.
  • Provide a hover tooltip containing useful item information.
  • If the player holds nothing, display "Air" exactly as requested.
  • Do not send a separate informational chat message.
  • Do not change unrelated text in the same chat message.

The display text, color, formatting, and hover information must be configurable in "shortcuts/item.yml".

  1. Shortcuts: [inv], [env], [e] — Inventory Viewer

All three aliases must work identically:

  • "[inv]"
  • "[env]"
  • "[e]"

When used, display a clickable blue message in chat:

"OyuncuAdı oyuncusunun envanteri"

The player's name and the display text must be configurable in "shortcuts/inventory.yml".

Use blue as the default color, equivalent to Minecraft's "&b", but implement it through the chosen supported text-formatting system. Allow the color to be changed in the configuration file.

When another player clicks this display, open a GUI showing the target player's inventory contents.

Inventory GUI requirements

  • GUI title and layout must be configurable in "gui/inventory.yml".
  • Item positions and display options must be configurable.
  • The GUI must accurately represent the target player's inventory.
  • It must be strictly read-only.
  • Players must not be able to take, move, replace, drop, or modify the displayed items.
  • Closing the GUI must not change the target player's inventory.
  • Prevent duplication exploits and inventory manipulation.
  • Handle offline players safely and clearly.

Do not expose player UUIDs in any visible interface.

  1. Shortcuts: [para], [money], [p], [m] — Economy Balance

All aliases must display the player's current balance using Vault.

Example:

"... 4.1m Para"

Requirements:

  • Obtain the actual balance from Vault's economy provider.
  • Format large values compactly, such as "4.1m", "3.1k", and "950".
  • Use consistent rounding rules.
  • Do not modify, withdraw, deposit, or otherwise affect the player's balance.
  • The display text and color must be configurable in "shortcuts/balance.yml".
  • Use green as the default color.
  • Handle missing Vault or a missing economy provider gracefully.
  • Never display a fake balance or silently return zero when the economy provider is unavailable.

Do not implement a separate economy system.

  1. Shortcuts: [kristal], [k], [shard], [s] — Crystal Balance

All aliases must display the player's crystal balance.

The crystal system is provided by Skript and the XShards integration.

The configured PlaceholderAPI placeholder is:

"%xshards_playershards%"

Use PlaceholderAPI to resolve the crystal balance for the correct player.

Example:

"... 3.1k Kristal"

Requirements:

  • Use the actual placeholder value.
  • Format large values compactly.
  • Never hardcode the example balance.
  • Make the display label, color, formatting, and aliases configurable in "shortcuts/crystal.yml".
  • Handle missing PlaceholderAPI or XShards gracefully.
  • Do not alter the player's crystal balance.

If the placeholder cannot be resolved or returns an invalid value, handle the failure safely rather than displaying a misleading value.

  1. Shortcuts: [süre], [sure] — Playtime

Both aliases must display the player's total playtime.

Use the PlaceholderAPI ecosystem where possible, with a configurable placeholder.

Default example:

"... 5g 13h"

Requirements:

  • Support compact day and hour formatting.
  • The output color and display format must be configurable in "shortcuts/playtime.yml".
  • Do not reset, alter, or fabricate player playtime.
  • Ensure the placeholder represents the intended total playtime rather than the current session only.
  • If the placeholder returns a raw number of seconds or ticks, convert it correctly according to the actual placeholder specification.
  • Handle unavailable placeholders safely.

Do not assume every playtime placeholder uses the same unit. Verify the selected placeholder's actual return format before converting it.

  1. Shortcuts: [team], [t] — SimpleTeams

Both aliases must show the player's current team name.

The team plugin is SimpleTeams.

Example:

"... Pixelia"

Requirements:

  • Integrate with the actual installed SimpleTeams API or a compatible, verified PlaceholderAPI placeholder.
  • Do not invent API methods or assume a placeholder exists without checking.
  • Do not confuse the team name with the player's Minecraft username.
  • Make the output format and color configurable in "shortcuts/team.yml".
  • If the player has no team, display a configurable Turkish fallback.
  • If SimpleTeams is unavailable, fail gracefully.
  1. Shortcuts: [shulker], [shulkerbox] — Shulker Box Viewer

Both aliases must work.

When a player holds a shulker box and uses one of these shortcuts, display a clickable message similar to:

"OyuncuAdı oyuncusunun shulker kutusu"

When clicked, open a GUI displaying the contents of the shulker box currently held by that player.

Requirements:

  • Support all relevant shulker box colors.
  • Read the actual contents of the held shulker box.
  • Configure the GUI title, layout, item presentation, and colors in "gui/shulker.yml".
  • Configure the chat display in "shortcuts/shulker.yml".
  • The GUI must be strictly read-only.
  • Prevent item duplication, removal, swapping, insertion, and modification.
  • Closing the GUI must not change the original shulker box.
  • Handle the case where the player is not holding a shulker box with a configurable Turkish error message.
  • Handle empty shulker boxes correctly.
  • Do not display a UUID or expose internal item data.

Do not allow the displayed GUI to become a writable container.

  1. Shortcut: [pc] — Pixelia PC Currency

Display the player's PC balance using the existing PlaceholderAPI placeholder:

"%pixelia_pc%"

Example:

"... 125 PC"

Requirements:

  • Use the actual placeholder value.
  • Make the label, color, and compact-number formatting configurable in "shortcuts/pc.yml".
  • Do not create a new PC currency or modify the existing balance.
  • Handle unresolved placeholders safely.
  • Do not assume the placeholder returns a number in a specific format without checking.
  1. Shortcut: [ip] — Server Address

When a player writes "[ip]", display this exact address:

"play.pixeliamc.com"

Requirements:

  • The address must be configurable in "shortcuts/server-address.yml".
  • Display it as a clickable chat component.
  • When clicked, copy the address to the player's clipboard.
  • Show a configurable Turkish hover tooltip.
  • Do not open a browser when this shortcut is clicked.
  • Do not send extra chat messages unless the configuration explicitly enables them.
  1. Shortcut: [web] — Website

When a player writes "[web]", display:

"www.pixeliamc.com"

Requirements:

  • Make the URL configurable in "shortcuts/website.yml".
  • Display the address as a clickable chat component.
  • Clicking it must open the website in the player's browser using the supported Minecraft chat click event.
  • Include a configurable hover tooltip.
  • Validate the configured URL before using it.
  • Do not execute commands or arbitrary actions when clicked.
  1. Clickable Player Names and Player Message Hover Information

This feature must work without replacing or reformatting the existing chat system.

Click behavior

When a player clicks another player's clickable name in chat, insert this command into their chat input:

"/msg PlayerName "

The command must be suggested, not automatically executed.

Use the equivalent of "SUGGEST_COMMAND", so the player can type their private message before pressing Enter.

Do not send the private message automatically.

Hover behavior

When a player hovers over another player's name or their chat message, display a configurable information tooltip containing that player's statistics.

The hover content must be configurable in a separate file, for example "player-hover.yml".

Possible information includes:

  • Player name.
  • Rank, if reliably available.
  • Balance.
  • Playtime.
  • Team.
  • PC balance.
  • Crystal balance.

Requirements:

  • Every displayed statistic must use the real value from the corresponding integration.
  • Allow each hover line to be enabled, disabled, reordered, recolored, or edited in configuration.
  • Never show UUIDs.
  • Do not display "null", raw Java objects, or unresolved placeholder strings.
  • Do not modify the actual chat text or formatting.

Important compatibility limitation: Standard Paper chat handling does not necessarily provide access to or control over every chat component produced by another chat plugin. Investigate the actual Paper 1.21.11 API and the server's existing chat pipeline. Do not install a second chat formatter or silently replace the existing one just to achieve hover and click behavior.

If the existing server chat pipeline cannot expose player-name hover and click events without interference, document exactly what is required to integrate with it safely.

  1. Help Command: /[help]

Register the requested command alias exactly as specified, subject to Minecraft command syntax validation.

The intended command is:

"/[help]"

The help interface must be in Turkish and list every supported shortcut and its purpose.

Example help content:

  • "[i]" — Held item display.
  • "[inv]", "[env]", "[e]" — View inventory.
  • "[para]", "[money]", "[p]", "[m]" — View balance.
  • "[kristal]", "[k]", "[shard]", "[s]" — View crystal balance.
  • "[süre]", "[sure]" — View playtime.
  • "[team]", "[t]" — View team.
  • "[shulker]", "[shulkerbox]" — View shulker box.
  • "[pc]" — View PC balance.
  • "[ip]" — Copy server address.
  • "[web]" — Open website.

Explain each shortcut in natural Turkish.

The help text must be configurable in "messages.yml".

Minecraft may not allow square brackets as part of a literal command name in the requested form. Verify command parsing and registration. If "/[help]" is not valid on Paper, provide a compatible command such as "/mchat help" and clearly document the limitation. Do not claim an invalid command works.

The bracketed expressions above are chat shortcuts, not necessarily actual commands.

  1. Placeholder and Alias Processing

Implement shortcut recognition carefully.

  • Support all requested aliases exactly.
  • Do not replace text inside unrelated words.
  • Process recognized shortcuts as standalone tokens.
  • Preserve punctuation and surrounding text.
  • Do not trigger shortcuts inside quoted examples or longer words unless explicitly configured.
  • Prevent accidental recursive processing.
  • Ensure that one player's shortcut cannot expose another player's private information.
  • Make alias definitions configurable where practical.
  • Avoid excessive event processing and unnecessary synchronous operations.

If multiple aliases appear in one message, process all valid shortcuts correctly without breaking the message.

  1. Permissions and Security

Use configurable permissions with sensible defaults.

At minimum:

  • Allow ordinary players to use public shortcut displays.
  • Prevent viewers from modifying other players' inventories.
  • Avoid exposing private information beyond the explicitly requested public balance, team, playtime, and item displays.
  • Ensure that GUI clicks cannot manipulate another player's data.
  • Validate player references and placeholder output.
  • Do not expose UUIDs in messages, GUIs, tooltips, or help output.

Do not introduce unnecessary administrator permissions for basic public display features.

  1. Final Testing Requirements

Before delivering the plugin:

  1. Compile the entire project using Java 21.
  2. Fix all compilation errors.
  3. Verify compatibility with Paper 1.21.11.
  4. Check every shortcut and alias.
  5. Test empty hands for "[i]" and confirm that "Air" is displayed.
  6. Test actual Vault balance retrieval and compact number formatting.
  7. Test "%xshards_playershards%" and "%pixelia_pc%".
  8. Test SimpleTeams integration using its actual API or a verified placeholder.
  9. Test the inventory and shulker GUIs for item duplication and modification exploits.
  10. Verify that clickable names suggest "/msg PlayerName " without automatically sending it.
  11. Verify that the website opens and the server address copies correctly.
  12. Test that all GUI and message configurations are loaded and survive restarts.
  13. Confirm that ordinary chat formatting, prefixes, suffixes, ranks, and other chat plugins remain unchanged.
  14. Verify that no UUIDs appear in user-facing output.
  15. Do not claim that live-server tests were performed unless they actually were.

Deliverables

Provide:

  • The complete source project.
  • The compiled "Mchat.jar".
  • All default configuration files.
  • A concise Turkish installation guide.
  • A Turkish explanation of every configuration file.
  • A list of tested features and any unresolved integration limitations.

The final result must be a real, working plugin, not a mockup or incomplete code sample.

Highest priority: Never interfere with the existing chat system. Keep the source code and configuration files modular, sequential, readable, and easy to customize.

Kodari AI
KodariOct 26 at 4:05 am 2
Mchat
Mchat is a lightweight Paper plugin that enhances chat with interactive shortcuts without interfering with normal chat. Players can display held items, inventories, balances, playtime, team names, shulker contents, PC currency, server IP, and website links via configurable shortcuts like [i], [inv], [para], [süre], [team], [shulker], [pc], [ip], and [web]. It integrates with Vault, PlaceholderAPI, SimpleTeams, and XShards, providing clickable chat components with hover tooltips. Includes read-only inventory and shulker viewer GUIs, clickable player names suggesting /msg commands, and a Turkish help command. All text, colors, and layouts are fully configurable in separate YAML files using MiniMessage formatting.
  1. Create the Java 21/Paper project and optional Vault/PlaceholderAPI integrations.

  2. Implement cached, token-only chat shortcuts plus read-only inventory and shulker viewers.

  3. Add Turkish, non-overwriting configuration defaults and document chat-pipeline limitations.

Mchat kaynak projesi ve Türkçe varsayılan yapılandırmaları oluşturuldu. Normal sohbet renderer’ı değiştirilmedi; Mchat yalnızca tanıdığı kısayol token’larını dönüştürüyor. Envanter ve shulker görüntüleyicileri salt okunur, Vault/PAPI verileri çözümlenemezse yanıltıcı değer göstermiyor.

Sınırlar: Başka bir sohbet eklentisinin oyuncu adı bileşenlerine güvenli erişim olmadığı için /msg Oyuncu öneren tıklama ve istatistik hover’ı uygulanmadı. SimpleTeams sürümüne ait doğrulanmış API/placeholder bulunmadığından takım placeholder’ı shortcuts/team.yml içinde boş bırakıldı. Canlı sunucu testi yapıldığı iddia edilmiyor.

JAR: Kodari’de masaüstünde üst çubuktan Compile, telefonda ⋮ → Compile Project seçin; pencerede Compile düğmesine basın. Başarılı derlemenin ardından Download ile Mchat.jar dosyasını indirin. Türkçe kurulum adımları ve yapılandırma dosyalarının açıklamaları README.md içinde.

Serkan

Mchat Update: Take Full Control of Chat and Make It Fully Configurable

Modify the existing Mchat plugin project. The previous implementation did not work correctly because the plugin did not have sufficient control over the chat component pipeline.

Change the architecture so that Mchat fully manages the server's chat formatting and interactive chat components. The chat system must be implemented properly, not as a partial workaround.

Keep all previously specified Mchat features, integrations, aliases, inventory viewers, balance displays, hover tooltips, clickable player names, and configuration requirements.

  1. Mchat Must Own the Complete Chat Pipeline

Mchat must handle the complete outgoing player chat message, including:

  • Player name and rank prefix.
  • Player name and rank suffix.
  • Chat message formatting.
  • Player-name hover information.
  • Clickable player names.
  • Shortcut processing.
  • Interactive text components.
  • Configurable colors and formatting.
  • Message component construction and delivery.

Use the appropriate Paper 1.21.11 and Adventure API mechanisms for constructing and sending chat components.

Do not depend on another chat plugin to provide the interactive components. Mchat must create and control them itself.

Inspect the actual Paper API and implement the correct event and component handling for the target version. Do not invent API methods.

  1. Separate Chat Configuration File

Create a dedicated configuration file named:

"chat.yml"

This file must contain all normal chat formatting settings. Do not put the main chat layout in "config.yml", "messages.yml", or individual shortcut files.

Use a clean and logically ordered structure similar to this:

enabled: true

format: message: "<gray>{message}</gray>"

player: name: "<white>{player}</white>" separator: " <dark_gray>» </dark_gray>"

rank: prefix: enabled: true value: "{luckperms_prefix}"

suffix: enabled: true value: "{luckperms_suffix}"

colors: default: "<gray>" player-name: "<white>" separator: "<dark_gray>"

hover: enabled: true lines: - "<gold><bold>{player}</bold></gold>" - "<gray>Rütbe: {rank}</gray>" - "<green>Para: {balance}</green>" - "<aqua>Kristal: {crystal}</aqua>" - "<yellow>Oyun Süresi: {playtime}</yellow>" - "<light_purple>Takım: {team}</light_purple>"

click: enabled: true action: SUGGEST_COMMAND command: "/msg {player} "

This is an example of the desired configuration design. Adapt the implementation to the actual codebase.

All chat layout settings must be editable without modifying Java source code.

Chat formatting requirements

  • The prefix, player name, separator, message, and suffix must be individually configurable.
  • Use LuckPerms for rank prefixes and suffixes when available.
  • Support PlaceholderAPI where appropriate.
  • Do not hardcode rank names or assume every player has the same rank.
  • Handle missing prefixes, suffixes, placeholders, or integrations safely.
  • Preserve valid MiniMessage formatting.
  • Make the order of chat components configurable.
  • Allow administrators to disable individual formatting elements.

Do not display unresolved placeholders such as "{luckperms_prefix}" to players.

  1. Interactive Player Names

Every player's displayed name in chat must support hover and click interactions.

Hover

When a player hovers over another player's name or the associated message component, show the configured information tooltip.

The hover contents must be controlled by "chat.yml".

Each line must support configurable text, colors, and placeholders.

The default information can include:

  • Player name.
  • Rank.
  • Vault balance.
  • Crystal balance.
  • Playtime.
  • Team.
  • PC balance.

Use real values from the existing integrations. Do not fabricate data or display "null".

Click

When a player clicks another player's name, insert this command into their chat input:

"/msg PlayerName "

Use "SUGGEST_COMMAND", not "RUN_COMMAND".

The player must be able to type the private message before pressing Enter. Do not automatically send a message.

Make the click behavior and command template configurable in "chat.yml".

  1. Preserve and Integrate All Existing Shortcuts

Keep all previously implemented shortcuts and their aliases:

  • "[i]"
  • "[inv]", "[env]", "[e]"
  • "[para]", "[money]", "[p]", "[m]"
  • "[kristal]", "[k]", "[shard]", "[s]"
  • "[süre]", "[sure]"
  • "[team]", "[t]"
  • "[shulker]", "[shulkerbox]"
  • "[pc]"
  • "[ip]"
  • "[web]"

These shortcuts must be processed by Mchat's chat component builder before the final message is sent.

Replace only the recognized shortcut tokens with their appropriate interactive components. Preserve all remaining text and its configured formatting.

For example, "[para]" must become the player's actual Vault balance display, not remain literal text.

Each shortcut's text, color, hover behavior, and click behavior must remain editable in its own file under "shortcuts/".

Do not duplicate shortcut configuration inside "chat.yml". The chat file controls the overall layout; the shortcut files control their respective components.

  1. Preserve Existing Rank and Prefix Systems

The chat must integrate with LuckPerms prefixes and suffixes when available.

Requirements:

  • Retrieve actual prefix and suffix values.
  • Preserve supported MiniMessage formatting in configured prefixes.
  • Allow administrators to enable or disable prefixes and suffixes independently.
  • Do not replace existing rank information with hardcoded values.
  • Do not create a second permission or rank system.
  • Ensure that missing or empty prefixes do not create unwanted spaces or formatting artifacts.
  1. Avoid Conflicts with Other Chat Plugins

Because Mchat will now control chat formatting, document which other plugins' chat-formatting features should be disabled to prevent duplicate prefixes, duplicate messages, or conflicting formatting.

Do not unnecessarily disable unrelated features from Essentials, TAB, LuckPerms, or other plugins.

Only one plugin should format and deliver the final chat message. Mchat must be the authoritative chat formatter after this change.

If an existing plugin modifies the chat event, verify the event priority and delivery behavior on Paper 1.21.11. Prevent messages from being formatted or delivered twice.

Do not cancel chat messages and resend them through a separate pipeline unless that is genuinely required and implemented in a way that preserves permissions, recipient visibility, chat signing considerations, and message delivery semantics.

Use the appropriate supported Paper chat API for the target server version.

  1. Clean Configuration Architecture

Maintain a clear separation of responsibilities:

  • "config.yml": General technical settings and integration toggles.
  • "chat.yml": Complete chat layout, prefix, suffix, player-name styling, hover, and click behavior.
  • "messages.yml": General Turkish system messages.
  • "shortcuts/*.yml": Individual shortcut text, colors, placeholders, and interaction settings.
  • "gui/*.yml": Inventory and shulker GUI layouts, titles, items, and descriptions.
  • "player-hover.yml", if needed: A dedicated configuration for hover information, provided it does not duplicate settings already defined in "chat.yml".

Prefer one authoritative location for each setting. Avoid redundant options that can conflict.

All configuration files must be organized vertically, with clear Turkish comments and consistent naming.

Never overwrite customized files on restart or during upgrades.

  1. Technical Requirements
  • Target Paper 1.21.11 and Java 21.
  • Use the appropriate Adventure API and Paper chat APIs.
  • Keep all player-facing text in Turkish.
  • Do not use "&l"; use supported MiniMessage formatting.
  • Preserve the existing Vault, PlaceholderAPI, XShards, SimpleTeams, and PC integrations.
  • Ensure the inventory and shulker viewers remain strictly read-only.
  • Do not expose player UUIDs.
  • Handle unavailable integrations safely.
  • Avoid blocking the server's main thread with unnecessary operations.
  • Ensure that clickable links, clipboard actions, hover tooltips, and command suggestions use the correct Minecraft click events.
  1. Mandatory Testing

Before delivering the updated plugin:

  1. Compile the complete project with Java 21.
  2. Fix all compilation errors.
  3. Verify that Mchat formats and sends ordinary chat messages exactly once.
  4. Verify prefix, player name, separator, message, and suffix formatting.
  5. Verify that player-name clicks suggest "/msg PlayerName " without executing it.
  6. Verify that hover tooltips show the correct player's real information.
  7. Test every shortcut and alias.
  8. Verify that shortcut components retain their individual colors and click behavior.
  9. Confirm that GUI interactions cannot modify or duplicate items.
  10. Verify that customized configuration files survive restarts.
  11. Check for duplicate chat messages and conflicts with other chat-formatting plugins.
  12. Document any features that require additional server configuration.

Do not claim live-server testing unless it has actually been performed.

Final Deliverables

Provide the complete updated source project, compiled "Mchat.jar", default configuration files, installation instructions in Turkish, and a list of tests actually performed.

The goal is a complete, professionally structured chat system owned by Mchat, with all formatting and interactive behavior editable through separate configuration files. Do not deliver a partial implementation that still depends on another plugin to construct the interactive chat components.

Kodari AI
KodariOct 26 at 4:30 am 2
  1. Audit Mchat’s chat pipeline, configuration loading, integrations, and existing shortcut/viewer implementations.

  2. Replace chat formatting with Paper 1.21.11’s supported component pipeline and add dedicated chat.yml.

  3. Preserve and connect existing shortcuts, integrations, and read-only viewers; document chat-plugin conflicts.

  4. Validate source-level consistency and report exactly what was and wasn’t tested.

  • Use Paper’s AsyncChatEvent renderer rather than canceling/resending; Mchat will build the final Adventure component, and shortcut substitutions will happen inside that renderer.

  • Add a separate chat.yml, cached LuckPerms/PlaceholderAPI data, configurable hover/click/order, and per-shortcut interaction settings.

  • Keep viewer GUIs and delivery semantics intact; document that only competing chat-formatting features—not unrelated plugin features—must be disabled.

Mchat artık Paper 1.21.11’in AsyncChatEvent renderer’ını kullanarak sohbetin son bileşenini kendisi oluşturuyor. Mesajları iptal edip yeniden göndermiyor; teslimatı Paper’ın normal akışına bırakıyor.

  • chat.yml eklendi: biçim sırası, prefix/suffix, oyuncu adı, mesaj, hover satırları ve /msg {player} komut önerisi buradan yapılandırılıyor.

  • LuckPerms prefix, suffix ve ana rütbe bilgisi kullanılıyor. Vault, PlaceholderAPI, kristal, PC ve takım verileri bulunmadığında eksik bilgiler gösterilmiyor.

  • Kısayollar renderer içinde işleniyor; mevcut takma adlar korundu. Her shortcuts/*.yml dosyasına ayrı hover ve tıklama ayarları eklendi.

  • Envanter ve shulker görüntüleyicilerinin salt okunur davranışı korundu.

  • README’ye çakışma notu eklendi: başka bir eklenti kullanılıyorsa yalnızca onun sohbet biçimlendirme/renderer özelliğini kapatın; Essentials, TAB veya LuckPerms’in ilgisiz özelliklerini kapatmanız gerekmez.

  • Eski player-hover.yml taslağı kaldırıldı; hover ayarlarının tek kaynağı chat.yml.

Doğrulama: Paper 1.21.11 chat-event ve renderer API belgeleri kontrol edildi. Bu turda derleme, canlı sunucu, tüm kısayollar, GUI etkileşimleri veya yapılandırma kalıcılığı testi çalıştırılmadı; bunların başarılı olduğunu iddia etmiyorum.

JAR ve kurulum: Masaüstünde üst çubuktan Compile’a; telefonda ⋮ → Compile Project’e dokunun. Açılan pencerede Compile’ı, başarılı derlemeden sonra Download’ı seçin. JAR’ı Java 21 kullanan Paper 1.21.11 sunucusunun plugins klasörüne koyup sunucuyu yeniden başlatın. Prefix/suffix için LuckPerms; bakiye için Vault ve bir ekonomi sağlayıcısı; kristal, PC ve takım verileri için uygun PlaceholderAPI sağlayıcıları gerekir.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
31 1,121
src/main/java/com/pixelia/mchat/Mchat.java
package com.pixelia.mchat;

import com.pixelia.mchat.commands.MchatCommand;
import com.pixelia.mchat.gui.PlayerInteractionListener;
import com.pixelia.mchat.integrations.EconomyIntegration;
import com.pixelia.mchat.integrations.LuckPermsIntegration;
import com.pixelia.mchat.integrations.PlaceholderApiIntegration;
import com.pixelia.mchat.listeners.ShortcutListener;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import net.milkbowl.vault.economy.Economy;

import java.io.File;
import java.util.List;

public final class Mchat extends JavaPlugin {
    private YamlConfiguration configFile;
    private YamlConfiguration messages;
    private YamlConfiguration chat;
    private YamlConfiguration itemShortcut;
    private YamlConfiguration inventoryShortcut;
    private YamlConfiguration balanceShortcut;
    private YamlConfiguration crystalShortcut;
    private YamlConfiguration playtimeShortcut;
    private YamlConfiguration teamShortcut;
    private YamlConfiguration shulkerShortcut;
    private YamlConfiguration pcShortcut;
    private YamlConfiguration addressShortcut;
    private YamlConfiguration websiteShortcut;
    private YamlConfiguration inventoryGui;
    private YamlConfiguration shulkerGui;
    private EconomyIntegration economy;
    private PlaceholderApiIntegration placeholders;
    private LuckPermsIntegration luckPerms;

    @Override
    public void onEnable() {
        saveMissingDefaults();
        loadFiles();
        RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
        economy = new EconomyIntegration(registration == null ? null : registration.getProvider());
        placeholders = new PlaceholderApiIntegration(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI"));
        luckPerms = new LuckPermsIntegration(Bukkit.getPluginManager().isPluginEnabled("LuckPerms"));

        ShortcutListener shortcutListener = new ShortcutListener(this);
        Bukkit.getPluginManager().registerEvents(shortcutListener, this);
        Bukkit.getPluginManager().registerEvents(new PlayerInteractionListener(), this);
        getCommand("mchat").setExecutor(new MchatCommand(this));
        shortcutListener.startSnapshotTask();
    }

    private void saveMissingDefaults() {
        List<String> resources = List.of(
                "config.yml", "messages.yml", "chat.yml",
                "shortcuts/item.yml", "shortcuts/inventory.yml", "shortcuts/balance.yml",
                "shortcuts/crystal.yml", "shortcuts/playtime.yml", "shortcuts/team.yml",
                "shortcuts/shulker.yml", "shortcuts/pc.yml", "shortcuts/server-address.yml",
                "shortcuts/website.yml", "gui/inventory.yml", "gui/shulker.yml");
        for (String resource : resources) {
            File file = new File(getDataFolder(), resource);
            if (!file.exists()) {
                file.getParentFile().mkdirs();
                saveResource(resource, false);
            }
        }
    }

    private void loadFiles() {
        configFile = load("config.yml");
        messages = load("messages.yml");
        chat = load("chat.yml");
        itemShortcut = load("shortcuts/item.yml");
        inventoryShortcut = load("shortcuts/inventory.yml");
        balanceShortcut = load("shortcuts/balance.yml");
        crystalShortcut = load("shortcuts/crystal.yml");
        playtimeShortcut = load("shortcuts/playtime.yml");
        teamShortcut = load("shortcuts/team.yml");
        shulkerShortcut = load("shortcuts/shulker.yml");
        pcShortcut = load("shortcuts/pc.yml");
        addressShortcut = load("shortcuts/server-address.yml");
        websiteShortcut = load("shortcuts/website.yml");
        inventoryGui = load("gui/inventory.yml");
        shulkerGui = load("gui/shulker.yml");
    }

    private YamlConfiguration load(String path) {
        return YamlConfiguration.loadConfiguration(new File(getDataFolder(), path));
    }

    public YamlConfiguration configFile() { return configFile; }
    public YamlConfiguration messages() { return messages; }
    public YamlConfiguration chat() { return chat; }
    public YamlConfiguration itemShortcut() { return itemShortcut; }
    public YamlConfiguration inventoryShortcut() { return inventoryShortcut; }
    public YamlConfiguration balanceShortcut() { return balanceShortcut; }
    public YamlConfiguration crystalShortcut() { return crystalShortcut; }
    public YamlConfiguration playtimeShortcut() { return playtimeShortcut; }
    public YamlConfiguration teamShortcut() { return teamShortcut; }
    public YamlConfiguration shulkerShortcut() { return shulkerShortcut; }
    public YamlConfiguration pcShortcut() { return pcShortcut; }
    public YamlConfiguration addressShortcut() { return addressShortcut; }
    public YamlConfiguration websiteShortcut() { return websiteShortcut; }
    public YamlConfiguration inventoryGui() { return inventoryGui; }
    public YamlConfiguration shulkerGui() { return shulkerGui; }
    public EconomyIntegration economy() { return economy; }
    public PlaceholderApiIntegration placeholders() { return placeholders; }
    public LuckPermsIntegration luckPerms() { return luckPerms; }
}