Factions support for WDLCompanion 0.0.1

Allow players to use the World Downloader mod within their own factions!

  1. pokechu22
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    Contributors:
    Pokechu22
    This plugin adds a two new types of WDLCompanion Chunk Override, Owned faction and Nearby factions, which allows players to use the World Downloader mod in their own (or other) factions.

    Installation


    First, install WDLCompanion and Factions (plus the plugins required by factions). Then, just add this plugin into your plugins folder.

    Only MassiveCraft Factions is supported; FactionsUUID is not supported. FactionsUUID lacks several necessary events. Sorry!

    Usage


    This plugin does not have its own configuration file or permissions. Instead, it uses WDLCompanion's own configuration file to add a new type of chunk override.

    Add a new entry in the chunkOverrides section in the WDLCompanion config.yml. Set its type to Owned faction for a player to receive permission in their own faction or Nearby factions for a player to be able to download in nearby factions as they move about the world. You can also create two entries for both (I recommend doing so). For Nearby factions, you must also specify a distance parameter that gives the distance in chunks to send. This must be at least 2 larger than the server's view distance in server.properties for technical reasons (if it's too small, you will be informed as to the correct size).

    Example:

    Code (Text):

    chunkOverrides:
      ownedFaction:
        type: Owned faction
      nearbyFactions:
        type: Nearby factions
        distance: 12
     
    The reason why Nearby factions needs a distance is that it changes the loaded list of chunk overrides as the player moves. Otherwise, the entire factions map would need to be sent, which would be both a lot of data and reveal faction locations. This way, it works similarly to /f map. Owned faction has no such requirement since a player will generally know where their own faction is.

    In-game, permission to download is controlled on a faction-by-faction basis, with /f perm. By default, members of a faction and higher can download. However, faction owners are able to tweak these values to either revoke the permission for members or grant it to additional groups (allied factions, neutral factions, even enemy factions if they wanted to). Also, by extension, players who do not have a faction are members of the wilderness faction, so if you want players to not be able to download in wilderness, you will need to edit the wilderness permissions. Likewise, if you want everyone to be able to download in wilderness, a similar tweak needs to be made. To edit a permission, you want to use /f perm set download <group> <on/off> <faction>. You'll need to change it with all groups that do not have it set the way you want - to view their setting, use /f perm show <faction> download.

    This plugin will react dynamically to faction permission changes, land claims, faction joining/leaving, etcetera, granting and removing chunk overrides to players as needed.

    Source code


    This plugin is open source; you can view the source and contribute to it here.

    MCStats disclaimer


    This plugin uses MCStats (pluginmetrics) for anonymous statistics. You can view these statistics here. If you want to turn off these statistics, set opt-out to true in the PluginMetrics configuration file (this disables statistics for all PluginMetrics supporting plugins).

    Release note


    This is a relatively early release and there may be some issues with it. Things should be mostly stable, but some of the weirder faction permission changes may not be properly updated. If you find a bug, please report it. There also may be some performance issues due to the algorithms used to figure out which players need updated permissions - these will be improved over time.