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.
Hey, can you add an option in the config that just uses the OP system from the vanilla mine craft.
Thanks
Oh also, minor bug thing, but if someone has a username close to the 16 character limit it runs right off the side of the map/letter.
I second Bdl2's suggestion that you look at BookWorm as an example of how this could be done, maybe with Paper instead of Maps. I'd also suggest adding Spout support for reading and writing letters, similar to BookWorm (http://dev.bukkit.org/server-mods/bookworm/). Spout would even allow you to have a custom block like an envelope. As an alternative to the Enderman delivery please consider allowing letters to be sent using Mailbox (http://dev.bukkit.org/server-mods/mailbox-plugin/). I'm excited to see this mod mature. Keep up the good work!
@defxor
i switched from permissions to bpermissions that you use because also simple region market forces me to use some permissions Plugin that supports Superperms.
after i finally reconfigured the perms i was able to send a message (:
nice plugin i guess my ppl will like it! hope you may get a solution for the limit. its feels weird that it could break etc.
but nice Work! rly like it.
@RedstoneRising @Bdl2
I love suggestions on how to minimize commands and make the experience more immersive :) I agree that requiring (configurable) paper and from that being able to write a letter as a separate activity from posting it is probably a good way to go.
@Montpelier
Unfortunately the way Minecraft handles MapIDs (one single counter, always counting up when a new map has been created) is very simple. When the maps have been created they're created (and the counter increased) for that world indefinitely. I would be very wary of trying to in realtime edit that counter between creating Courier Letters and then giving the lower value back to Minecraft, and I would in any case still need to solve reuse of already created IDs. I might dive through Bukkit and MC code and see if it's worthwhile though - thanks for the suggestion.
@martinherrmann
That sounds weird, the only thing I do besides the regular hasPermission check is that I take whether it's the console or a player into account. If you were to try to post a Courier Letter from the console you would indeed, always, get permission denied back. I use bPermissions myself but from what I could see your files look good. If anyone else using it who reads this could take a look it would be much appreciated.
Okay i downloaded it and installed it. No errors and such.
but if i type in /post Blacksword Hello i just get the "you dont have permission" promt. i checked it but i gave the group the perms. then later i tryd to give it just to me and it didnt work as well.
i dont know what to do. here the link of my groups and users permissions. all the same for all worlds. Users: http://pastebin.com/d21tvaeu Groups: http://pastebin.com/fA16RB6b
The Member Group is for all regular and the Mhn Group is the group where i am in.
Good god this is awesome! Great work on this :P
Quick suggestion: Could you start the ID creation from something like 1000 to ensure maps and posts stay separate for now until a better alternative arrives? It'll make it much simpler to clean up afterwards without losing people's maps.
First off - love the plugin. A lot. When I saw the 'postman' enderman come up to me and hand me a letter, I was floored. That said, I'd like to make two suggestions, one that would make me *very* happy, and one that may help you figure out a way to handle the removal of old maps.
1. I would absolutely love it if there were a way to write on these in a way more akin to how BookWorm handles it's books. (I.E., a command like /note that would allow you to write on the paper without it having to be a letter to someone. You could then leave the note in a chest, hand it to someone yourself, or just keep it.)
2. If you're looking for ways to remove items like these maps (which have specific data values), you may want to look at (again) BookWorm or MagicSpells. Both of these plugins assign temporary data values to items that can be reassigned when the data value is no longer in use. I'm not privy to the specifics, but if they can do it, you should be able to as well.
BookWorm: http://dev.bukkit.org/server-mods/bookworm/
MagicSpells: http://dev.bukkit.org/server-mods/magicspells/
(MagicSpells is a large plugin. The 'spells' in particular that do this with data values are 'tome' and 'scroll', which assign data values to books and paper, respectively.)
Thanks again for making this plugin, it's going to become a staple on my server. :3
Suggestions:
- iConomy Support – Must have paper. – Config setting to let anyone read any paper. Secret documents?
Hey people, thanks for the nice comments. I'm currently fixing a few issues (nothing major) found by myself and others and a v0.9.1 should appear shortly.
@subflame11 Yes, some sort of "expiry date" is a possible solution, or actively burning the letters in a furnace ;)
@RedstoneRising Economy support for postal fees is high on my list. It's one way of making sure no one reaches the 65k limit before recycling has been solved :)
(A short roadmap could be 0.9.5 = economy, 1.0.0 = recycling. We'll see)
This seems amazing! How about iConomy support for how much sending a post costs?
This is way nifty. :D
Nice idea !
Please keep up your good work!
How about... players get a mailbox kind of like WoW where its like you open a mailbox and you have your mail there and can make copies of it and take the items out, so maybe someone could do like /mailbox and itll open a virtual box with all their mail and stuff inside it and after a set number of days that letter is deleted and the number freed up