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.
@defxor When does 1.2 comes? for the Spawn Letter if the players logs in for the first time?
@Sithdown
My guess is that RealShop does not support items with enchantments. Letters are indeed Maps, but there's an enchantment placed on them where the level of the enchantment is used as a database lookup key to find the matching text content.
It's a small change, but it needs to be done to RealShop unfortunately. It's completely non breaking though - if RS already supports enchanted items it just needs to expand to include so-called "unsafe" enchantments as well.
@Mr_H4mm3r
Well, you need to wait for v1.2.0 - sorry ;)
Okay.. When people join I want them to get a letter with commands and such things. How can I do that?
I want the postman to walk to the player - not to beam. How can i do that?
thats my try:
/////////////////////////////////////////////////////////////////////////////////////////////////
Route:
InitialWait: 60
NextRoute: 120
WalkToPlayer: true
Privacy:
SealedEnvelope: true
Postman:
Type: Villager
QuickDespawn: 3
Despawn: 50
SpawnDistance: 60
/////////////////////////////////////////////////////////////////////////////////////////////////
Minecraft: 1.24
Bukkit 1.2.4-R0.1 (Build #02117)
thanks alot!
First things first: Excellent plugin, we love to use it in our server.
I have a strange problem, though: I have set a RealShop shop (chest as a shop) to sell the item "map" so the players can buy a copy of a letter.
For what I've understood, the letter IS a map item, so theoretically RealShop should be able to sell it like any other item, but such thing does not happen.
Any ideas? Is the implementation of this plugin someway preventing that behaviour?
Thanks in advance.
@darkcloud784
I've tested it briefly without issues with 1.2.3-R0.1 and 0.2 beta builds, and also with dev builds for 0.3. It seems to work fine, with caveats for whatever problems a non-RB Bukkit might have though :)
Does this work with 1.2.3?
Awesome!
I've just uploaded v1.1.6 - that should take care of the [SEVERE] Could not pass event org.bukkit.event.player.PlayerItemHeldEvent errors you've probably seen in the logs.
Courier should also work on the v1.2.3 beta versions from Bukkit, but of course hasn't been thoroughly tested since they're somewhat unstable. Please report any issues you find.
All:
Seeing "Could not pass event org.bukkit.event.player.PlayerItemHeldEvent" errors? It seems a problem where Bukkit sends an itemHeldEvent with null values has started to become common in newer builds (R6 and 1.2.3 devbuilds) and I'll thus most likely release a hotfix for this issue tomorrow. Thanks to all who have reported it, the tickets you've filed were much appreciated in understanding how common it is :) A fix has already been sent out for beta testing and feedback.
See this ticket for more info.
(While the error message looks horrible in your logs, it shouldn't actually have any bad effects on your server, the players or Courier)
@disciple218
The 1.1.5 release was updated for the changes Bukkit made for R5, which became R6. I'll update the file description to point that out, but as far as I know it's already compatible. If there are any problems please post tickets :)
@megge208
There have been a few such suggestions, yes. I've put them tentatively as possible things to do in the future, mostly because I don't want Courier to become too bloated and also because similar functionality could already be accomplished by using Courier together with other plugins.
If I do it, it will likely be command-less.
Really love this plugin! CB 1.1-R6 compatibility would be great!
Could you maybe implement an other possibility of retrieving mails i.e. a kind of "mailbox" (a sign, special blocks (by id or by "markup" (something like /courier mailbox, then r-click a block))) so people can only get their mails by rightclicking the mailbox.
Would that be possible?
@bitfreeze
Hmm no, Vault should take care of that. Do you see "Courier has linked to iConomy 6 through Vault" in the log when starting up? If not you probably need to verify your Vault installation.
(Actually if you've set UseFees to true and Vault isn't installed it should display one error message, and if Vault is installed but it doesn't manage to find an economy plugin it should display another. If everything looks normal in the log I am slightly confused)
edit: I'm also assuming the player in question hasn't been given the courier.theonepercent permission :)
@defxor
sweet that will be amazing, but until then the rest of this plugin is still, well, amazing! Nice work! :D
@ztiffmeister
Well, maybe, but likely not until you give me a wee bit more information to go on ;) (Version of Bukkit, version of Courier, what type of Postman you've configured). The most common reason for why Postmen never appear is that some other plugin is stopping them. If using Enderman as Postman and you have a plugin to stop mobs from spawning in towns etc then that could be why. Courier tries to get around such spawn protectors but depending on how they're written it might not succeed. Changing Postman type to Villager should work if that's why.
@AnotherP
PermissionsBukkit uses the built in Bukkit permission system ("Superperms") so yes, that should work.
Regarding the new player letter, currently we're doing that manually (pre-made Letters in a chest) on our small private server. However, being able to create a kit to make it automatic for all new players will come in v1.2.0.
oh and in one of the pictures it says "hey new player!" how do you make it so a player gets a letter the first time the spawn and every player will get that same letter the first time they spawn?
Does this work with permissions bukkit?
It doesnt work for me. The postman never shows up.. any idea whats wrong?