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.
@o0Julia0o
I assume so, yes. There have been no breaking changes to the Bukkit API announced and Courier does not touch internal functionality in CraftBukkit (which is the reason for many plugins breaking between updates). I haven't had time to test it myself, but anyone who does feel free to let the rest know and I'll update the version indicator here as well :)
is it(1.19) compatible with craftbukkit-1.4.7-R0.1 ?
@failtolawl
That sounds incredibly strange - but strange bugs sometimes do manifest themselves :) The "Blank Letter" bug fixed for v1.1.9 only appeared in one server out of the 10000+ or so I believe to be using Courier and it only happened because one of the files in the world/data folder had been overwritten for some reason outside of Courier's control.
However, I'd like to find and fix even such strange bugs. Unfortunately any bug that isn't reproducible anywhere but on your system is of course very hard for me to find. Do you know of any reason why it would suddenly stop working on your system (i.e, other upgrades or plugins or something you changed at the same time)? "Blank Maps" sound similar to the one I mentioned above - an overwritten file - but for postmen to continuously spawn that means that Courier is unable to write to its own folder/messages.yml - where the "delivered" flag exists.
So, I'd start by checking file and directory permissions (esp. messages.yml). If you can't find anything that might've changed in your setup please send me a PM and we'll take it from there.
ok, after some time it decided to break in a different way. every time people log in they get a courier that gives them a blank map, and they continuously spawn giving blank maps.
@failtolawl
Great to see you got it working. Just to make sure it's not because of a misunderstanding, /courier unread is not meant to be used in everyday situations. Postmen go on their scheduled rounds according to the settings in the config (first round 10 seconds after the first player joins the server, then every 60 seconds. Default values of course) and are unaffected by the unread command.
Let's say someone was near you when your postman came and delivered your mail - and they decided to click the postman and grab it from you, either by purpose or by mistake. Now you'd never be able to receive your mail since it's already been delivered. That's why /courier unread exists. It will schedule new deliveries (still according to regular postman rounds) of all mail delivered but not read by you. (Where read status is set first time you hold the Letter in your hands).
In retrospect maybe I should've named it differently, it seems easy to misunderstand its purpose.
@packbackrGJ85
For some reason it took awhile, but it decided to work after some time. Strangely....
@failtolawl
Does a message appear in chat when he attempts to deliver your letter saying that he failed? If so what is it?
And /postman works because it's intended for OP use to make an immediate, forced delivery of a letter. /courier unread is for everyone.
@defxor
I went around to all my plugins and there should be no limits on the spawning of the mob, keep in mind I am using a Villager. Console doesn't appear to say that he cannot spawn.
and also ,why would it work for /postman, but /courier unread says he will make deliveries but never actually spawns, it doesn't even say he has arrived.
here is my config
http://pastebin.com/wM1bipCy
thanks
@defxor
Finaly colours :) I was wondering because in the screenshot ''Courier'' was in blue.
Also thx for the quick reply i will create a ticket now.
Courier v1.1.9 uploaded.
Major new functionality: Letters (in-hand as well as in ItemFrames on walls) can now contain colours.
I also hope the rudimentary support for not betraying vanished players work as it should and that immediate rendering of Letter text will make Courier feel somewhat quicker.
The next version will contain support for Parcels; pre-packaged Letters that can be sent to new players on a server (or directly placed in their inventory) as well as scheduling Letters to be sent to all players on a server whenever they join.
Remember to write up your suggestions on what you would like to see in Courier, and how it should work, as tickets. One often requested functionality is to be able to attach items to Letters - but I would like to hear opinions on how it should work as immersively as possible without the use of a lot of commands.
@failtolawl
The only two reasons I know for Postmen not appearing would be either server settings disabling the selected Postman mob (see this issue) or mobspawn limiting plugins that Courier is not able to work around. Could that be it?
(Regarding /courier unread all it does is going through a Players post seeing if there are mails that have been delivered but never read, and delivers them again)
@Coldazz
I agree it looks weird now that Minecraft added lore to actually see how Courier works under the hood, but it's critical for its functionality :) The only way Courier knows which Letter (Map) should show which text is the enchantment level. As you see it's different for each item and matches the id in messages.yml. However, I've been thinking about adding that id field to the actual lore instead and removing the enchantments. It's something I might explore for the next version, or soon after that.
Rest assured though, it's not there to look pretty ;)
With regards to the possible bug I'm not sure I follow. Is it the lore text you mean? Please create a ticket and write up what I need to do to replicate it.
@defxor
Is there a way to remove the enchantment its a nice idea but i don't like it saying unbreakable.
Also i think im having a bug where it does not say Courier letter but map #45 for example. This only happens when I send the letter.
I am having an issue where the postman doesn't deliver to me unless I type /postman, anything I send out doesn't actually go anywhere, even if people type /courier unread
@PackerbackrGJ85
Thanks :)
I'm planning to have Parcels (pre-packaged Letters that will either be sent/placed with all new players or sent to all players) in v1.2.0. First iteration will not support groups but I'm assuming that's where I'll need to take it.
Thanks for the idea on making copies of Letters. Preferably it should be crafted just as you can make copies of regular Maps in Minecraft, but for those server who don't use crafting to create Parchments in Courier I can understand skipping it for copies as well.
I'll begin testing 1.1.9 soon as I can.
I also wanted to know if there's a way for ops to duplicate a letter that is held in their hand? Or perhaps retrieve a letter from the messages.yml? If it's not implemented, perhaps /copyletter or /retrieveletter <letter id>?
Beta version of v1.1.9 released for testing. Don't forget to let me know if you use it and it works fine. I'm assuming you'll let me know if it doesn't work as it should ;)
I love this plugin! The people on my server don't bother with it but I like it! I wish we could attach items with the message! It would help me a lot to give stuff to players when they're not there. Otherwise, this is one of my favorite plugins along with WorldEdit! I love the ability to post letters!
@defxor
That really sucks because this is probably the coolest postage plugin I've found, but writing a letter with it is too much of a hassle none of my members are even slightly interested in using the system because of the amount of work that has to go into what can be accomplished just as easily using books and private-magnet LWC chests :/
I hope you consider the implementation of books, or some way to force the editor onto the maps because I really like your plugin in every other regard!
@Ethrock
There's currently one bug reported on v1.1.8 that I consider to be critical (and also extremely rare with only one reported case) - when found I'll release v1.1.9 and it will then include whatever I've implemented up to that point as well. If my hunch is correct (and I actually just tested it so I believe it is ;)) you'll get immediate rendering of letters as well in that release. edit: Implementation now done and works fine.
With regards to "just" adding books to Courier it's a bigger change than you might think. I've pondered trying to hook into the editor but I doubt it's going to be possible using only Bukkit APIs (and Courier will never hook CraftBukkit).
@defxor
Any ETA on when I could expect that update?
The reason I would prefer books over maps, is that maps require users to use /letter over and over again, use \n when necessary. The pain here is that sometimes you think you need to use \n but it turns out the word would have fit, or when you think the word will fit and so you don't use \n, then use it after that word to start a new line, but since the word didn't fit you now have an extra gap.
It's also clunky and counter intuitive, and I want to mail out a whole tutorial on how to use the system, with basic instructions on the first page and etc. as it progresses but it's such a pain in the ass to write a letter more than a few lines long. It's a painful hassle.
I'd rather be able to have a post office sell books that players can mail to each other, or allow them to mail books. I grant that it's nice they are a unique item, but I don't think it's worth the painful hassle it has resulted in, since there is no direct method to edit the typeface on a map.
The only problem is I can't find a half decent book mailing system anywhere, and I like the idea of the mobile postman.