MailManager icon

MailManager -----

The Ultimate Mail Plugin




코드를 전체적으로 수정했습니다

I have completely modified the code.

먼저 첫번째로 치명적인 버그를 수정했습니다 권한적으로 권한이 없는 유저가 메일로 아이템을 수급할 수 있는 문제점이 있었습니다 또한 GUI 내에서 잘만하면 아이템 복사가 가능한 문제점이 있었습니다 그 문제점을 수정하였습니다

First, we have fixed critical bugs. There was an issue where users without proper authorization could obtain items via mail. Additionally, there was a problem where items could be duplicated within the GUI if done correctly. We have fixed these issues.

여기서부터는 전문적으로 써놨으니 시간 많은 분들만 보시길 바랍니다

From here on, the text is written in a professional style, so please only read it if you have plenty of time.

플레이어 검색 및 데이터 로드 최적화
가장 빈번하게 발생하던 "플레이어를 찾을 수 없습니다" 문제를 해결하기 위한 로직을 강화했습니다.

온라인 우선 검색: 검색 시 DB보다 온라인 플레이어 리스트(Bukkit.getPlayer)를 먼저 확인하여 응답 속도를 0ms 가깝게 줄였습니다.

대소문자 무시(Case-Insensitive): 유저가 대소문자를 섞어서 입력해도 DB의 LOWER() 함수나 소문자 맵핑을 통해 정확한 UUID를 찾아내도록 수정했습니다.

비동기 로드: 플레이어 접속 시 발생하는 데이터 로딩을 dbExecutor를 통해 비동기로 처리하여 메인 스레드의 렉(Tick Spike)을 방지했습니다.

데이터 유실 및 증발 방지 (Write-behind)
아이템이나 설정 데이터가 사라지는 문제를 원천 차단했습니다.

비동기 배치 플러시: 데이터 변경 시 즉시 DB에 쓰는 대신, 큐에 모았다가 일정 주기나 특정 시점에 한꺼번에 저장하여 DB 부하를 최소화했습니다.

안전한 종료(Unload) 강화: 플러그인이 비활성화될 때 flushNow()를 호출하여 큐에 남아있던 모든 메일, 블랙리스트, 언어 설정을 **동기식(Blocking)**으로 저장하고 연결을 끊도록 로직을 보강했습니다.

메모리 정리: clearAllCaches() 메서드를 통해 종료 시 모든 메모리 캐시를 비워 서버 재시작 시 발생할 수 있는 메모리 누수를 차단했습니다.

GUI 시스템 및 사용자 경험(UX) 개선
각 GUI의 독립성과 안정성을 높였습니다.

ChatListener 연동: 플레이어 검색 시 채팅 입력을 가로채는 ChatListener와 ChatSearchRegistry를 MailManager에 정식 등록하여 입력이 씹히는 문제를 해결했습니다.

부모 GUI 복귀 로직: 시간 설정이나 아이템 첨부 후, 원래 있던 전송창(MailSendGUI 등)으로 정확하게 돌아가도록 parentGuiMap과 세션 관리 로직을 정교화했습니다.

아이템 복사 방지: 첨부 GUI 등에서 saveAttachedItems 호출 시 상태 플래그를 사용하여 아이템이 중복 생성되거나 증발하는 것을 막았습니다.

코드 품질 및 성능 개선
ItemBuilder 최적화: ItemMeta를 매번 호출하지 않고 필드에 캐싱하여 아이템 생성 속도를 비약적으로 높였습니다.

가상 인벤토리 관리: 관리자용 /mail inv 기능을 위해 MailInventoryGUI 리스너를 통합 관리하도록 구조를 변경했습니다.

Base64 직렬화: MailSerializer를 도입하여 마인크래프트 버전이 바뀌어도 NBT 태그가 포함된 아이템 데이터가 깨지지 않게 보존합니다.

Optimization of Player Search and Data Loading

We have strengthened the logic to resolve the most frequently occurring "Player not found" issue.

Online-First Search: We have reduced response times to near 0ms by checking the online player list (Bukkit.getPlayer) before the database during searches.

Case-Insensitive: We have modified the system to find the correct UUID using the DB's LOWER() function or lowercase mapping, even if the user inputs a mix of uppercase and lowercase letters.

Asynchronous Loading: Data loading that occurs when a player connects is processed asynchronously via dbExecutor to prevent lag (Tick Spike) on the main thread.

Prevention of Data Loss and Evaporation (Write-behind)

We have completely eliminated the issue of item or setting data disappearing.

Asynchronous Batch Flush: Instead of writing to the DB immediately upon data changes, data is collected in a queue and saved all at once at regular intervals or specific times to minimize DB load.

Enhanced Safe Unload: We have reinforced the logic so that when a plugin is deactivated, `flushNow()` is called to save all mail, blacklists, and language settings remaining in the queue in a **synchronous (blocking)** manner and disconnect the connection.

Memory Cleanup: By using the `clearAllCaches()` method to clear all memory caches upon termination, we have prevented memory leaks that could occur during server restarts.

Improvements to GUI System and User Experience (UX)

We have enhanced the independence and stability of each GUI.

ChatListener Integration: We have officially registered the ChatListener and ChatSearchRegistry, which intercept chat input during player searches, with the MailManager to resolve the issue of input being ignored. Parent GUI Return Logic: Refined the parentGuiMap and session management logic to ensure a precise return to the original sending window (MailSendGUI, etc.) after setting the time or attaching items.

Item Duplication Prevention: Prevented duplicate item creation or item disappearance by using status flags when calling saveAttachedItems in the Attachment GUI and other areas.

Code Quality and Performance Improvements

ItemBuilder Optimization: Significantly increased item creation speed by caching in fields instead of calling ItemMeta every time.

Virtual Inventory Management: Modified the structure to integrate the management of MailInventoryGUI listeners for the /mail inv function for administrators.

Base64 Serialization: Introduced MailSerializer to preserve item data containing NBT tags, preventing corruption even when the Minecraft version changes.
----------, Mar 17, 2026

BUG FIX CODE UPDATE
----------, Mar 9, 2026

처음 접속하는 플레이어도 포함해 주세요

Please include players who are connecting for the first time.

데이터베이스 읽기 및 쓰기 흐름은 dbExecutor라는 단일 위치로 고정되었습니다.

플레이어 검색 채팅 입력은 AsyncPlayerChatEvent를 직접 처리하는 대신 ChatSearchRegistry에 통합되었습니다.

WeakHashMap 캐시를 제거하고 ConcurrentHashMap으로 대체하여 예기치 않은 캐시 회피를 방지합니다.

DB read and write flows are fixed to a single location: dbExecutor.

Player search chat input is integrated into ChatSearchRegistry instead of directly handling AsyncPlayerChatEvent.

Removing the WeakHashMap cache and replacing it with ConcurrentHashMap prevents unexpected cache evasion.
----------, Feb 1, 2026

This patch is for those who don't have hikariCP.
----------, Jan 9, 2026

Optimization
----------, Jan 9, 2026

Lang Select Problem Fix
----------, Jan 5, 2026

NO SEND PROBLEM FIX

아이템이 받아지지 않는 현상 수정
----------, Dec 13, 2025

Option Setting Save
----------, Dec 13, 2025

Send All Bug Fix
----------, Dec 12, 2025

Multi Server, Lost Lang Auto Update, paper velocity support, send gui player search add. Reset Command Add
----------, Dec 12, 2025

lang.yml updated.

Mail Send All GUI Problem fix.
----------, Dec 7, 2025

USER MAIL SEND CRITICAL BUG FIX
----------, Dec 2, 2025

SORRY, MYSQL PROBLEM FIX!
----------, Nov 23, 2025

코드를 전부 다시 짬 + 데이터베이스 문제 수정 + 아이템 수령 문제 해결 + 권한 조건 추가

Rewrote all code + fixed database issues + fixed item receipt issues + Permissions Conditions Add
----------, Oct 13, 2025

다중 선택 모드의 문제점 수정
Fixed an issue with multi-select mode
----------, Oct 12, 2025

아이템 수령 후 다른 메뉴로 이동 시 다시 아이템을 수령할 수 있는 버그를 수정하였습니다

Fixed a bug where you could receive an item again when moving to another menu after receiving the item.
----------, Oct 12, 2025

사용자 지정 로어 설명 설정은 이제 여러개로 할 수 있음

복잡한 GUI 싫다는 의견이 있어 다중 선택 모드는 설정으로 이동됨

config.yml 이랑 lang.yml 교체 필요

Custom lore descriptions can now be configured in multiple ways.
Due to feedback about the need for a complex GUI, multi-select mode has been moved to the settings.
config.yml and lang.yml need to be replaced.
----------, Oct 11, 2025

Code (Text):
      select-button:
        material: YELLOW_DYE
        custom-model-data: 0
        damage: 0
        hide-flags: false
      claim-selected-button:
        material: ENDER_CHEST
        custom-model-data: 0
        damage: 0
        hide-flags: false
      delete-selected-button:
        material: RED_CONCRETE
        custom-model-data: 0
        damage: 0
        hide-flags: false
변화는 없습니다 config 에 이 구문을 빼먹었습니다 죄송합니다

There is no change, sorry I forgot this syntax in config
----------, Oct 11, 2025

다중 선택 모드와 다중 선택으로 수령 모드와 다중 선택으로 삭제 버튼이 추가되었습니다.

수령 시 삭제 버튼이 작동안하는 문제점을 수정하였습니다.

Added delete buttons in multi-select mode and multi-select pickup mode.
Fixed an issue where the delete button would not work when receiving.
----------, Oct 11, 2025

아이템 수령 시 사용자 지정 사운드를 설정할 수 있습니다
메일 삭제 메세지에 잘못 설정된 메세지를 수정합니다

You can now set a custom sound when receiving an item.
Fixes an incorrectly set message in the mail deletion message.
----------, Oct 11, 2025

인벤토리가 가득찼을 경우 아이템을 전부 수령하지 않습니다. 일부만 받습니다.

If your inventory is full, you will not receive all the items. You will only receive a portion.
----------, Oct 10, 2025

아이템 수령 시 일부 아이템만 수령받을 때 아이템이 복제되는 문제를 수정했습니다
update 구문이 추가되어 적용됩니다
이제 mail inv 명령어를 쓸 수 있습니다 탭 키로 자동 완성 됩니다
이제 mail send inv:<id> 로 저장된 인벤토리의 아이템을 보낼 수 있습니다

Fixed an issue where items would be duplicated when receiving only some items.
The update syntax has been added and implemented.
The mail inv command can now be used. Tab key autocompletes.
You can now send items from your saved inventory with mail send inv:<id>.
----------, Oct 10, 2025

JAVA 17 다운그레이드

JAVA 17 downgrade
----------, Oct 10, 2025

이제 보내기 버튼에서 클릭하여 아이템을 36칸 까지 보낼 수 있습니다 보내기 전에 시간과 대상을 선택하지 않으면 보내기 창으로 들어갈 수 없습니다
이제 유저가 메일을 보내기 위해선 mail.send 권한이 필요합니다
그리고 send / sendall 명령어 뒤에 -online -offline 으로 온라인 플레이어와 오프라인 플레이어 별로 아이템을 보낼 수 있습니다
일본어와 중국어가 추가됩니다
이번 버전부터 en 이 en_us 로 변경되며 ko 는 ko_kr 로 변경됩니다
수령받을 때 미리보기에서 아이템을 수령받을 지 삭제할 지 선택할 수 있으며 하나씩 아이템을 수령받거나 모든 아이템을 수령받을 수 있지만 아이템 공간이 부족할 경우 일부 아이템만 수령받습니다

You can now send items up to 36 slots by clicking the Send button. You will not be able to enter the Send window unless you select a time and destination before sending.
Users now need the mail.send permission to send mail.
You can also send items separately to online and offline players by adding -online -offline to the send / sendall commands.
Japanese and Chinese have been added.
Starting with this version, en will be changed to en_us, and ko will be changed to ko_kr.
When receiving an item, you can choose to receive or delete it in the preview. You can receive items one by one or all items, but if there is insufficient space, only some items will be received.

Code (Text):
default-language: en_us

database:
  type: SQLITE
  host: localhost
  port: 3306
  name: maildb
  user: root
  pass: password
  pool:
    maximumPoolSize: 10
    minimumIdle: 2
    connectionTimeoutMs: 10000
    idleTimeoutMs: 60000
    maxLifetimeMs: 1800000
flush:
  intervalTicks: 40

items:
  mail:
    gui:
      send-button:
        material: WRITABLE_BOOK
        custom-model-data: 0
        damage: 0
        hide-flags: false
      setting-button:
        material: COMPARATOR
        custom-model-data: 0
        damage: 0
        hide-flags: false
      claim-button:
        material: CHEST
        custom-model-data: 0
        damage: 0
        hide-flags: false
      delete-button:
        material: RED_WOOL
        custom-model-data: 0
        damage: 0
        hide-flags: false
  page:
    next-button:
      material: ARROW
      custom-model-data: 0
      damage: 0
      hide-flags: false
    previous-button:
      material: ARROW
      custom-model-data: 0
      damage: 0
      hide-flags: false
  back-button:
    material: BARRIER
    custom-model-data: 0
    damage: 0
    hide-flags: false
  setting:
    notify-on:
      material: LIME_DYE
      custom-model-data: 0
      damage: 0
      hide-flags: false
    notify-off:
      material: GRAY_DYE
      custom-model-data: 0
      damage: 0
      hide-flags: false
    blacklist:
      material: BARRIER
      custom-model-data: 0
      damage: 0
      hide-flags: false
    language:
      material: BOOK
      custom-model-data: 0
      damage: 0
      hide-flags: false
  language:
    gui-item:
      material: PAPER
      custom-model-data: 0
      damage: 0
      hide-flags: false
  send:
    gui:
      time:
        material: CLOCK
        custom-model-data: 0
        damage: 0
        hide-flags: false
      target:
        material: PLAYER_HEAD
        custom-model-data: 0
        damage: 0
        hide-flags: false
      confirm:
        material: GREEN_WOOL
        custom-model-data: 0
        damage: 0
        hide-flags: false
  sendall:
    gui:
      time:
        material: CLOCK
        custom-model-data: 0
        damage: 0
        hide-flags: false
      exclude:
        material: BARRIER
        custom-model-data: 0
        damage: 0
        hide-flags: false
      attach:
        material: CHEST
        custom-model-data: 0
        damage: 0
        hide-flags: false
      confirm:
        material: GREEN_WOOL
        custom-model-data: 0
        damage: 0
        hide-flags: false
  time:
    gui:
      unit:
        material: CLOCK
        custom-model-data: 0
        damage: 0
        hide-flags: false
      permanent:
        material: BARRIER
        custom-model-data: 0
        damage: 0
        hide-flags: false
      chat-input:
        material: WRITABLE_BOOK
        custom-model-data: 0
        damage: 0
        hide-flags: false
      confirm:
        material: LIME_CONCRETE
        custom-model-data: 0
        damage: 0
        hide-flags: false
  blacklist:
    exclude-search:
      material: COMPASS
      custom-model-data: 0
      damage: 0
      hide-flags: false
  delete:
    gui:
      confirm-button:
        material: RED_WOOL
        custom-model-data: 0
        damage: 0
        hide-flags: false
      cancel-button:
        material: GREEN_WOOL
        custom-model-data: 0
        damage: 0
        hide-flags: false

sounds:
  gui:
    click:
      name: UI_BUTTON_CLICK
      volume: 1.0
      pitch: 1.0
    click-fail:
      name: BLOCK_NOTE_BLOCK_BASS
      volume: 0.8
      pitch: 0.8
    page-turn:
      name: ITEM_BOOK_PAGE_TURN
      volume: 1.0
      pitch: 1.2
  mail:
    claim-success:
      name: ENTITY_ITEM_PICKUP
      volume: 1.0
      pitch: 1.0
    claim-fail:
      name: ENTITY_VILLAGER_NO
      volume: 1.0
      pitch: 1.0
    delete-success:
      name: BLOCK_ANVIL_LAND
      volume: 1.0
      pitch: 0.7
    send-success:
      name: ENTITY_PLAYER_LEVELUP
      volume: 1.0
      pitch: 1.0
    receive-notification:
      name: UI_TOAST_IN
      volume: 1.0
      pitch: 1.0
    reminder:
      name: ENTITY_EXPERIENCE_ORB_PICKUP
      volume: 1.0
      pitch: 1.0
  action:
    setting-change:
      name: ENTITY_EXPERIENCE_ORB_PICKUP
      volume: 1.0
      pitch: 1.0
    selection-complete:
      name: BLOCK_NOTE_BLOCK_PLING
      volume: 1.0
      pitch: 1.0
 
----------, Oct 9, 2025

이제 데이터베이스를 지원합니다
lang config 기본 설정을 누락시킨 점에 대해 죄송합니다

Database support is now available. Sorry for the omission of the default lang config setting.

Code (Text):
default-language: en

database:
  type: SQLITE
  host: localhost
  port: 3306
  name: maildb
  user: root
  pass: password
  pool:
    maximumPoolSize: 10
    minimumIdle: 2
    connectionTimeoutMs: 10000
    idleTimeoutMs: 60000
    maxLifetimeMs: 1800000
flush:
  intervalTicks: 40
----------, Oct 9, 2025

이제 소리의 volume 과 pitch 를 설정할 수 있습니다

Now you can set the volume and pitch of the sound

Code (Text):
sounds:
  gui:
    click:
      name: UI_BUTTON_CLICK
      volume: 1.0
      pitch: 1.0
    click-fail:
      name: BLOCK_NOTE_BLOCK_BASS
      volume: 0.8
      pitch: 0.8
    page-turn:
      name: ITEM_BOOK_PAGE_TURN
      volume: 1.0
      pitch: 1.2
  mail:
    claim-success:
      name: ENTITY_ITEM_PICKUP
      volume: 1.0
      pitch: 1.0
    claim-fail:
      name: ENTITY_VILLAGER_NO
      volume: 1.0
      pitch: 1.0
    delete-success:
      name: BLOCK_ANVIL_LAND
      volume: 1.0
      pitch: 0.7
    send-success:
      name: ENTITY_PLAYER_LEVELUP
      volume: 1.0
      pitch: 1.0
    receive-notification:
      name: UI_TOAST_IN
      volume: 1.0
      pitch: 1.0
    reminder:
      name: ENTITY_EXPERIENCE_ORB_PICKUP
      volume: 1.0
      pitch: 1.0
  action:
    setting-change:
      name: ENTITY_EXPERIENCE_ORB_PICKUP
      volume: 1.0
      pitch: 1.0
    selection-complete:
      name: BLOCK_NOTE_BLOCK_PLING
      volume: 1.0
      pitch: 1.0
 
----------, Oct 9, 2025

사용자 지정 사운드 설정이 가능해졌습니다

reload 시 변경된 언어가 적용됩니다

Custom sound settings are now available.
Changed languages will be applied upon reload.
----------, Oct 8, 2025

많은게 바뀌였고 JAVA 23 으로 업데이트 되었습니다

config.yml 을 수정하시고
바뀐 예시를 써두었습니다

이제 커스텀 아이템 설정을 완전히 지원합니다
특정 아이템 언어의 문제점을 수정하였습니다

제보해주신 초련님 감사합니다

A lot has changed and we've updated to Java 23.
Please edit config.yml and include an example of the changes.
Custom item settings are now fully supported. We've fixed an issue with certain item languages.
Thanks to Choryun for the report.
----------, Oct 7, 2025

/mail send <player> 상태에서 실존하지 않는 플레이어는 탭 키에 뜨지 않습니다

Item Model Support

/mail sendall itemmodel:STONE:100

Code (Text):
  mail_gui:
    send_button:
      material: WRITABLE_BOOK
      damage: 0
      custom-model-data: 0
      hide-flags: false
----------, Sep 23, 2025

메뉴 아이템의 custommodeldata 가 지원됩니다

Code (Text):
items:
  mail_gui:
    send_button:
      material: WRITABLE_BOOK
      damage: 0
      custom-model-data: 0
      hide-flags: false
----------, Sep 22, 2025

Material and sound settings have also been changed to be configurable. Bugs and issues have been fixed.

material 와 sound 도 설정 가능하게 변경되었습니다
버그나 문제를 수정했습니다

Please update the new config and new lang!
새로운 config 와 새로운 lang 파일로 업데이트 해주세요!
----------, Sep 21, 2025

ItemsAdder send command add

ItemsAdder send 명령어 추가


UPGRADE JAVA 24
자바 24 버전으로 올렸음
----------, Sep 19, 2025

Now Can Player Per Lang Setting

이제 플레이어별 마다 언어 설정이 가능합니다
----------, Sep 12, 2025



다국어 지원 + 이제 완벽하게 작동합니다
----------, Jul 29, 2025

헤이헤이헤이!! 헤이요~ 잘 쓰라구~
----------, Jul 26, 2025

SORRY!
----------, Jul 26, 2025

잘 쓰십쇼 휴먼

mmoitems 지원합니다
----------, Jul 26, 2025

I'm giving you this great plugin for free hahaha. Please use it a lot. Later, I'll support multiple languages. Required Plugin - MMOItems > mail send <player> <mmoitems:item>
----------, Jul 26, 2025

THIS ENGLISH VERSION
----------, May 3, 2025

비동기로 전환 + 시간 포맷 변경 LANG 파일을 업데이트 해주세요!
----------, May 3, 2025

더 좋은 성능을 내어 TPS 저하가 없습니다

+

가짜 플레이어를 제외시켰습니다
----------, May 3, 2025

언어 파일 구성과 알림이 기본적으로 비활성화 된 점을 수정하였습니다
----------, May 2, 2025

대부분의 버그와 문제점이 수정되었습니다

Most bugs and issues have been fixed
----------, May 2, 2025

Resource Information
Author:
----------
Total Downloads: 450
First Release: May 2, 2025
Last Update: Mar 17, 2026
Category: ---------------
All-Time Rating:
6 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings