Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Mailbox
This datapack adds mailboxes in the form of barrels that can be used to send and receive items between other players. This is intended for multiplayer use on servers.
Setting up your mailbox
Simply look directly at the block where you want your mailbox to be, then run the command /trigger set-mailbox
. The mailbox will be placed at that block facing towards you. Whenever other players send you any items, those items will appear in your mailbox.
If you want to change the position of your mailbox, break your current mailbox and follow the steps above again.
Sending mail to other players
Run the command /trigger send-mail
and a barrel will appear in front of you. Instructions on what to do next will be written in your chat.
You can send mail to other players even if they are offline and the chunk their mailbox is in isn't loaded. You also do not need to have your own mailbox to send mail.
Other things to note...
- To remove the datapack, run
/function mailbox:uninstall
. - To allow players to send mail ONLY IF they are within 10 blocks of any mailbox, run
/scoreboard players set MustBeNearMailboxToSend mailbox.config 1
. By default, this is set to 0 so players can send mail from anywhere in the world. - To set a SEND-ONLY mailbox, run
/function mailbox:send-only-mailbox/set
. These mailboxes are intended to be used together with the 10 blocks rule if enabled. - The two scoreboards
mailbox.stats.sent
andmailbox.stats.received
track the number of sent/received mail for each player.
Credit to PlayerDB as it was used extensively in this datapack.
This datapack was originally inspired by this Hermitcraft video. I wanted to challenge myself to see if I could recreate it via datapacks. So here we are!