Courier
Courier
A player to player mail system for Bukkit Minecraft servers
by defxor
Allows creation of text note items and sending of letters to players no matter if they're online or offline. The letters are delivered by postmen at intervals specified in the config file, and letters can be stored and handled as any other item for later reading. We wanted something that not only allowed us to pass notes to each other, but also felt like it was part of the regular Minecraft environment.
We believe we succeeded.
- - -=< Latest version >=-=< Videos >=-=< Tickets >=-=< Forum >=-=< Source >=- - -
Usage
- /letter [text]
- Creates a Courier Letter with the supplied text. Hold the Letter in your hands and write /letter [text] again to add more text to the Letter. Use &nl or \n to insert newlines. Multiple page Letters are supported, use right-click and left-click to turn the page.
- /post [playername]
- Sends the Letter held in your hands to another player, name verified to be a player on the server. Depending on the config, the received Letter will be privacy-locked to that player (can be unlocked by simply adding text to it with /letter).
- /courier fees
- Lists the fees, if any, that apply for sending mail or creating letters
- /courier unread
- Requests re-delivery of all unread mail, even if they have been delivered to you before. Courier knows the difference between a mail having been delivered and actually read, and this is meant to be used in the cases where you've managed to misplace the Letter without having read it first.
- /postman
- Intended for OPs only, if postman delivery happens seldom and you want to force one to appear. NOT NEEDED in actual gameplay.
To receive messages, simply poke the friendly postman when he appears or right-click him to receive the message directly into your hands or inventory.
The strings "%loc" and "%pos" will be replaced with the current X,Y,Z position in any Letters written, if surrounded by spaces.
Permissions
Quick version: Give your players courier.write, courier.send and courier.list
Long version:
- courier.write
- Allows players to create Letters (default: op)
- courier.send
- Allows players to send Letters to other players (default: op)
- courier.list
- Allow players to see name suggestions if there's more than one match when sending (default: op)
- courier.info
- Allows seeing command help, fee structure and requesting of re-delivery (default: true)
- courier.theonepercent
- Allows posting of mail even if you have no credits and Economy support has been activated (default: false)
- courier.privacyoverride
- Allows the player to read privacy locked Letters (default: false)
- courier.useitemframes
- Allows the player to put Letters into ItemFrames (default: true)
(For anything but the defaults a Superperms compatible permissions plugin needs to be installed)
Configuration options
- Privacy.SealedEnvelope
- Whether Letters that have been Posted to another player should only be possible to read by that player. If you want to change this option, please read this forum thread. (default: true)
- UseFees
- Whether Courier should activate and require Economy support through Vault. (default: false)
- Fee.Send
- The postal fee withdrawn from the player if UseFees is set to true (default: 10)
- Fee.BankAccount
- The Bank or Player account fees will be deposited into (default: none)
- UpdateInterval
- The interval between checks towards dev.bukkit.org to see if there's a new version of Courier available. A value of 0 disables. (default: 18000 seconds)
- Route.InitialWait
- How long will Courier wait until sending out the first postman after players have started joining the server (default: 10 seconds)
- Route.NextRoute
- How long between rounds. This is the maximum amount of time a delivery can take between two online players (default: 60 seconds)
- Route.WalkToPlayer
- Currently not functioning due to changes in Minecraft.
If friendly postmen (Villager) should walk up to players or not. Unfriendly mobs (Enderman) ignore this setting and never do. (default: true)
- Postman.Type
- Which Minecraft Creature to use as Postman. Courier will accept all valid Creatures but only 'Enderman' and 'Villager' are supported. (default: 'Enderman'). Note: This setting is case sensitive! 'villager' does not work, 'Villager' does.
- Postman.QuickDespawn
- How quickly will a postman despawn after having taken damage or delivered the mail (default: 3 seconds)
- Postman.Despawn
- For how long will a postman stay around each round waiting for the player to take his mail (default: 20 seconds)
- Postman.SpawnDistance
- What's the maximum line of sight distance a postman will spawn in front of a player (default: 10 blocks)
- Postman.BreakSpawnProtection
- Whether Courier should try to override mobspawn protection in order to spawn its Postman (default: true)
- Postman.VanishDistance
- The distance a Postman will check to see if a vanished player would be betrayed by appearing within (default: 20 blocks square)
- Postman.CreativeDelivery
- Whether Postmen should deliver mail to Players who are in Creative mode (default: true)
- Letter.ShowDate
- Whether to display the date a Letter was sent or not (default: true)
- Letter.FreeLetter
- If players should receive free Letters or if they need to have the necessary resources (default: true)
- Letter.Resources
- List of resources needed if FreeLetter is set to false. Example: [CobbleStone, Paper, CobbleStone] (default: [Coal, Paper])
- Letter.RequiresCrafting
- Whether Courier should just deduct the resources or if players need to manually craft letters (default: false)
- Letter.Frameable
- Should it be possible to put Courier Letters into ItemFrames - in effect creating posters/flyers (default: true)
In addition to the above all user visible strings can be edited. Some translated configs are available in the translations folder as well in the plugin data folder. Move and rename them to 'config.yml' to use.
Trivia
As you've understood (and seen if you've looked at the in-game images) I use Maps to render Courier Letters. If you're a plugin developer and your plugin handles maps and you either want to make sure your map system isn't screwed up by Courier Letters, or maybe if you want to handle Courier Letters in a special way, you can easily identify them:
The actual Maps used by Courier to render Letters ALWAYS have their X coordinate set to 2147087904 (or INT_MAX - 395743, if you want).
The ItemStacks(Material.MAP) that point to those Maps are Enchanted with DURABILITY and the enchantment level is used as a database key to find the matching text.
Release history
- 2015-05-14: v1.2.1 uploaded
- 2015-05-09: v1.2.0 uploaded
- 2013-01-16: v1.1.9 uploaded
- 2012-12-30: v1.1.8 uploaded
- 2012-12-20: v1.1.7 uploaded
- 2012-03-04: v1.1.6 uploaded
- 2012-02-25: v1.1.5 uploaded
- 2012-02-13: v1.1.1 uploaded
- 2012-01-31: v1.1.0 uploaded
- 2012-01-15: v1.0.0 uploaded
- 2012-01-02: v0.9.6 uploaded
- 2011-12-30: v0.9.5 uploaded
- 2011-12-27: v0.9.2 uploaded
- 2011-12-26: v0.9.1 uploaded
- 2011-12-23: v0.9.0 uploaded. This page created.
(see the Changelog for detailed information)
Known issues
- Moving Letters between slots in creative mode (/gamemode 1) causes them to become empty later (eg. after logout/login)
- This seems to be a Bukkit issue, please do not handle Courier Letters in creative mode until this is better understood.
- Courier does not support extended character sets, it will skip such input when writing Letters.
- This is due to Bukkit Maps only supporting the 'old' standard Minecraft Font. If support is extended in Bukkit I will implement it into Courier as well.
- ... and all open tickets and issues, of course.
Future development
This plugin is looking for a new maintainer. The original author does not play Minecraft any longer. The update to Minecraft v1.8 could only be made thanks to a pull request having been made at Github. Do not expect any future development until a new maintainer can be found.
Had some fun with it today, my only real complaint is how useless postenderman can be :P
He can be such a slacker never showing up, or showing up only to disappear so quickly :D I think a priority mail service is needed, one that doesn't seem to be effected by Towny and its anti-mob toggle (if that is any cause). Something that just slips the letter right into another players hands or at least into their item bar / inventory
srry for all the suggestions but u should make it o a BRAND new member gets a preset message on login with the map in their hands :D please pm me about custom features
oops mabye short names ( my name is junksintrunk so mabye my members can just send it to junk ) also about the mailbox mabye u hold a map and type the command ... type the message and go to a post office :D willing to pay for my own version ( real $$)
hey i got a good idea ... mabye u can add iconomy so when u attach items u have to pay for the item and mailboxes so some 1 can put [post] on the back of a chest and if the player is offline at the time the post is sent it goes into his/her mailbox make it so admins can read ANY mail message
v1.0.0 released
I figured I couldn't get any more information than I already had from my beta testers (thank you guys!) and so I went ahead and released it. Those of you who already have existing Courier installations please please back up your worlds and the Courier folder. There have been no issues during beta testing but the changes to how Courier works are major - no more will you risk running out of MapIDs ;) The existing Letters are converted in real time when accessed.
If you see any weird error messages in the log (besides "Case sensitive database found, rewriting" - that one you should see) please post on the forum and PM me immediately. No messages will be lost but it's important to not let old-Courier and new-Courier go out of sync.
v1.0.0 includes all the major functionality I had planned beforehand, I will now be able to take a good look at all the great suggestions you've given me! :)
The intended-to-be final beta before 1.0.0 is now in testing - v0.9.11 if you happen to stumble upon it on a server you're playing on. (And let me know in PM if you want to beta test yourself)
http://dev.bukkit.org/server-mods/courier/forum/30212-courier-1-0-0-planned-roadmap/
FYI: I've tested Courier with the 1714 Bukkit devbuild for Minecraft 1.1 and it seemed to work just fine.
I wish we could chose the mobtype.. I'd rather use a villager than a useless teleporting mailman xD
Do you want to betatest?
(Note: I'm talking about true betatesting - not just being allowed to play with new functionality before everyone else. While I think the code is stable the point of betatesting is to squash potentially catastrophic bugs .. )
I've finished up what I believe to be a working solution to the MapID exhaustion issue over the last few days. The code also happily converts existing Letters over to the new format when those are picked up or read. The reason I want betatesting is due to the way I've "solved" (if I have) the problem, I'm worried there might be subtle bugs caused either by things I don't know about in Minecraft or by other plugins.
If you're interested (the ONLY new functionality you'd be getting at the moment is an end to new Maps being created, Courier will handle everything with just one) then please send me a PM.
I'm interested in both those of you who have been running Courier for a while and understand to backup both your world and the Courier messages.yml, and those of you who haven't been using Courier and want to start clean.
Thank you :)
Awesome plugin! One of my favorites! I also can make a banner >.> don't know if you want one
@plokm
Hi and thanks for your thoughts :) I'm indeed developing on my "fix mapid exhaustion" branch atm, but unfortunately all the "easy" solutions seem to escape me. The problem with the MapID is that it's handled by Minecraft, and it's one single counter always counting up whenever a map is created. There's no possibility for me to create a map of a specific ID (besides - which would probably work but be VERY crude! - create the files manually).
I have turned all APIs I can find inside and out, but the only reliable data structure that's persisted in maps is the map id (which is the durability short when represented as ItemStacks) - and for each player to be able to carry/store more than one individual Letter I need some sort of persisted identification.
One viable solution, which I've outlined and might choose, is for each server admin to specify how large a part of the MapID space (65536 in total) they want to allocate for Courier Letters. That space will then be handled by Courier which will do internal re-use whenever it runs out of allocated MapIDs - that is - retire old Letters.
I'll make note of your suggestion of allowing admins to manually do more specific cleanup - I'll copy some of the text we've written on the subject here in the comments into a forum thread now. Thanks!
Sorry if this kinda sounds like two similar ideas pushed into one, as I did some research *after* I should have, thus requiring me to change this post/idea a little.
Forgive me if this was said (I didn't read many comments), but I imagine it would be pretty simple to temporarily pre-solve your problem of running out of map spaces by making your plugin make maps starting at 65536 and working downward, and once it reaches a certain number it could throw a message to ops/admins/console, with possible configurations to auto-delete older maps, first created maps, or maps created by players who have created a a specified number of maps.
When your plugin creates a message, it could add that maps ID to a text file. You could also add a few notes with each map ID to the text file, such as CreatedBy, SentTo, DateCreated, etc.
Then, an OP/Console/permissionlyperson could issue any of the following commands:
/couriercleanup {MessageDate} - Would use the DateCreated field to simply delete all messages created before the given date
/couriercleanup {CreatedBy} - Well, you probably get the picture here.
/couriercleanup {SentTo} - Again, you probably know what I'm going to say here.
You could even make all three arguments work together with 1 slash command.
Why cleanup by specific users? When people stop playing, kill their messages first. Specially if they stopped playing because you banned them. This would also be able to kill any griefing attempted to the map system.
And then, the original command I thought of:
/couriercleanupop - Deletes every single map ID saved in the text file.
@SirMonsterSlayer
Could you file a ticket enhancement outlining your thinking please?
@HockeyMike24
If you try pasting your edited config into this site, does it validate without error?
@Flenix1
When the Endermen couldn't spawn, were you running v0.9.5 or v0.9.6 of Courier? If the latter, which protection plugin are you using? There's an override in v0.9.6 that works with at least a few.
For NPC selection discussion, please join in on the forum :)
It doesn't seem to work. Is there supposed to be an NPC? We just get a message "A postman has arrived with your mail" and thats it. Everything is still undelivered according to the config, and noone sees anything.
Also, is it possible to set up "mail boxes" for the postman to deliver to, instead of directly to the player?
EDIT: Found it was an enderman delivering. Allowed them in towns now and its working fine...
Any chance we could have an NPC/Villager do it? Then it wouldn't conflict with mob plugins.
People on my server love this plugin, every time I try and edit the config the commands stop working.
Could you add some kind of "server message" ? I would like to trigger a mail per command. While using other plugins. So I can send mails to people who do certain stuff like "read the rules" or something along those lines.
I hope you get what I mean =)
@Misakiraa
Thanks, then the spawn protection override seems to work with Residence as well :) The teleportation you see is an unfortunate side effect of using Endermen, but the APIs I need to solve it are scheduled to be in the next RB - see "Known issues".
(Being indoors vs outdoors is usually enough for them to stay around until then)
With Residence (lastest devbuild), they spawn and disappear, sometines they stay, that's weird.
@Misakiraa
Other NPC discussion on the forum - please chime in.
But I'm interested to know which protection plugins that the "break spawn protection" from v0.9.6 doesn't work with, since I'd like to discuss event priorities with those authors :) Could you please let me know which one Courier isn't managing to spawn Postmen with at your server?
can you add the ability to use a NPC (npclib) as postman ? Enderman is a mob so it is blocked in a mob-free area (town, protected residences..)