Postal
There is no substitute for personal service.
New
- GPS address plotting and compass navigation, Detailed item shipment.
- New WorldGuard, Towny and Dynmap support. New bulk mailing capability.
Introduction
Postal is a Craftbukkit plugin dependant on Citizens2. It is a messaging system making it possible for Minecraft players to communicate with one another using the book and quill, written book item. These written communications may span worlds. Postal is an animated postal presence that may be added to any Minecraft town, settlement or mailroom. Chests are used as residence mailboxes as well as mail storage in local post offices.
Postal Pages | ||
---|---|---|
Getting Started | Permissions | Economy Support |
Towny Support | WayPoint Editor | System Notes |
Postal Wiki |
Postal Crew
Citizen2 based NPC’s are the Postal crew. They are the postmen spawned and dispatched by Postal. These NPC postmen walk regular routes in towns serviced by Postal post offices. A central post office connects all of the local post offices by teleporting a NPC worker called the PostMaster from town to town, or world to world. This central NPC continually monitors and moves out of town mail to the appropriate destination. The local NPC postman takes it from there. Pickups and deliveries are done on foot, cheerfully. They know how to open and close doors, and they are a wonder on stairs. They are polite.
Addresses
Postal has a two part address system it uses to plot the location of the mailbox it services, as well as define the post office that services the address. A typical address looks like this:
<PostOffice [Address]>
Postal commands generally accept addresses as one word, or two words. If one word is indicated as an address, it is assumed that the subject is a post office. A two word address is a complete address indicating a specific residential mailbox.
The exceptions to this rule of thumb are commands that imply a residence but accept a two word address specifying the post office. /setaddr is an example of this. Invoked with a one word parameter implies that the one word is an address name and Postal is to choose the post office.
There is no built in limit on how many post offices a server may have. The Postal system typically traverses worlds.
New post offices and addresses are created and deleted on the fly. These addresses and post offices are part of a tightly written, hierarchically-structured database. This database is designed to meet the requirements of a dispatcher bent on getting mail delivered efficiently. The post man likes to walk around the town when there is nothing better to do, but get out of his way if there is mail to pick up or deliver.
Geo-Aware
Postal always knows what post office or address you are close to when invoking commands and will be as helpful as possible to relieve you of name details. This help is contextual in nature which makes it possible to use commands without any parameters simply based on your location. Complimenting this ease of use is a command-confirm system that makes it possible for Postal to safely attempt to complete complicated names with just a few characters. This is because you have an opportunity to confirm the completed command with a single ‘/’. If the command didn’t come out right you can simply try again without confirming.
For Towny users, Postal always knows when it is on Towny soil and will defer to Towny hierarchy. All appropriate Postal commands are Towny aware and try to accommodate what Towny players need when used
Creating Addresses
The geographic awareness built into Postal makes it easy to create new addresses. To define a new address the only parameter required is the name you would like to use since Postal will automatically find the closest post office for you. Designing the route for the postman is even easier because Postal will figure out everything based on where you are standing. On a new address you will be teleported to the servicing post office, the beginning of the route, and given a compass pointing to your address. A modern HUD display is included to provide helpful stats while clicking on waypoints. Once you double click the final waypoint the postman will automatically appear using the route you just defined to initialize your mail box.
Finding Addresses
- / TLIST Short for town-list, will present the player with a formatted, alphabetical list of towns when entered without parameters. The closest 3 towns, in order of distance, are also shown. If entered with enough characters to identify a particular town, the addresses of that town are listed.
- / ALIST Short for address-list, will list the addresses of the closest town when entered without parameters. Like /tlist, it will list the addresses of a particular town if entered with enough characters to identify it. The two commands complement each other including details that the other doesn’t.
- / PLIST Short for player-list, lists the closes 8 players, in order of distance when entered without parameters. Along with the listed player is the Postal address he/she is closest to with the compass heading required to get there. If entered with enough characters to complete a player name, Postal will list any Postal addresses or post offices owned by the player.
- / GPS Lists the closest 8 post offices or addresses with their respective compass headings when entered without parameters. /gps may also be given the name of a post office, or an address pair to set your compass to this location.
- / GO Teleports to Postal locations. The type type of location is determined by the number of parameters entered. Entered with no parameters assumes the central post office. One parameter assumes a local post office or town. Two parameters indicates a full residential address. Complicated names are automatically completed, and full named locations, as completed by Postal, are displayed for confirmation before teleportation. These location types may be secured or require owner permission to use.
- Dynmap Postal uses Dynmap if it is installed. All addresses and post offices are plotted and labeled. The active routes and post man locations are shown in real-time.
Navigation
Your compass is calibrated to line up with the standard, Minecraft coordinate system when listing headings with the above commands. These are the same compass directions shown when pressing [F3]. So, with your calibrated compass and the distance and heading combination from the list, you have what you need to navigate to it. This is the way compasses are normally used outside of Minecraft. The benefit of navigating to a destination is that you remain aware of where you are in relation to all the listed destinations, as well as other distance and heading destinations received from other plugins ie: GPS, Pplot and gpsTowny.
Mail and Shipping
Postal letters are based on the written book item. This book will handle up to 50 pages of written correspondence. Item shipping is done with single chests. The two commands used for this have the built-in address finding and completing capabilities described above. Indicating desired addresses is done with the minimum amount of typing. The two commands are: /addr <PO [Address]> and /package <PO [Address]>
On servers that have economy turned on, both of these commands tell you the price of the postage or shipping and give you a chance to confirm it.
Once addressed, letters may be put in any accessible Postal mailbox, and Postal will take it from there. Shipments involve the creation of a shipping label which may be mailed like any letter. Once packaged, the shipment is sign-sealed and indestructible until the post man picks up the shipping label. The post man removes the chest at that point for transport to the recipient.
The recipient of a shipment may refuse the shipment. If refused, the shipment is returned to the sender.
Mass mailings sent to entire towns, even worlds are available to administrators, Towny mayors and post office owners. The /distr command facilitates this.
Capacity Management
Full mail boxes are managed. If the chest is full, the postman will delete the oldest junk mail if he finds one. If that doesn't create the room he needs, he will look for a non-book to delete. If unable to find room in a mailbox, the postman will continue trying to deliver until successful. Mail is otherwise held at the local post office.
Bulk distributions available to post office owners, Towny mayors, and administrators are sent with an expiration date. Regular information mailings therefore do not back up and become undesired clutter
Dispatcher
The NPC dispatcher provides regular coverage and route-walking, oldest next. This dispatcher is also preemptive in that it recognizes mail waiting to be delivered or picked up. The dispatcher manages the route walking schedule to favor actual mail movement over route-walking, or postal presence. Both the post men and the PostMaster are preemptively dispatched to keep the mail moving efficiently.
Chunk Manager
Postal has a chunk manager that monitors chunks required for postal routes. These chunks are automatically loaded and kept loaded. This makes it possible for NPC's to continue doing their job when there is no player in sight. NPC's have a tendency to go to sleep when no player is around. This chunk manager also facilitates the control of spawning monsters on Postal routes. There is a switch in the config file that controls this. By default, Postal routes are kept monster free.
WatchDog
Postal has an evolved watchdog, monitoring system. The Postal workers are vigilantly monitored. It is capable of respawning a NPC worker if something happens to it. It can restart itself if needed. Mail is always backed up. A Server crash or NPC griefing should not result in lost mail. The Citizens NPC’s are pretty reliable on their own.
General Notes
The Bukkit versioning that started early December 2012, applies to all plugins that go outside the Bukkit api to reach the Minecraft api. This started with 145.R1, the first recommended build for 145.
Coincidently, and the cause for much confusion here, The Bukkit api was expanded to include dealing with Book and Quill items. Pre 145.R1 Postal does go beyond the Bukkit api to deal with written books because it has to. Post 145.Ri uses the Bukkit api instead and is therefore exempt from the Bukkit versioning restrictions.
There are only two versions of Postal, delineated by an api improvement not a versioning requirement.
Citizens2 Note: At Citizens build 762 the NPCs underwent navigational, speed refinement. As this relates to Postal there is a modest speed change. It causes the NPCs to move a little slower. It can trigger watchdog activity by Postal since the NPCs don't seem to be on schedule. The fix is simple. Just change the Speed setting in 'Config.yml' from 1.0 to 1.2
Videos
YouTube Getting Started by Hmmcrunchy
I don't know if this is important or not, but with the latest version (va_postal vers 2.995) I am getting this every time I start the server:
This is with Citizen: [INFO] [Citizens] Loading Citizens v2.0.8-SNAPSHOT (build 809)
@ThinkOnTheEdge
Thanks, I appreciate comments like that.
My daughter is big on Sims, and she is going to see your message.
I think it is a good idea regardless of who does it. It would certainly add a lot of interesting activity to these beautiful communities that are created. And, it would appear random.
I think it could be tied to the well defined Minecraft day. An npc community member (a Citizen, truly) could have a routine ie: beginning-of-the-day, middle-of-the-day, end-of-the-day and middle-of the-night. As you suggest, they do what they have been configured to do. Each would have a plus or minus offset on the trigger time so that they are not all going at the same time. Or, that could be randomized.
Not to worry about Postal. I have a little push to get 3.0 delivered, and it is starting to gel like the systems it depends on, namely Citizens2 and Bukkit. Since Postal stays within the Bukkit api it will remain as reliable as Bukkit. The Citizens developers have the bigger challenge since they need to go beyond the Bukkit api to get thos npcs working as well as they do, and Bukkit has made it necessary for them to update with Minecraft version changes whether needed or not.
This is a wonderful plugin! My kids and I have been building a town for months, just for fun. The town feels empty though with buildings with no one in them. Suddenly it is alive with postal workers traveling the streets and everyone is going nuts writing letters to each other.
If you are looking for other ideas, what about extending this idea to a "Living Town" plugin? It could have other NPCs that just do things, like man stores, work in offices, etc. They would sleep in beds in apartment buildings, get up and walk to work, walk to restaurants for lunch, walk back to work, sit at their desks, walk home at night. With a bunch of these NPCs in a town, it would come to life.
From what you have done here, it seems like my idea would be simple. Almost just a stripped down version where the NPCs just walk routes and hang out at locations, without the fancy stuff. :)
Don't give up on Postal though, please maintain it, because it is amazing!
@sbokhary00
Make sure you verify your Citizens2 installation by creating some npcs directly with Citizens.
Ie: /npc creat test
Create a few and make sure they are working ok.
Also, make sure you have done the basic stuff in getting started above... Ie: /postal start
I'l be happy to help and I will need more info on your system and versions.
For some reason, NPCs didn't generate when I created the central and local post offices. I do have spawn-npcs=true in the server properties.
@TheCanadianLizard
If you are able to use a pre-release, please get 2.995 off the Postal page of Citizens2. Should be fixed. You are not using Towny, right?
Let me know...
The following bug appears when attempting to accept a package:
19:38:17 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'accept' in plugin va_postal v299_146_plus at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:965) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:883) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:840) at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:109) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.NoClassDefFoundError: com/palmergames/bukkit/towny/exceptions/NotRegisteredException at com.vodhanel.minecraft.va_postal.commands.Cmdexecutor.accept(Cmdexecutor.java:1584) at com.vodhanel.minecraft.va_postal.commands.Cmdexecutor.onCommand(Cmdexecutor.java:203) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more Caused by: java.lang.ClassNotFoundException: com.palmergames.bukkit.towny.exceptions.NotRegisteredException at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 18 more
@SFcommander
Getting Started
Follow these instructions. Use parameters with all the /setxxx commands unless you are using the latest pre-release.
Wait, how do you make a mailbox with an address?
@SolomonGajda
That is an Impressive scale.
There are two config file switches that may impact mob spawning. Actually three, now that I think about it.
First is the Chunk_overlap setting which defines the widths of the managed postal routes. It is intended to provide a way to have Postal increase the monster-free areas adjacent to routes. You should be at 0.
Then there is the monster-free switch: Allow_monster_spawn. It only affects monster spawning, and if you want the monster type mobs it should be 'true'.
Also, the Prevent_all_npc_despawn switch that prevents the despawning of all player type NPC's, including NPC's not belonging to Postal. Your server should set that to 'false' Postal takes care of its own NPC's.
Postal has a route control that is fine grained. Post offices including all of its addresses may be opened/closed, and single addresses may be opened/closed. it is command implemented using the /openxxx and /closexxx family of commands. It wouldn't take much for me to include an api for this. Your example shows me that I should also despawn the postman when I close a post office.
btw, the map on my server is Earth at 3.5 gig. I thought that was big.
I've been using the Postal mod on a very large server (6 gigabyte map almost 2 years old with 250+ users covering blocks out to over 20,000 from spawn). Lately mob spawning has decreased significantly in remote areas of the server. I deactivated the postal mod and mob spawn rates worldwide reverted to normal. This is a very large implementation of postal with many cities and routes spread over a vast world. It would seem that MineCraft is reaching a limit of the number of mobs that it can handle when all postal chunks remain active 24/7 and mob-spawning priority is shifted to them away from remote areas.
I took the economy poll down. The results are very clear and helpful, and they make sense. Thanks so much to those participating in the poll. I figured I better take it down while that is still true :-)
Here is how I interpret the poll: (in order of vote-count)
An economy implantation is desired. Anyone not wanting it may opt-out in the config file.
What I proposed is overly complicated. Yes, I completely understand that. After I laid it out I stood back and said to myself 'Have I created a monster?' I have had time to digest it though. With a couple of exceptions (of which I will remove), what is laid out is a logical movement of currency. Proceeds from postage have to go somewhere. I don't want them to just disappear into some server bank. Really, players don't need to study this or completely understand it. All players need to know is that it costs something to mail or ship. It costs something to own an address, but there are benefits. A post office may be purchased and it might make money for the player.
It is not interesting, I need help here. What can I do to make it more interesting?
It is the wrong design. What is the right design?
Right now I am in a maintenance mode with Postal. There is no way I will walk away from this project because I have too much invested in it, interest wise as well as thousands of lines of code. I was indelibly bitten by the bug when I saw how well the Citizens2 npc's work, by way of api.
The economy implementation is about 80 percent complete, but I realized that there doesn't appear to be a lot of interest in it and the last thing I want to do is write code that won't be used. Of course I have added a lot of stuff recently, so folks may be understandable overloaded on features. I also realize that there may be something wrong with my proposed implementation (link above).
I have a poll concerning it above. It has been up for a couple of days and two people have voted on it. For those two people please accept my virtual handshake. Just to be clear here, absence of votes speak just as forcefully as a ton of votes.
There is no hurry, however. I will move on this when the right direction shows itself.
@walle303
Haven't tested. Postal isn't ready for Spigot because I haven't found a way to manage the chunks, Spigot apparently doesn't honor the Bukkit chunk listener. I intend to support it when I find a way to do it.
As for Libigot.... The same thing, but as I said, I haven't tested it yet. If you could provide me with anything you have learned isn't working, it might motivate me to check it out sooner, than later. The symptom found on Spigot is the NPC's tend to go to sleep, and probably even despawn. That is what happens when chunks the NPC's are in unload, usually in response to an absence of live players. Postal npc's need to do their job even when players aren't around, otherwise the mail doesn't get delivered.
Bukkit allows me to manage this. I am able to keep the chunks on mail routes loaded.
Is this plugin incompatable with spout/libigot? EDIT: This is incompatible with libigot but not with spout, Hope you can fix it if possible
I just updated the 'getting started' section. I haven't looked at that in a looong time. It now reflects the, very recent, improvements made to the defining commands. The latest is not even up yet, except as a pre-release. The /setaddr command will optionaly take only one parameter, and pick the closest post office for you.
@Cjfchris1
That stack trace is coming from the same version as before. I'll bet you have two copies of Postal in your plugin directory. Delete the old one and you should be good. Done that many times myself....
@mcfacilitator
Thank You That Fixed That But Now Im Getting This: 15:00:26 [INFO] chris012696 issued server command: /setlocal threldom 15:00:26 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'setl ocal' in plugin va_postal v2965_146_plus at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18 9) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServe r.java:523) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerCon nection.java:965) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.j ava:883) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java :840) at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292 ) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java :109) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:3 0) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:5 81) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:2 26) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:4 77) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java :410) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:5 73) Caused by: java.lang.NoClassDefFoundError: com/palmergames/bukkit/towny/exceptio ns/NotRegisteredException at com.vodhanel.minecraft.va_postal.commands.Cmdexecutor.setlocal(Cmdexe cutor.java:1150) at com.vodhanel.minecraft.va_postal.commands.Cmdexecutor.onCommand(Cmdex ecutor.java:143) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more Caused by: java.lang.ClassNotFoundException: com.palmergames.bukkit.towny.except ions.NotRegisteredException at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader .java:80) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:53) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 18 more
@Cjfchris1
That version requires Towny. I just submitted a cut to Bukkit, version 2.99 that will solve the problem. Alternatively, you can download it right now from the Postal page of the Citizens2 site.
I have submitted version 2.99 to Bukkit. Remember, Postal will not break every time Bukkit renames Minecraft classes, so this should be good for a while. Here are the release notes:
Version 2.99
The most recent cut of Postal with the economy work stripped out. It has been successfully tested on various combinations of soft-depend plugins installed and not installed.
/setroute ceases installing the first point and chest, if one was not detected. It is not necessary with the new dispatcher, and was a source of other problems.
/setaddr does not allow the address to have the same name as a post office.
Quitting game while editing route caused a stack trace and loss of player quickbar as well as the route being edited. All fixed.
Set a limit on how close a player needs to be to an address to use the /setroute command without parameters. Player needs to be within 10 blocks of an address.
HUD display added to the route editor using the Scoreboard api. The player designing a route gets real-time updates of distances from the address, the PO and the last waypoint, as well as the total wayponts defined and the name of the address being designed. Postal checks to make sure the ScoreBoard class exists before using it to maintain backwards compatibility. There is also a switch in config.yml allowing the use of it to be turned off. The default is on.