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.
All: I made a quick test with Bukkit v1.4.6-R0.1 and Courier v1.1.7 seems to work fine. Let me know if you find any issues my quick test didn't manage to catch.
I've also been notified that the change in Courier to disallow delivery when players are in Creative mode might be unwanted by some of you. While I still believe there are serious problems handling Courier Letters in Creative mode, I've made a special version where it's possible to allow delivery to players in Creative mode with a config file setting. I'm not sure I'll release a new version of Courier with that change only, but you can find the test version in this forum thread. (If you don't absolutely need that functionality please just use the regular released version).
All:
Well, since Bukkit v1.4.5-R1.0 was just released I uploaded Courier v1.1.7 as well due to the otherwise breaking changes in that version. Less testing than usual, I hope it works as it should. Always backup before upgrading.
(I'm not sure v1.1.7 works if you're _not_ using Bukkit v1.4.5-R1.0 btw)
With regards to "[SEVERE] Could not pass event EntityChangeBlockEvent to Courier v1.1.6" errors visible in the log - there have been changes made in Bukkit for 1.4.5 R0.3 (still dev status) between build #2504 and #2505. These changes will force many plugin developers to have to release a new build of their plugins - and Courier is one such plugin.
If you don't want to see those errors, I suggest not using the latest dev builds ;) If you do, it's not a fatal error. If you use Enderman as Postmen it means they will move blocks around, if you don't use Enderman I don't believe it will affect you at all.
I'll release a v1.1.7 test version shortly for those of you on dev builds, and it will be ready for general release when/if Bukkit releases another beta or final build.
@rellac
I'd love to be able to do that myself :) I think I need new APIs in Bukkit before it's possible though.
@diannetea
I've made a ticket from your post - can you please add which version of CraftBukkit you're using to it?
2012-12-10 11:08:02 [SEVERE] Could not pass event EntityChangeBlockEvent to Courier v1.1.6
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at org.bukkit.craftbukkit.v1_4_5.event.CraftEventFactory.callEntityChangeBlockEvent(CraftEventFactory.java:468)
at org.bukkit.craftbukkit.v1_4_5.event.CraftEventFactory.callEntityChangeBlockEvent(CraftEventFactory.java:452)
at net.minecraft.server.v1_4_5.PathfinderGoalEatTile.e(PathfinderGoalEatTile.java:67)
at net.minecraft.server.v1_4_5.PathfinderGoalSelector.a(PathfinderGoalSelector.java:104)
at net.minecraft.server.v1_4_5.EntityLiving.bl(EntityLiving.java:1435)
at net.minecraft.server.v1_4_5.EntitySheep.bl(EntitySheep.java:44)
at net.minecraft.server.v1_4_5.EntityLiving.c(EntityLiving.java:1233)
at net.minecraft.server.v1_4_5.EntityAgeable.c(EntityAgeable.java:68)
at net.minecraft.server.v1_4_5.EntityAnimal.c(SourceFile:33)
at net.minecraft.server.v1_4_5.EntitySheep.c(EntitySheep.java:52)
at net.minecraft.server.v1_4_5.EntityLiving.j_(EntityLiving.java:508)
at net.minecraft.server.v1_4_5.World.tickEntity(World.java:1459)
at net.minecraft.server.v1_4_5.World.entityJoinedWorld(World.java:1421)
at net.minecraft.server.v1_4_5.WorldServer.entityJoinedWorld(WorldServer.java:570)
at net.minecraft.server.v1_4_5.World.playerJoinedWorld(World.java:1411)
at net.minecraft.server.v1_4_5.World.tickEntities(World.java:1289)
at net.minecraft.server.v1_4_5.WorldServer.tickEntities(WorldServer.java:464)
at net.minecraft.server.v1_4_5.MinecraftServer.r(MinecraftServer.java:564)
at net.minecraft.server.v1_4_5.DedicatedServer.r(DedicatedServer.java:222)
at net.minecraft.server.v1_4_5.MinecraftServer.q(MinecraftServer.java:478)
at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:413)
at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856)
Caused by: java.lang.NoSuchMethodError org.bukkit.event.entity.EntityChangeBlockEvent.getEntity()Lorg/bukkit/entity/LivingEntity;
at se.troed.plugin.Courier.CourierEventListener.onEntityChangeBlock(CourierEventListener.java:252)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339)
... 26 more
can you add lore to this plugins maps
Would be great if specific letters could be posted onto item frames. I loved the ability to be able to create notices that aren't constrained to the 4 lines of a sign, but was gutted when I discovered it depended on the letter you last looked at.
Ojje. Grattis till att bli pappa! :)
This is a great plug-in. To maximize it's potential for admin's to communicate important messages to a large player base you could add a command for admins to send the same letter to ALL players on a server.
Further refinement may be to send a letter to all ONLINE players, or only OFFLINE players.
Cheers
@ryvix
That sounds great :) I will test myself later this week.
@Maddis1337
Sorry to hear that. You can create sort of a spam protection with the options Letter.FreeLetter and Letter.Resources in the meantime.
Somebody just crashed my server by using a macro with the /letter command and issued that server command several thousand times. Not sure if it's bukkit would have crashed anyway, but a spam protection would be great.
Hey, just wanted to say that this seems to work fine in 1.4 from my limited testing.
All,
I just read about the Map updates in Minecraft 1.4 and suspect those will affect Courier. I just want to let you know that I will take a look at it as soon as there's a matching Bukkit available.
@defxor
Thanks for the quick reply. Congratulations on the newest edition to your family! I completely understand how a baby can take up your time, as I find myself dropping everything to kidnap... er, babysit... my 6-month old nephew. It is a heartwarming experience and something I very much look forward to, which is why my wife says I need to wait until I am done with my last year at college!
I will be testing Courier later tonight and will let you know how it works out. :)
@Bimmr
Letter deletion is in the mythical v1.2.0 version that has seen no work since March. You can either burn Letters in furnaces or simply drop them on the ground and they will be removed from the database.
One of the things not implemented in v1.2.0, but planned, is Letter management from the admin console (and by ops) where it would be possible to remove Letters still in "use" by players.
@Godpuppet2
Some of those things are existing tickets planned for the future, some not :) Feel free to add those things you don't see there as of yet, but see next reply when it comes to possible implementation time.
@Nuinethir
Hi, and no :) Courier is not dead. However, I became a father (my first) a few months ago and there's no time going into it at the moment. The private server where I used to test new versions of Courier also have no active players nowadays and thus I lack beta testing (v1.1.7 is implemented since weeks back, I think, but untested).
If you use the latest version of Courier and it works as it should with the latest version of Bukkit, please let me know and I'll update the information here. Since Courier only uses official APIs I'm quite sure it works fine.
For the future: I'm Swedish, and when we go on paternity leave we don't kid around. In 2.5 weeks time I'm going to take 15 months off from my day job. It's possible I will be able to spend more time on Courier then, although taking care of my newborn baby is somewhat prioritized ;)
Is this plugin dead? I was hoping to use it on my server, especially with the implementation of books (instead of using maps). Any chance of an update in the future? Thanks.
Hey I run an RP server, this would be quality to add.
Is there anyway you can link this with WorldGuard. IE I create a Courier Office, and setup the flags so that you can only send or recieve mail inside that courier office?
Perhaps link retrieve mail to a sign? Or maybe just slash command to retrieve straight to inv? IE so no enderman for postman.
Would create more RP realism as players cant randomly make this command anywhere, and it appears like they're "collecting" and "sending" their mail in the office.
If you could add this, we'll deffo use and ill see if we can donate :D
How do you wipe a letter from server? So it's not being tossed back and forth between players?
@defxor
Have a look at this api maybe it can help you Api topic Api code