π Mailbox Block
A placeable block that opens the inbox on right-click, with a floating counter above it. Configured in mailbox-block.yml.
Whether it can be used at all is mail-mode in config.yml.
Getting one
Craft it, or /mail give-mailbox <player> from console.
recipe:
enabled: true
shape:
- "III"
- "ICI"
- "III"
ingredients:
I: IRON_INGOT
C: CHEST
Three rows of three. A space is an empty slot. Recipes are vanilla, so only the base material is matched β a custom item as an ingredient is matched by its material, not its identity.
The item and the block
item:
item: head:eyJ0ZXh0dXJlcyI6...
name: "<#f2c42f>Mailbox"
lore:
- "<#E9FDFB>Place it and check your mail from here."
block: PLAYER_HEAD
face-player: true
block is what actually gets placed: a material name, or meg:<model> for a ModelEngine model.
face-player: true turns the mailbox to face whoever placed it.
ModelEngine
block: meg:mailbox
model-scale: 1.0
hitbox:
- 0, 1, 0
hitbox-material: BARRIER
A ModelEngine model is an entity, not a block β it has no collision and nothing to click. The hitbox list gives it solid blocks so players can click it and stand on it. Coordinates are relative; 0,0,0 is always included, so the list above adds one block above.
Breaking works. Hitting a hitbox block breaks the mailbox and drops the item, exactly as if it were a normal block β and only for barriers this plugin placed. Barriers anywhere else are untouched.
hitbox and hitbox-material are ignored for vanilla blocks, which already have collision.
Hologram
hologram:
enabled: true
lines:
- "<#f2c42f><b>Mailbox"
- "<#E9FDFB>%unread% waiting"
offset: { x: 0.5, y: 1.4, z: 0.5 }
scale: 1.0
billboard: CENTER
see-through: false
text-shadow: true
view-range: 1.0
render-distance: 24
refresh-ticks: 20
Each player sees their own count. The hologram is not one shared entity β every nearby player gets a private copy showing their own unread mail. %unread% and %player% are the placeholders.
| Field | Notes |
|---|---|
offset | From the block corner. 0.5 on x and z centres it |
billboard | CENTER, VERTICAL, HORIZONTAL or FIXED |
render-distance | Blocks within which a player is given a copy |
refresh-ticks | Ticks between updates. 20 is one second |
render-distance and refresh-ticks are the two that cost performance. One entity per nearby player per mailbox is fine at 24 blocks; it is not fine at 200 with fifty mailboxes on a busy server.
Notes
- Placed mailboxes are stored in the database with their position and rotation, and come back after a restart.
- Removing the plugin leaves the hitbox barriers behind. Break the mailboxes first if you plan to uninstall.