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
@Dstates4
That looks like a Citizens navigation issue. The basic gotchas have already been posted below. I will need platform info and a clean server log file to continue debugging this issue.
@mcfacilitator
Here is some log data maybe it will help
17:11:32 [INFO] [WATCHDOG Int TP next] Winvillage, Hornsplace, 0
17:31:10 [INFO] [WATCHDOG Int TP next] Winvillage, Hornsplace, 0
17:31:28 [INFO] [WATCHDOG Int Nudge (1)] Winvillage, Hornsplace, 20
17:31:41 [INFO] [WATCHDOG Int TP next] Winvillage, Hornsplace, 20
@mcfacilitator
Watchdog is being activated so the postman will just teleport from waypoint to waypoint all the way to the chest instead of walking.
@Dstates4
No problem at all, I appreciate the reports. Postal has undergone some major upgrades and additions in the last 2 months or so. Three soft depend api's were added. One of them, Towny, to support it properly, made it necessary to upgrade the scheduler big time. The creation of PO's, addresses and routes has been moved from exclusive admin control to user control by way of Towny, and soon (Postal 3.0) economy by way of purchasing power and owner privileges. This made it necessary to remove the need to restart Postal for additions or deletions since you can't have general users restarting a plugin.
I am on the verge of releasing Postal 3.0, but I want to end the pre-economy version of Postal with a solid cut. There are still issues shaking out from this major work as you have demonstrated, but I think it is just about there.
I will be happy to work with you or any other responsible person on improving the documentation, both here and on the Citizen's site. I try to keep the user issues low by writing industrial quality code and anticipating user issues and mistakes in the code. Postal is getting big, however. It is hard to completely test everything between releases. I have simplified things by settling down to one version of Postal. There doesn't seem to be a big need to support pre-146 versions of Bukkit anymore. Postal doesn't need to be version specific like Citizens since it is able to stay within the Bukkit api.
Anyway, back to your outstanding issues; I'm not going to worry about the double click issue since it is basically a shortcut to the /exit command. You mentioned 'pathing'. Can you give me some details on what is not working right?
@mcfacilitator
Yes I did left click the last block twice. I see that you did a hotfix of the waypoint editor I really like the redstone one a lot better. Though I will not lie the new one you had plan is soooo much faster. I deleted the address and redefined it and it worked (as well as the double click though I am very certain the new editor double click wouldn't work). Just let me know when you get the pathing working correctly. Once this is all done and said I will start my work on a document of postal and a video.
Me and some friends are currently working on developing a Minecraft Public server with different features with it. You are free to check it out www.worldofthrinmmo.com..... It is in a Development stage at the moment and I don't plan on putting it in alpha testing for about maybe a month.
Also mcfaciliator I appreciate you taking your time into fixing this plugin I have done some courses on java scripting and know the frustration of all the coding required into building a plugin. And you saying you had to redo this from scratch made me realize. I am glad to be testing your plugin. I would say I am a noob though in scripting. Again thank you : D
@Dstates4
Don't know why double click exit is not working. Are you double (left) clicking on the same block? That is how it works - must be the same, last, waypoint-block.
The reason for that stack trace was exiting the waypoint editor without defining any waypoints. This could cause a problem, so it has been handled. It is available on Citizens, and has just been submitted to Bukkit.
If you have any addresses where you exited the waypoint editor without setting any waypoints, delete the address '/deleteaddr' and re-define it.
@mcfacilitator
Using your new build 2997 when I finish with the waypoint editor and type /exit (double-click didn't work) I get this error
[SEVERE] Could not pass event PlayerCommandPreprocessEvent to va_postal v2.996 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:963) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846) at org.getspout.spout.SpoutPlayerConnection.a(SpoutPlayerConnection.java:120) 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:115) at org.getspout.spout.SpoutPlayerConnection.d(SpoutPlayerConnection.java:195) 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.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:604) at java.util.ArrayList.get(ArrayList.java:382) at com.vodhanel.minecraft.va_postal.listeners.PListener.clear_route_markers(PListener.java:404) at com.vodhanel.minecraft.va_postal.listeners.PListener.plistener_exit(PListener.java:252) at com.vodhanel.minecraft.va_postal.listeners.CitizensListener.onPlayerCommandPreprocessEvent(CitizensListener.java:63) at sun.reflect.GeneratedMethodAccessor312.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 18 more
@mcfacilitator
On the note of the watchdog kicking in, I think I may have some clue as to why it is doing it because with your new way of setting waypoints when I am in the building it will set me on the roof of the building like the postoffice as well when I click like one block before stairs it will teleport me past them. Also the use-new-finder is set to false Havn't tried the new plugin but I will post more shortly if I run into other problems.
@Cjfchris1
The normal suspects are Citizens2 and Java. Go ahead and update Citizens to the current dev build and update to current Java 7. See my message to Dstates4 below and heed the speed setting and the Citizens 'use-new-finder' setting.
Make sure you start Postal ie: 'Postal start'. Normally Postal is set to autostart in config.yml.
Actually, now that I think about it; You have to run the current Citizens since you are running the new RB. Only the latest few Citizens builds will run on that version of Bukkit. Take a good look at your server log. I bet you will find a short, but sweet, message from Citizens indicating that it won't run on your version of Bukkit. It is very easy to miss.
@Dstates4
OK, I was able to duplicate the problem starting from scratch, and it has been fixed. That is a lousy way for a plugin to treat a new user, sorry about that. The fix is available in 2.997 now on the Postal page of the Citizens site. I will be submitting here shortly.
When 'postal wtalk' is invoked, it will display the watchdog chatter on the console. It is normal for there to be no watchdog chatter from postal when everything is running right. The fact that you are getting the chatter means the watchdog has kicked in and is trying to reset the postmen. So, the task now is to find out why it needs to reset the postmen.
It is generally some sort of a Citizens navigation problem, or terrain change preventing the postmen to get to the next waypoint. First make sure your speed setting in Postal's config.yml is at least 1.2 since you are running the current Citizens2. Next, make sure that:
use-new-finder: false
is set thusly in the Citizen's config.yml. This is a new flag that should default to false, but make sure it wasn't set to 'true'. Let me know....
@mcfacilitator
[WATCHDOG Int TP next] Winvillage, Hornsplace, 20
Yes it is using watchdog.
Also without towny running with your older versions I get 2013-06-22 17:08:44 [INFO] Rismr1 issued server command: /setlocal winvillage 2013-06-22 17:08:44 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'setlocal' in plugin va_postal v295_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:971) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846) at org.getspout.spout.SpoutPlayerConnection.a(SpoutPlayerConnection.java:120) 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:115) at org.getspout.spout.SpoutPlayerConnection.d(SpoutPlayerConnection.java:195) 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.setlocal(Cmdexecutor.java:1151) at com.vodhanel.minecraft.va_postal.commands.Cmdexecutor.onCommand(Cmdexecutor.java:139) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 17 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) ... 20 more Dunno if you got it fixed yet.
@mcfacilitator
Thank you very much mcfacilator for responding I will post updates and info of my tests. Thank you again!
im trying to add owners and addresses and look at the lists of the post offices i dont get an error message but i just dont get anything. I Am running the recommended build for bukkit i dont know if that had anything to do with it and i didnt update citizens in awhile
@TheMasterWolf
Request noted. 'Getting Started' was recently updated and I want to encourage the reporting of any rough spots in it.
@Fayti1703
Postal does not bypass the Bukkit api, therefore it is not affected by the Bukkit versioning system. Do you have any issues on R1?
@Dstates4
I looked at the source and found that your problem may be related to new code making it possible to add and delete post offices hot, without the need to restart. I need to run a few tests and I will continue this message later. Starting from scratch is something that doesn't normally get a lot of testing, and something may have fallen between the cracks.
Meanwhile, you could use an older version of Postal to get started, and go current after getting Postal system definitions started and running. Also, make sure you are current on Java 7. I see in your next message that you may have already done this, but the watchdog is moving the postmen around instead of them walking their route. Do 'postal wtalk' at the console to verify this. I will continue this message a little latter..... And oh yes, this plugin needs documenters.
@Cjfchris1
Sorry I missed a couple of days. I need more information. What commands gave you trouble in trying to 'use' the post offices?
Also, you indicate this came up later, apparently it was working before and now it isn't(?) Were there any Bukkit or Citizens updates in-between?
Please, create a video for Getting Started !
Could you please update this plugin to 1.5.2 R1.0 ?
Ok so I know on this page it says its in release build I believe its in broken mode 2.965, 2.99, and 2.996 with Craftbukkit R0.1 build 2763 to 2788 do not work setting local office create the error I posted before. Also I tried your build numbers 2.95 and 2.96 with different versions of citizens2 and all the npc does is teleport all the way to the persons address and I even closed the gaps in the waypoints and he gets stuck and respawns and waits for 20 sec then next block same thing. I love your videos and what your plugin did before and would love for you to update. If you could please post me what build you are using along with citizens2 build and bukkit build that would be great along with if you have plans of fixing these errors. Also if no one else is having these issues please tell me. I tried it on two different machines and get the same results. On these machines I tried the different builds and only with the plugins required as in Bukkit server citizens2 and postal.
Also the npc not spawning in central office I understand they don't til the /postal start. And as well I get the idea of Dispatch is not running because /postal start was not activated.