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.
I reading this plugin and i think about... lalala, mining diamond while standing next to lava, lala postman coms by and talk agens me and puching me in the lava....
@erdrickk
I think you're talking about this issue, right? There is a build there which won't throw an exception when rendering the date, that would be the reason for not being able to view any Letter at all if the following conditions are true:
1) The client has been modified to support another character set 2) The server runs on a machine with a Locale that uses such a character set as well.
However, that still doesn't solve the problem of not being able to create letters with that character set. I just want to be certain that this is what we're talking about, since it would be quite worrying if it would be possible for someone to create such a Letter without getting an exception themselves, and then send that to others who would. Please post more details on the linked issue if that's indeed what you mean!
A real fix, that is, being able to render such characters as well is unfortunately a lot of work. The Mapfont included in Bukkit only does a subset of the Latin character set (see MinecraftFont.java - this is separate from the font support in Minecraft itself)
Of course, the next version of Courier will not throw any of these exceptions. It will simply disallow writing Letters using characters that cannot be rendered.
What about the issue with sending letters to people with funky characters and crashing their client - is that fixed?
All: Unfortunately the ability to control Enderman teleportation was just postponed from "next Bukkit version" to "future" (unspecified). I will thus release a Courier version which will allow you to use other creatures as postmen shortly. For the less-than-patient a preview build with Villagers has been available from this forum thread for some time now and seems to work well.
Hey, you should have a /postall command so you can send a mass mail to all players in your server, it could notify them of events, changes, and more.
Awesome Plugin, if only it could do parcels (items) as well *hint hint*. But seriously i think the plugin would be much better if you could send normal items as well, maybe you could even send them WITH a note!
Nice job, need an option, to disable postman, how can i receive the letter directly in my inventory ?
@WhosDaMan
I will, as soon as the functionality I need in Bukkit is there ;) Until then, you might find this post on different NPCs interesting.
Thanks for the feedback!
My postman are derps. They spawn in front of the player, but when they are approached and someone triest to punch them for the paper or even look at them, they teleport away. Can you make it so couriers do not teleport and have a path that goes towards their target once spawned?
@XeonG8
Thanks! I had no idea Bukkit could even pass that event with a null item there, I will make sure to test for it in the next release. Did it start with CB 1795, and if so, does it happen often?
(As for the maps to new players, we simply put them in a regular chest. I'll look into fitting something more automated into Courier)
<<code 2012-01-21 10:45:53 [SEVERE] Could not pass event org.bukkit.event.player.PlayerItemHeldEvent to Courier java.lang.NullPointerException at se.troed.plugin.Courier.CourierPlayerListener.onItemHeldChange(CourierPlayerListener.java:120) at org.bukkit.plugin.java.JavaPluginLoader$19.execute(JavaPluginLoader.java:398) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:327) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:700) at net.minecraft.server.Packet16BlockItemSwitch.handle(SourceFile:24) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)>>
<</code>>
cb 1795
"What we do currently is to spawn new players so that they're looking straight at a sign above chest telling them to take a Letter, and pre-make the Letters. Now, this is not perfect and not likely a good solution on large public servers - but I'm also wary about adding too diverse functionality into a single plugin. I don't like it myself when I want a plugin to do one thing and it does twenty :P"
Can you describe that in more detail? what sort of sign plugin? chestshop? or one that does command signs?
Does it give them the premade letter straight to their inventory slot?
@hamstain
Thanks, and yes - it's working fine on all 1.1 dev builds I've tried :)
@SirMonsterSlayer
I'll think about how that would work. In the meantime, if you're comfortable in making edits to messages.yml, the date: variable is the unix timestamp of when the mail was created. See this site for a converter. (Always make backups, though .. )
@Leenert
What we do currently is to spawn new players so that they're looking straight at a sign above chest telling them to take a Letter, and pre-make the Letters. Now, this is not perfect and not likely a good solution on large public servers - but I'm also wary about adding too diverse functionality into a single plugin. I don't like it myself when I want a plugin to do one thing and it does twenty :P
However, I guess this could be seen as reasonable. There is an enhancement request already which is somewhat similar, voice your support there.
How to give a letter to a player who is new on the server?
Could you add alteration of the date ? so I can make some maps of "the past" ?
Looks great.
Is this safe on 1.1?
Don't mention it to anyone, but if you have a strong preference for Villagers as Postmen, there's a forum post that might be of interest.
Nah I think the problem I thought was Towny, is just the teleporting issue you mentioned
And yeah Enderpostman is cool
@XeonG8
Hey guys - feel free to add your views to the Choice of NPC forum thread ;)
Personally I believe that when I can stop the Enderman from teleporting randomly (planned for the next Bukkit version) the existing solution should work nicely. If Towny really does prevent them from spawning completely then Towny has a priority problem in the codebase. A plugin should be able to override a spawn protector and Courier does just that - and it works with at least WorldGuard.
With all that said, if there had been an API in Bukkit for me to place an item in a Villagers hand you can be sure I would've implemented them as a Postman option already ;)
i hate that idea sorry i like the postman BUT the plugin dev needs to change the courier to a villager@XeonG8