[MISC/INFO] Dynmap-Residence v0.50 - Display Residence zones on Dynmap maps [1.5.2-R1.0+]

Discussion in 'Archived: Plugin Releases' started by Mike Primm, Nov 20, 2011.

  1. Offline

    Mike Primm

    Current Version: 0.50

    Current Release
    Latest stable and unstable builds
    Source Code
    Wiki

    Supported versions:
    Dynmap-residence provides a simple way to add visibility of Residence zones and subzones on Dynmap's maps. The plugin depends on the presence of both Dynmap and Residence, and interacts directly with the Residence API. Updates to zones are automatically processed (on a settable period - default is once per 5 minutes (300 seconds), as well as by listening for change events from Residence. By default, the plugin will be active after simply installing it (by unzipping the distribution into the plugins/ directory and restarting the server).

    Outlines will be generated for each residence, as well as a settable number of levels of subzones (default is to show the residence and the first layer of subzones). Each outline will also have a configurable popup, which will display information on the region when clicked.

    Visibility of regions can be controlled via the 'visibleregions' and 'hiddenregions' settings. Besides listing the names of the regions to be made visible or hidden, entries with the format 'world:<worldname>' can be used to make all regions on a given world visible or hidden.

    Also, the display of the region outlines can be restricted to a minimum zoom-in level, via the 'minzoom' setting. When non-zero, this setting causes the region outlines to only be displayed at or beyond the given zoom-in level.

    Note: If you are currently using the region component for Residence in Dynmap, you should disable that support while installing dynmap-residence.

    [​IMG]
    Configuration:
    After the first load, there will be a config.yml file in the plugins/dynmap-residence directory. Details of the default configuration, and all the provided settings, can be found here

    Change Log:
    • 0.50
      • Update for Residence v2.6.6.5
      • Fix resDepth (thanks to t00thpick!)
      • Add 'boost' attribute, to allow option to boost resolution of Residences
    • 0.40
      • Update for Residence v2.6.6.2
    • 0.30
      • Update for Residence v2.6.5.2
      • Improve configuration update support via /dynmap reload
      • Fix exception with enter/leave macros
      • Add anonymous usage tracking via mcstats.org
    • 0.20
      • Add %entermsg%, %leavemsg% macros
      • Add forRentStrokeColor, forSaleStrokeColor - outline colors for for-rent and for-sale plots
      • Handle /dynmap reload - reload config.yml
    • 0.17 - Update for CB 1.2.4-R1.0, Residence v2.5.6
    • 0.16 - Update for Residence v2.5.1 - support new 1.1 event system (1.1-R5 READY when Residence is updated)
    • 0.15 - Fix handling of custom style in subzones, update to Residence v2.5
    • 0.14.1 - Fix %rentdays% variable
    • 0.14 - Add many new infowindow macros (for individual flags, for-rent and for-sale information); add y-coordinate display style to control altitude of region outlines; fix handling of /resload and /resreload
    • 0.13 - Add 'minzoom' setting to hide outlines below given zoom in level; add 'world:<worldname>' option for 'visibleregions' and 'hiddenregions'
    • 0.12 - Fix trap with non-boolean flags, add support for update.onchange setting to listen for custom change events from Residence (true real-time updates from configuration changes)
    • 0.11 - Fix problems with dependencies (dynmap, Reidence) loading before we do
    • 0.10 - Initial Release
     
    Lextao likes this.
  2. Offline

    TopGear93

    very nice. im gonna have to setup dynmap now! what else can Dynmap do? i would like to help make some addons :D
     
  3. Offline

    Mike Primm

    Cool - big thing is that folks keep asking for more options for pushing information to Dynmap's web-based map displays. Lots of opportunity to share information relevant to other plugins - we've already got support for Residence, WorldGuard, Towny, and Factions (although, as with this one, I'm reworking and splitting them off to make maintaining them and enhancing them easier - Dynmap is very big and getting bigger, so this is a way to help deal with that).
     
  4. Offline

    TopGear93

    hmm interesting. ive got a few ideas swirling atm :D. How quickly does Dynmap update from within game to the website?
     
  5. Offline

    Mike Primm

    Depends on the settings in dynmap - default is once per 2 seconds. Basically, the javascript code in the browsers will poll for update events to be processed, and code on the server side will manipulate things down there that drive update events.
     
  6. Offline

    Gnatz

    Splitting up Dynmap into a more modular based approach is a great step into the right direction imho. Will try this out tonight.
     
  7. Offline

    Mike Primm

    Thanks - I really think its going to help us be able to maintain good quality, while making us more agile when it comes to adding new features that are of interest to a portion of our user community (e.g. its a whole lot less work to test and release an update to one of these smaller sub-plugins than it is to test and release all of dynmap, and a whole lot fewer people are impacted unnecessarily with such an update).
     
  8. Offline

    Lextao

    This is great, if only residence mod was updated...!

    Good job with this!
     
  9. Offline

    dockter

    Thank you very much for this.
     
  10. Offline

    dockter

    Getting this error with latest build:

    2011-11-24 16:31:53 [WARNING] Task of 'dynmap-residence' generated an exception
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
    at com.bekvon.bukkit.residence.protection.FlagPermissions.listFlags(FlagPermissions.java:331)
    at org.dynmap.residence.DynmapResidencePlugin.formatInfoWindow(DynmapResidencePlugin.java:97)
    at org.dynmap.residence.DynmapResidencePlugin.handleResidence(DynmapResidencePlugin.java:136)
    at org.dynmap.residence.DynmapResidencePlugin.updateResidence(DynmapResidencePlugin.java:195)
    at org.dynmap.residence.DynmapResidencePlugin.access$000(DynmapResidencePlugin.java:31)
    at org.dynmap.residence.DynmapResidencePlugin$ResidenceUpdate.run(DynmapResidencePlugin.java:87)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  11. Offline

    Mike Primm

    Hmm.... error is actually in the Residence code, but I'll see if we can work around it. Are you using anything that adds custom flags? The error in question would require one of the AreaFlags to not be a boolean, and their call assumes that all the flags are boolean.

    Edit: Just released 0.12 version - should address this.
     
  12. Offline

    HockeyMike24

    Can you make this work with Towny?
     
  13. Offline

    Mike Primm

  14. Offline

    dockter

    This getting this error with 0.12 and CB: #1502, idea's?
     
  15. Offline

    Mike Primm

    You actually CAN'T be getting the same error - the new code doesn't even call the API that the old exception was reporting. If its the same exception, you've still got the old code - if its different, I need to see the stack.
     
  16. Offline

    dockter

    Ok, one second.

    2011-11-25 12:05:51 [WARNING] Task of 'dynmap-residence' generated an exception
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
    at com.bekvon.bukkit.residence.protection.FlagPermissions.has(FlagPermissions.java:233)
    at com.bekvon.bukkit.residence.protection.ResidencePermissions.has(ResidencePermissions.java:74)
    at org.dynmap.residence.DynmapResidencePlugin.formatInfoWindow(DynmapResidencePlugin.java:119)
    at org.dynmap.residence.DynmapResidencePlugin.handleResidence(DynmapResidencePlugin.java:161)
    at org.dynmap.residence.DynmapResidencePlugin.updateResidence(DynmapResidencePlugin.java:219)
    at org.dynmap.residence.DynmapResidencePlugin.access$000(DynmapResidencePlugin.java:35)
    at org.dynmap.residence.DynmapResidencePlugin$ResidenceUpdate.run(DynmapResidencePlugin.java:92)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    I can provide you with the residence (world.yml) files if it would help.
     
  17. Offline

    Mike Primm

    I think that'd help - this exception means that you've got an AreaFlag that is not a boolean - probably a typo in a field that is supposed to be 'true' or 'false'. Take a look at your settings, as all the flags I check (using the 'has()' method) are standard flags in Residence that are required to be boolean.
     
  18. Offline

    dockter

    I hope your wrong, that would be really stupid of me.

    ....sigh. Im sorry for wasting your time. USE is not a true/false variable.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  19. Offline

    Mike Primm

    All good - glad we could run down the issue!
     
  20. Offline

    dirkson

    Heyo!

    Getting this:
    13:16:01 [WARNING] Task of 'dynmap-residence' generated an exception
    java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
    at com.bekvon.bukkit.residence.protection.ClaimedResidence.listSubzones(ClaimedResidence.java:594)
    at org.dynmap.residence.DynmapResidencePlugin.handleResidence(DynmapResidencePlugin.java:198)
    at org.dynmap.residence.DynmapResidencePlugin.updateResidence(DynmapResidencePlugin.java:219)
    at org.dynmap.residence.DynmapResidencePlugin.access$000(DynmapResidencePlugin.java:35)
    at org.dynmap.residence.DynmapResidencePlugin$ResidenceUpdate.run(DynmapResidencePlugin.java:92)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    Same problem in 0.12 and 0.13

    Love to help more, but it doesn't give me a line number - And we've got 80,000+ lines in the residences file :D

    It appears to be getting to the point where it attempts the cast, then gives up, leaving only a fraction of the residences rendered.

    Cheers,
    -Dirk
     
  21. Offline

    Mike Primm

    Problem is actually in Residence itself - it looks like you've got a subzone with an ID that is being interpreted as a floating point number versus a string by the YAML parser (its just numbers and a decimal point, I'd assume). I don't see an alternative call that would let me get the subzones, so I don't have any good options for a workaround (beyond catching the exception and skipping the subzones of the given residence - which I can do, if needed).
     
  22. Offline

    dirkson

    Well, could I fix it somehow? How would I find it?
     
  23. Offline

    Mike Primm

    Fixing it by finding the subzone ID that is being interpreted as a floating point number versus a string should do the trick - if you don't mind sharing your res_*.yml with me (via PM if you're concerned about posting here), I'm pretty sure I can find it quickly for you (as well as allowing me to confirm what I believe to be the problem).
     
  24. Offline

    dirkson

    Er.... It's 30k+ lines long. Hold on a bit, I'll find some way to get it to you.
     
  25. Offline

    Credomane

    NPE is generated by dynmap-residence on its next update cycle after issuing a /resreload command.

    bukkit 1.0.1-R1
    dynmap 0.27
    dynmap-residence 0.12
    residence 2.4.4

    Code:
    >resreload
    10:35:31 [INFO] [Residence] Disabled!
    10:35:31 [INFO] [Residence] Found PermissionsBukkit Plugin!
    10:35:31 [INFO] [Residence] Successfully linked with Essentials Economy!
    10:35:31 [INFO] [Residence] Loaded...
    10:35:31 [INFO] [Residence] Enabled! Version 2.4.4 by bekvon
    10:35:31 [INFO] [Residence] Reloaded by console.
    10:37:07 [WARNING] Task of 'dynmap-residence' generated an exception
    java.lang.NullPointerException
            at java.util.regex.Matcher.appendReplacement(Matcher.java:712)
            at java.util.regex.Matcher.replaceAll(Matcher.java:823)
            at java.lang.String.replaceAll(String.java:2201)
            at org.dynmap.residence.DynmapResidencePlugin.formatInfoWindow(DynmapResidencePlugin.java:112)
            at org.dynmap.residence.DynmapResidencePlugin.handleResidence(DynmapResidencePlugin.java:161)
            at org.dynmap.residence.DynmapResidencePlugin.updateResidence(DynmapResidencePlugin.java:219)
            at org.dynmap.residence.DynmapResidencePlugin.access$000(DynmapResidencePlugin.java:35)
            at org.dynmap.residence.DynmapResidencePlugin$ResidenceUpdate.run(DynmapResidencePlugin.java:92)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    
     
  26. Offline

    Mike Primm

    Yep - we're hooked to them, they get reset, and there isn't any way for us to know it happened at this point. I'll see if there is anything we can do to avoid it, but I can't make any promises.
     
  27. Offline

    Credomane

    You are aware of the issue so that works for me. I figured it was one of those hard to handle ones just by the looks of it.
     
  28. Offline

    MacGyver420

    @Mike Primm

    Are there other infowindow variables than %regionname%, %playerowners% and %flags%? Something to show For Sale and Rentable status maybe?
     
  29. Offline

    Mike Primm

    I just updated to 0.14, and included a bunch of new macros (for individual flags, for for-rent and for-sale info). Take a look at the Wiki page for details.
     
  30. Offline

    MacGyver420

    Thanks that's exactly what i was looking for. Looks like the %rentdays% variable is displaying the same info as %rent% though.
     

Share This Page