[CHAT/GEN/RPG] Courier v1.1.9 - In-game rendered mail letters [1.6.4-R2.0]

Discussion in 'Archived: Plugin Releases' started by troed, Dec 24, 2011.

  1. Offline

    troed

    Courier
    Version: 1.1.9 (changelog)
    Download: Courier v1.1.9
    BukkitDev: Main page
    BukkitDev: Forum (includes roadmaps for future releases)
    BukkitDev: Bugs and suggestions

    NOTE: The main home for this plugin is on BukkitDev! Comments and discussion there, please :)

    Courier - An Item based 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.

    [​IMG]
    [​IMG]
    For more information, see the BukkitDev description page.
     
    TheTimeG, UnDarkElder, Jdwede and 3 others like this.
  2. Offline

    c0balt

    Thank you for a seriously creative and awesome plugin.
     
  3. Offline

    wsurfer852

    This is BOSS
     
  4. Offline

    quvin4

    Can you please make a plugin like this where you can write like "books" or something like that. Would be a fun way to write server rules or a welcome message on a server!
     
  5. Offline

    troed

    v0.9.6 changelog

    New:
    • "Override mobspawn deniers" (ticket #9)
      • Confirmed working with WorldGuard. Other mobspawn protection plugin results may vary.
    Fixes:
     
  6. Offline

    Hasteman

    Could you add a thin on the letters so they are formatted like:
    From <sender>: 01/01/12

    You could then use this to maybe find a way to delete mapnumbers that use the mod after a set time in config.yml?

    I don't know much about coding so I don't know how possible this idea is but it seems like it would work.
     
  7. Offline

    troed

    Yes, I will indeed display the date (it's actually already stored with the map) as well in a future release. Based on which solution will be used to recycle or otherwise solve the mapId issue it might be used for that as well :)
     
  8. Offline

    Hasteman

    You can also go in and delete individual Mapids very easily in your "world" folder! the only problem is that you can't tell which are "maps" and which are "letters". Maybe find a way to write the filenames to be different from the real maps?

    I'm not sure if i saw it or not but does this support multi-world by any chance? I might have to drop it if it isn't D:

    Overall a great and fun plugin! Love scaring my users with an enderman in their face every once in a while! XD

    Feature Idea:
    Last thing! Could you maybe add a feature that auto-sends first time users a message that is editable in config.yml? I want new guys to get the rules (there's 3 short ones) right away without sloppy signs or me having to be online or typing it... just a few ideas ^_^


    Edit: I would try to let the date thing be an option in config.yml, the more customizable something is the more it is loved <3
     
  9. Offline

    troed

    You can delete them, but Minecraft keeps track of the latest mapid it created and will create the next map with that number+1. It will not reuse the empty spot you left open by deleting a specific map - and therein lies part of the problem :)

    To know if a map is a normal map or a Courier Letter you need to extract the X coordinate. A Courier Letter always has an X coordinate of 2147087904.

    Regarding the rules feel free to post that idea as a ticket :) If you can survive with those rules being text only for now I'd recommend LoginMessage.
     
  10. Offline

    Hasteman

    Darn, that sucks. Hopefully someone finds a way around that or he increases max to infinite or something....

    Ok, I'll check out log-in message. Thanks!

    <3 how you respond quickly <3
     
  11. Offline

    troed

    Do you want to betatest?

    (Note: I'm talking about true betatesting - not just being allowed to play with new functionality before everyone else. While I think the code is stable the point of betatesting is to squash potentially catastrophic bugs .. )


    I've finished up what I believe to be a working solution to the MapID exhaustion issue over the last few days. The code also happily converts existing Letters over to the new format when those are picked up or read. The reason I want betatesting is due to the way I've "solved" (if I have) the problem, I'm worried there might be subtle bugs caused either by things I don't know about in Minecraft or by other plugins.


    If you're interested (the ONLY new functionality you'd be getting at the moment is an end to new Maps being created, Courier will handle everything with just one) then please send me a PM.

    I'm interested in both those of you who have been running Courier for a while and understand to backup both your world and the Courier messages.yml, and those of you who haven't been using Courier and want to start clean.

    Thank you :)
     
  12. Offline

    troed

    Update on the progress to 1.0.0 release:

    Currently implemented:
    • MapID exhaustion solution (do you want to beta test?)
    • Separation of /post and /letter
      • This makes long letters possible, replying to someone, re-sending letters, taking personal notes etc.
    • Color codes possible in config strings
    Todo:
    • Allowing public letters
    • Forcing newlines when writing letters
     
  13. Offline

    troed

    FYI: I've tested Courier with the 1714 Bukkit devbuild for Minecraft 1.1 and it seemed to work just fine.

    (And "Forcing newlines" is now implemented as well. When I've finished coding the option of making Letters public and received feedback from beta testers I'll release Courier v1.0.0)
     
  14. Offline

    troed

  15. Offline

    troed

    v1.0.0 released

    New:
    • Separation of /post and /letter
      • This makes long letters possible, replying to someone, re-sending letters, just making personal notes etc ..
      • New permission node - courier.write - needed for your players to be allowed to create letters. courier.send is now used for posting them.
        • This means you can use permissions to allow people to create letters but have to pass them on manually instead of using Courier delivery
    • Color codes (&0-&f) can be used in the strings found in the config file
    • \n and &nl now create newlines when writing Letters (ticket #20)
    • "/courier unread" now requests re-delivery of all unread (even if previously delivered) mail
    • Config setting Privacy.SealedEnvelope can be set false to allow everyone to read anyone's mail (ticket #10)
      • Note: Letters that have not been Posted to someone else are always public
      • To make a Posted Letter public, write something in it with /letter first
    • Letter creation date is displayed in top right corner
    • Multiple page Letters are now supported
      • Right-click and left-click when you see the << and >> markers to turn the pages
    Fixes:
    • MapID exhaustion (ticket #27)
    • In rare cases players on offline servers would not receive mail (ticket #32)
    • Postmen now spawn in Desert biome even in storm (ticket #11)
     
  16. Offline

    Averus

    Code:
    [SEVERE] Could not pass event PLAYER_ITEM_HELD to Courier
    java.lang.IllegalArgumentException: text contains invalid characters
        at org.bukkit.map.MapFont.getWidth(MapFont.java:47)
        at se.troed.plugin.Courier.Letter.<init>(Letter.java:54)
        at se.troed.plugin.Courier.Courier.getLetter(Courier.java:204)
        at se.troed.plugin.Courier.CourierPlayerListener.onItemHeldChange(CourierPlayerListener.java:132)
        at org.bukkit.plugin.java.JavaPluginLoader$18.execute(JavaPluginLoader.java:384)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:690)
        at net.minecraft.server.Packet16BlockItemSwitch.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:533)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    2012-01-17 01:57:56 [WARNING] Failed to handle packet: java.lang.IllegalArgumentException: text contains invalid characters
    java.lang.IllegalArgumentException: text contains invalid characters
        at org.bukkit.map.MapFont.getWidth(MapFont.java:47)
        at se.troed.plugin.Courier.Letter.<init>(Letter.java:54)
        at se.troed.plugin.Courier.Courier.getLetter(Courier.java:204)
        at se.troed.plugin.Courier.LetterRenderer.render(LetterRenderer.java:39)
        at org.bukkit.craftbukkit.map.CraftMapView.render(CraftMapView.java:146)
        at net.minecraft.server.WorldMapHumanTracker.a(WorldMapHumanTracker.java:38)
        at net.minecraft.server.WorldMap.getUpdatePacket(WorldMap.java:185)
        at net.minecraft.server.ItemWorldMap.c(ItemWorldMap.java:241)
        at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:229)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:307)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:533)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    http://dev.bukkit.org/server-mods/nolagg/pages/synchronized-code-access-nolagg/

    fix plz
     
  17. Offline

    troed

    Sure thing! It's not a synchronized-code-access problem though. It seems that you're in a locale where the names of months contains "special" characters. If you can tell me what "January" is in your local language that'll help both my workaround and the details of the issue I might place on Bukkit.

    (I did ponder whether to allow localized names of months. Now I know I should've gone with Locale.US ... )

    Thanks for the report! I'll move it over to the ticket list at BukkitDev. If you're interested I can get you a v1.0.0 with this fixed in minutes, awaiting a proper release sometime in the future.

    (Another fix is to "americanize" the locale of the server you're using)
     
  18. Offline

    Averus

    January
    =
    Январь
     
  19. Offline

    troed

    Yeah that'd probably not exist in the default Minecraft font. Don't know what I was thinking - here's a build that's exactly like 1.0.0 in all other aspects but uses US language for months instead of your local. Let me know if it works better.
     
  20. Offline

    Averus

    still crash server if using local lang
    i dont need US language at all, so plugin not for me
    a can send you my font if you can localise plugin for 145 milions RU ppl :)
     
  21. Offline

    Aetherspawn

    Can you please allow us to set a location for the postman to stand (so we can make a Post Office). The postman glitches alot getting to peoples location and in my server the ground has alot of holes everywhere due to TNT warfare.


    Also, is it possible to change the map_1, map_2 ... map_40 etc that appears at the top in black text into the sender? The name of the map is probably configurable in the packet.
     
  22. Offline

    troed


    Please send me just the line number in Letter where it crashes (the se.troed.plugin.Courier.Letter.<init>(Letter.java:54) part from the previous crash log) - worst case might be that I cannot use any textwidth-calculation code from the default MapFont at all.

    If so, it's a slightly larger problem than I had hoped :/

    (edit: I'm Swedish myself, I understand the importance of non-US languages btw ;) We're still using Latin characters though, not Cyrillic, and the default Minecraft Font only has a subset of the Latin character set)

    The teleportation will be solved with new APIs that are stated to become available in Bukkit 1.1-R1, but I'm also currently writing on code to allow other types of creatures as postmen (see here). Regarding a post office it's a big change as to how the postmen work today (one for each delivery and player) - maybe it would be better then to use permissions to only allow Courier /letter and not /post, and use other plugins to pass the Letters around? They're normal items :)

    The map_x is added at low Minecraft level, I've seen no way to get rid of it unfortunately.
     
  23. Offline

    Averus

    we use Cyrillic
    crashs on ony word on 1st letter, like "я"
     
  24. Offline

    troed

    Yeah. Basically the built in Minecraft font only does a subset of Latin and re-creating that whole 7*7 font in Unicode is not likely to happen :/ I'll add some checks so that Courier doesn't crash, of course, but it will still require input to be in something it can render.

    https://github.com/Bukkit/Bukkit/blob/master/src/main/java/org/bukkit/map/MinecraftFont.java

    edit: Thanks for all your input, sorry that I can't do as quick a fix as I first thought.
     
  25. Offline

    Averus

    we use bukkit with replaced font.txt file, we can type Cyrillic just fine.
     
  26. Offline

    troed

    Yes, but the chat and the font used for the maps aren't the same thing :) See the MinecraftFont.java link.

    edit: To be fair, the data in MinecraftFont.java is likely based on font.txt and the png-font-image. If anyone wants to create new fonts for Maps in Bukkit I'm sure they'd be happy to accept them, at least Courier would .. :p
     
  27. Offline

    momai

    Yes, I have this problem also. Also cyrillic alphabet
     
  28. Offline

    troed

    Hi guys,

    I've just put v1.1.0 into open beta test. I cannot add cyrillic fonts to Bukkit's maps, but at least it shouldn't throw any exceptions. Please test if you can.

    (Also: You can now select other creatures as Postmen as well)

    See http://dev.bukkit.org/server-mods/courier/forum/31668-courier-1-1-0-planned-roadmap/#p1 for the full changelog and download link.

    Pending no serious bugs found in a day or so I'll release this as v1.1.0 proper.
     
  29. Offline

    RedFawkes215

    Hiya. Was wondering if you can maybe add like an option in the config file for defaultop or not. I really like the plugin but I am not a fan of using permissions plugins and since this plugin defaults pretty much everything to OP only, my players can't take advantage of sending letters.
     
  30. Offline

    troed

    Courier v1.1.0 has been released:

    New:
    • All Minecraft Creatures can now become Postmen, selectable in config. Only Enderman and Villager are officially supported though (ticket #13)
    • New config setting to turn off the displaying of date in Letters (ticket #35)
    • All user visible strings moved out into config.yml for translation purposes
      • Incomplete French and complete Swedish translations added (I'm having issues understanding what character sets work though)
    • Courier will every 5 hours (configurable, 0 turns it off) check against dev.bukkit.org to see if there's a new version of Courier and if so display a message in the log
      • No auto-download is done and no information whatsoever is sent to me! It only checks towards the RSS-feed on BukkitDev
    Fixes:
    • Exceptions thrown when trying to view Letters with some character sets (ticket #34)
      • Note: This will NOT suddenly allow Courier to render new character sets, sorry. It's a limitation in Bukkit. Instead Courier will simply skip content it cannot render.
    • In some circumstances upgrading to OpenJDK 7 would lose all messages (ticket #41)
      • If after upgrade Courier cannot start, downgrading to Java 6 is the only solution. This is due to the message database containing "special characters" that Yaml doesn't seem to support in OpenJDK 7
    • Removed some of the Courier command aliases again due to conflicts with other plugins (ticket #37)
    • Made non-Monster Postmen walking towards players configurable. (ticket #40)
    Known caveats:
    • Enderman-Postmen teleport away if out in open areas
      • The APIs needed to solve this are expected to be available in Bukkit 1.1-R4
      • You can select Villagers as Postmen instead in the meantime
     
  31. troed
    Good work so far on the plugin, Id like to suggest ability to send mass mails (with permission node) to new player automatically (welcome mail), specific groups (permission groups) or all (being all online and offline players server has ever seen.

    Reasoning behind this is that its an effective way for server staff to get out information on changes to players. Obviously we dont want just anyone to be able to send mass mails ;)
     

Share This Page