[INACTIVE][SEC/FUN] Factions v1.1.7 - Guilds, War and user-controlled antigrief [733]

Discussion in 'Inactive/Unsupported Plugins' started by Olof Larsson, Feb 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Olof Larsson

    Factions - Guilds, War and user-controlled antigrief :)
    By Olof Larsson and Brettflan.

    Current version: 1.1.7
    Download: https://github.com/oloflarsson/Factions/tree/master/releases
    Source: https://github.com/oloflarsson/Factions
    Read the full userguide here: http://mcteam.org/plugins/factions

    This plugin will allow the players on the server to create factions/guilds. The factions can claim territory that will be protected from non-members. Factions can forge alliances and declare themselves enemies with others. Land may be taken from other factions through war.

    The goals of this plugin:
    • The players should be able to take care of anti-griefing themselves.
    • Inspire politics and intrigues on your server.
    • Guilding and team spirit! :)
    Fork me on github!
    I would be glad to code on this plugin together with you :). Please fork me on github and do a pull request. Read more here:
    http://help.github.com/fork-a-repo/
    http://help.github.com/pull-requests/

    There will be cake if you join me in the coding [cake] :)

    Usage
    Read the full userguide here: http://mcteam.org/factions <-[cake]

    The chat console command is:
    • /f
    This command has subcommands like:
    • /f create my faction name
    • /f invite my friends name
    • /f claim
    • /f map
    • ... etc
    You may also read the documentation ingame as the plugin ships with an ingame help manual. Read the help pages like this:
    • /f help 1
    • /f help 2
    • /f help 1
    Note that you may optionally skip the slash and just write
    • f
    Installing
    1. Download: https://github.com/oloflarsson/Factions/tree/master/releases
    2. Put Factions.jar in your plugins folder
    If you have Permissions installed you will need to configure it. Read more here.

    Current ToDo list:
    1. More admin controll, for example reassign faction admins.
    2. Command to reload config file.
    3. Give factions a limited number of separate territories. "You may only claim at the border of your territory". Purpose of this is to stop players from claiming land in a scattered way. Factions will be more stationary. This will encourage factions to build one main town.
    Changelog:
    Version 1.1.7

    • Package structure changed to move it out of com.bukkit.* namespace (Olof Larsson)
    • Removed Help plugin support as that plugin is not updated. (Olof Larsson)
    • Changed name for No Faction to Wilderness (Olof Larsson)
    • New unclaimall command (/f unclaimall) to unclaim all of the faction's land (Olof Larsson)
    • Safezone claiming command now has optional radius input (/f safe [radius]) to claim a larger safezone area at a time (Olof Larsson)
    • Added check to make sure chatTagInsertIndex is valid before using it, to prevent triggering an exception (Brettflan)
    • Players who aren't currently in a faction should no longer get "Person left your faction" messages when others join a faction (Brettflan)
    • Attempt at simple workaround for error related to NPCs from Citizens plugin (Brettflan)
    • Placement and removal of paintings is now prevented if you're in another faction's territory (Brettflan)
    • /f map has been updated to fit inside the new Bukkit line-width limits (39 tiles wide instead of 49) (Brettflan)
    EDIT: by the way, you do need to have build 726 or newer of CraftBukkit (RB 733, for instance) since the painting events were added then.
    More changelog:
    Show Spoiler

    Version 1.1.5 (By Brettflan)
    • Fix for left-clicking on wooden doors not being detected
    • Fix for null faction home location when loading factions data
    • Added "factions.adminBypass" permission which will allow players with that permission to bypass the building/destruction and usage limitations inside faction territory
    • New boolean config options territoryBlockTNT (default false), safeZoneDenyBuild (default true), safeZoneDenyUseage (default true), safeZoneBlockTNT (default true).

    Version 1.1.3 (By Brettflan)
    • updated to work with RB 600/602
    • handled a couple of potential NPEs, one caused when saving faction info, and one where it could try sending messages to a player who is offline or otherwise doesn't currently exist for whatever reason
    • fix/workaround for bucket usage not always being detected if 2-3 blocks away
    • faction-tagged chat messages sent to the console and log now have crufty color tags (like "§f" and such) stripped out
    Version 1.1.2
    • bugfix - admins could not place signs etc in safezones (Olof Larsson)
    • Added some missing instaDestroyItems (painting and flowers) (Olof Larsson)
    • Added ability to load old pre-1.1 data files (board, factions, followers) if they exist and new files don't (Brettflan)
    Version 1.1 (by Olof Larsson)
    To upgrade: Remove you Factions folder
    I'm sorry about that. There just are so many changes to the save files.
    • Permissions plugin support
    • Help plugin support
    • Faction homes
    • Better save file format
    • Inactive players are kicked from their faction
    • SafeZones - PVP and monster safe areas
    Version 1.0 beta7 (by Brettflan)
    • Fix for enemy attacks potentially healing people in their own territory due to armor calculations, instead of correctly just giving reduced damage.
    • Placement/use of these items inside another faction's territory is now prevented: redstone wire, sign, flint&steel, bucket (empty, water, and lava).
      Code is also in place to prevent placement of beds and repeaters, but CraftBukkit doesn't properly detect those yet.
    • Fix for destruction of certain blocks not previously being detected and prevented: torch, redstone torch, repeater, redstone wire, sapling, crops, sugar cane.
    • Minor spelling and grammar fixes
    • Added options "territoryBlockCreepers" and "territoryBlockFireballs" to configuration file (conf.json). These both default to disabled. If enabled, they will respectively prevent creepers or ghast fireballs from destroying blocks if they explode inside faction owned territory. These can prevent griefing by way of luring creepers into another faction's territory.
      Note that both explosion types will still hurt nearby players and mobs, they just won't destroy blocks.
      Also note that "territoryBlockFireballs" only works in CB build 557 and higher, where fireball detection was added.
    Version 1.0 beta6
    To upgrade:
    Factions now use world name instead of world id for the board files.
    Nothing will be claimed when you start the server. Change the board file name(s)
    from something like 234978619762348768.json to something like world.json.
    • Updated to work with Craftbukkit 493 (by Brettflan)
    • Paginated faction listing (by Brettflan)
    • Single jar install (by Brettflan)
    • Board files now use world name instead of world id (by Olof Larsson)
    Version 1.0 beta5
    • Updated to work with Craftbukkit 450, which means Minecraft 1.3 compatibility :)
    • For now messages like these are removed: "Playername tried to use Wooden door in your territory". They could be used for chat spamming.
    Version 1.0 beta4
    To upgrade: Start and stop the server once with the new jar. Paste the content from board.json into the newly created file in /plugins/Faction/boards/. After this you can delete board.json.
    • MultiWorld support.
    • Faction chat is now something you turn on and of.
    • Arrows are now included in the friendly fire filter.
    • Some stability fixes.
    Version 1.0 beta3
    To upgrade: Delete conf.json and rename the "name" field to "tag" in every faction.json file.
    • Greatly improved chat and messaging system! :D
      Cooperates well with other plugins. Tested with Essentials and iChat so far.
    • New faction chat command
    • More config options
    • Bugfix: You can now claim land from enemies :p
    • ... and a lot of other fixes
    Version 1.0 beta2
    • There is now a config file where you may alter chat colors, dynamics of war etc.
      I will add documentation on the config soon...
    • Made the color formating a bit more understandable.
    • There is now a broadcast when a new faction is created.
    Version 1.0 beta1
    • The first release
     
  2. Offline

    Mr_Mellow

    Why is it all the plugins like roles,factions and towny just die? I don't understand.
     
  3. Offline

    RattSplat

    Since this plugin seems to be dead I will try to take the source and update it, although I don't have much experience with java, I need this plugin as much as you guys.
     
  4. Offline

    thyrfa

    can you make it so that you can have only admins make factions, and then they can transfer control to whomever.
     
  5. Offline

    RattSplat

    I'm not so sure if I can do this, I'm trying to update the packages and it's a mess. :S Any other coders?
     
  6. Offline

    Mr_Mellow

    I wish i could code myself, theres so many plugins that i would work with to get them to work on my server.
     
  7. Offline

    Olof Larsson

    I will update this plugin today. It takes me like 5 min to get it working with a new build ^^
    So don't worry this plugin is not dead.

    However if anyone feel like joining me and brettflan in the coding you can do so right away. The info is in the OP.
     
  8. Offline

    ViralNihility

    I've been unable to edit my conf.json. Every time it's updated, the Factions plugin forces it back to default thus I can't edit the protected blocks.

    Edit: Is it possible for you to make an option to allow neutral/factionless players able to attack those who are in a faction in their territory?
     
  9. when came the update ?
     
  10. Offline

    Olat

    @Olof Larsson
    any ETA on this update?
    This is the only plugin my server is waiting on before we update to 1.4
     
  11. Offline

    Olat

    Apparently not... lol... *poke* Olof? You alive?
     
  12. Offline

    Niktomix

    How come i can open a door from another faction(not allied) with left click ? It wasn't working before updating to 1.1.3.
    I'm also having some troubles setting up the permissions since i have no idea how to proceed so we can't use most of the commands like claim/unclaim/chat/create & so on.
    Any idea ?
     
  13. Offline

    Brettflan

    What's with all of these posts asking when it will work with newer versions? 1.1.3 loads in RB 617 for me and all the basics seem to work.

    This should be fixed in 1.1.4, which I'll release shortly. Thanks for the report.

    There is, it's in conf.json. Look for these two options:
    Code:
      "homesEnabled": true,
      "homesTeleportToOnDeath": true,

    Don't edit the file while the server is running or your changes will be ignored and overwritten. Save your changes to the file with the server stopped.

    What build of CraftBukkit are you running? That has been fixed for several Recommended Builds now, AFAIK.

    EDIT: 1.1.4 download link removed, you should get 1.1.5 below instead.

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

    Niktomix

    I tested with 630 and recommended build, same issue.
    Everything was working fine before updating bukkit for 1.4 and i was using faction beta7.

    And i lack permission for everything, i've tried the following config but no luck:
    Code:
    # System is no longer used, but may become used in the future
    # Copies is for multiple-world support
    #   Put the name of the world you wish for it to be a clone of, otherwise leave it empty.
    #   Does not work for the default world.
    #  Example: copies: Derp    -  This will clone the permissions of the world Derp
    #
    # Make sure to rename this file to the name of the world that is in sever.properties under
    # level-name.  So if it is level-name: world  then this should be world.yml and in the
    # plugins/Permissions directory (ie. plugins/Permissions/world.yml)
    #
    # NOTE: Do not use tabs while editing this document.  Use only spaces.  A good way to avoid
    # doing this is to use Notepad++ and replace the tab with 4 spaces.
    plugin:
        permissions:
            system: default
            copies:
    
    ##
    # AntiBuild is included with this.  To disable a group from being able to build then
    # set the build: flag to false (build: false).  If you want a group to be able to build
    # then set it to true.
    ##
    # Groups can contain inheritance.
    #   To make a group inherit the permissions from another
    #   group simply place the groups name in the "inheritance:" like so:
    #
    #   Example:
    #       inheritance:
    #           - Default
    ##
    #   All permissions including the asterisks must be placed in single quotes.
    #   like so:
    #
    #       - 'general.spawn'
    #
    #   Otherwise errors will happen!
    ##
    #   Globalized Permission settings:
    #
    #       If a permission contains periods (.) you can denote a globalized parameter:
    #
    #           - 'general.*'
    #
    #       This will allow you to use all general commands.
    #
    ##
    #   Single Asterisk denotes all commands:
    #
    #       - '*'
    #   If you give a group this permissions, do not have the group inherit any permissions
    #   from other groups.  Any users assigned to this group should NOT be given any additional
    #   permissions either.
    ##
    #   To exempt a node use the - prefix like so:
    #       - '-general.time'
    ##
    #   prefix: and suffix: do not do anything on their own.  You need another outside plugin
    #   such as iChat or HeroChat in order for these to do anything.
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - 'foo.bar' 'factions.participate' 'factions.create' 'factions.manageSafeZone'
        Moderator:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Default
            permissions:
                - 'bar.foo' 'factions.participate' 'factions.create' 'factions.manageSafeZone'
        Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*' 'factions.participate' 'factions.create' 'factions.manageSafeZone'
    
    ##
    # Users denote which users are included in which group.
    # TheNo1Yeti is in the Admin group
    # Herpina is a member of the Moderator group but also has access
    # to the herp.derp permissions
    # Derpina is a member of the admin group but does not have access
    # to the derp.derp permission node
    # Users can also have a prefix and suffix as seen with Herpina
    ##
    users:
        Magpina:
            group: Admins
            permissions:
        Herpina:
            group: Moderator
            info:
                prefix: 'Moo'
                suffix: 'Cow'
            permissions:
                - 'herp.derp'
        Derpina:
            group: Admins
            permissions:
                - '-derp.derp'
     
  15. Offline

    Brettflan

    For permissions, I've had no trouble with it, but I'll check into it again. I've actually been using GroupManager myself instead of Permissions.

    You may be right about doors, I didn't notice that you specifically mentioned left-clicking. I'll check on that.

    EDIT: on second glance, your Permissions config is definitely wrong. the permissions each need to be on a separate line. Check the Permissions topic for help on using it.
    I did go ahead and test Permissions support in Factions anyway just to be sure and it works fine.

    I'll post a quick update for the door issue shortly.

    OK, I think proper prevention of opening wooden doors by left-clicking warrants another quick release, so:
    Download Factions 1.1.5 (600-617+)

    Changelist, including changes from 1.1.4 (since it didn't last long):
    • Fix for left-clicking on wooden doors not being detected
    • Fix for null faction home location when loading factions data
    • Added "factions.adminBypass" permission which will allow players with that permission to bypass the building/destruction and usage limitations inside faction territory
    • New boolean config options territoryBlockTNT (default false), safeZoneDenyBuild (default true), safeZoneDenyUseage (default true), safeZoneBlockTNT (default true).

    Info on the new config options:
    territoryBlockTNT prevents TNT explosions inside faction territory, which defaults to false (same as before). It prevents TNT cannons from being a viable tactic, and I think for most people it would be an undesirable option.
    safeZoneBlockTNT prevents TNT explosions inside safe zone areas, which defaults to true (new behavior). I think most server admins would prefer safe zones to be safe from TNT, from TNT cannons or otherwise.
    safeZoneDenyBuild prevents players from building inside safe zone areas, which defaults to true (same as before). This option is added for server admins who, for whatever reason, want to let their players build and break inside safe zone areas.
    safeZoneDenyUseage prevents players from using items in the territoryDenyUseageMaterials list, which defaults to true (new behavior). This will (with the default material list) prevent players from dumping/using buckets inside safe zone areas.

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

    Niktomix

    Thankies, i somehow got it fixed and updated to 1.1.5 but players.json & board.json are now empty :/
    The rest of the data is safe though, is there any way to rebuild players/board files by reading board/faction/follower folders ?
     
  17. Offline

    ViralNihility

    Unfortunately, even while my server is stopped, when it restarts it re-generates the conf.json file.
     
  18. Offline

    Brettflan

    The functionality for reading old data remains the same. If the folders with old data are there and you delete the players.json file, it will load the old player (follower) data. Likewise with board.json and old board data, and factions.json and old faction data.
    Sorry to hear that the bug in the location saving/loading routine made it lose your data.

    It does indeed save automatically and sometimes shuffles the options around. It does read the configuration when it starts up though, and will not lose any changes if you made and saved them while it wasn't running.
     
  19. Offline

    Duendek86

    same to me, i have tried with old files from factions carpet and the new ones. First time works perfect, but when i restart configure files are re-generated.

    Craftbukkit 617 and factions 1.1.5
     
  20. Offline

    Brettflan

    It reads from the file only once, when it first starts up, and it overwrites the file when it exits in order to add any settings which might have been missing in your file.
    It absolutely does load and retain any settings you save to the file while it is not running, though; I have tested it pretty thoroughly. Again, do not edit the config file while Factions is running or your changes will be overwritten when it exits.

    EDIT: however, a thought: what OS are you running on? I doubt it's that, but it was a thought. I've only tested it in Linux.
    Another thing that might possibly be useful is to know exactly what setting you're trying to change, so I could test it specifically.
     
  21. Offline

    Duendek86

    same to me. Fedora 6 , craftbukkit 617 y factions 1.1.5

    Edit: I have just seen this error message:
    Code:
    2011-04-04 18:05:53 [SEVERE] The JsonDeserializer [email protected] failed to deserialized json object {} given the type class org.bukkit.Location loading Factions v1.1.5 (Is it up to date?)
    
     
  22. Offline

    Brettflan

    Are you receiving an error, or what? By resetting, you're indicating the files have content which is lost? What are you trying?
    I need more details, basically.

    Updating it to optionally use MySQL is certainly possible, but Olof has it set up to use JSON for handling data storage and I personally don't feel like working on MySQL support.
     
  23. Offline

    Olof Larsson

    Well I forgot to answer. I tested the plugin an confirmed it was still compatible with bukkit. No build was neccessary.
    You should test first and ask later ;-)
     
  24. Offline

    Brettflan

    It only saves on exit AFAIK, with one exception. When it first tries to load a data file and finds that it doesn't yet exist, it goes ahead and creates the files after loading either default data or old format data.

    @Duendek86 if you have some old data files or anything else which seems to consistently give that problem, would it be possible for you to zip them up, stick them on Mediafire or another such file hosting site, and send me the link?
    I'm still unable to duplicate this problem, even after wiping my new data, having it load a huge mess of old data from my live server (67 factions and 371 faction members), and then setting a home for my faction and then stopping and restarting CraftBukkit a few times.

    EDIT: same for you, ravklok, could you zip up and give me a link for a copy of the files which seem to consistently cause this problem?

    EDIT 2: actually, after manually editing my saved faction data to contain {} for a home definition I was able to duplicate the error. I'll see about trying to fix it.
     
  25. Offline

    Olat

    Touch'e!
     
  26. Offline

    Duendek86

  27. Offline

    Brettflan

    OK, since I was able to duplicate the problem by manually editing, I was able to figure out a fix. It should be truly fixed now. So:

    Download Factions 1.1.5b
    • Improved Exception handling within MyLocationTypeAdapter.java, should finally fix problem some people are having
     
  28. Offline

    Vengurd

    Okay, Hello there, joined here to specifically ask for help with permissions. Yes I've read the user guide, and while I found it helpful and give me a fair idea of what to do, it hasn't told me specifically what needs to be done, and yes I saw the recent request and answer for help with permissions, though that doesn't help me, here is what my permissions file looks like:
    Code:
    # System is no longer used, but may become used in the future
    # Copies is for multiple-world support
    #   Put the name of the world you wish for it to be a clone of, otherwise leave it empty.
    #   If this file is for your default world (the one in server.properties) then you must
    #   leave copies blank.
    #  Example: copies: Derp    -  This will clone the permissions of the world Derp
    #
    # Make sure to rename this file to the name of the world that is in sever.properties under
    # level-name.  So if it is level-name: world  then this should be world.yml and in the
    # plugins/Permissions directory (ie. plugins/Permissions/world.yml)
    #
    # NOTE: Do not use tabs while editing this document.  Use only spaces.  A good way to avoid
    # doing this is to use Notepad++ and replace the tab with 4 spaces.
    plugin:
        permissions:
            system: default
            copies:
    
    ##
    # AntiBuild is included with this.  To disable a group from being able to build then
    # set the build: flag to false (build: false).  If you want a group to be able to build
    # then set it to true.
    ##
    # Groups can contain inheritance.
    #   To make a group inherit the permissions from another
    #   group simply place the groups name in the "inheritance:" like so:
    #
    #   Example:
    #       inheritance:
    #           - Default
    ##
    #   All permissions including the asterisks must be placed in single quotes.
    #   like so:
    #
    #       - 'foo.bar'
    #
    #   Otherwise errors will happen!
    ##
    #   Globalized Permission settings:
    #
    #       If a permission contains periods (.) you can denote a globalized parameter:
    #
    #           - 'foo.*'
    #
    #       This will allow you to use all general commands.
    #
    ##
    #   Single Asterisk denotes all commands:
    #
    #       - '*'
    #   If you give a group this permissions, do not have the group inherit any permissions
    #   from other groups.  Any users assigned to this group should NOT be given any additional
    #   permissions either.
    ##
    #   To exempt a node use the - prefix like so:
    #       - '-foo.bar'
    ##
    #   prefix: and suffix: do not do anything on their own.  You need another outside plugin
    #   such as iChat or HeroChat in order for these to do anything.
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
            permissions:
                - 'foo.bar'
        'factions.participate'
        'factions.create'
        Moderator:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Default
            permissions:
                - 'bar.foo'
        Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
        'factions.manageSafeZone'
    
    ##
    # Users denote which users are included in which group.
    # TheNo1Yeti is in the Admin group
    # Herpina is a member of the Moderator group but also has access
    # to the herp.derp permissions
    # Derpina is a member of the admin group but does not have access
    # to the derp.derp permission node
    # Users can also have a prefix and suffix as seen with Herpina
    ##
    users:
        TheNo1Yeti:
            group: Admins
            permissions:
        Herpina:
            group: Moderator
            info:
                prefix: 'Moo'
                suffix: 'Cow'
            permissions:
                - 'herp.derp'
        Derpina:
            group: Admins
            permissions:
                - '-derp.derp'
    


    The plugin itself works great and I really like what I've seen so far, I'd just like to be able to see into what the people on my server are doing.
     
  29. Offline

    Brettflan

    @Duendek86 By the way, thanks for posting those (and you can take them down now). That did uncover the root cause of the problem, which is from a passed faction home location's world being null somehow. So... my best guess is that the world in question wasn't loaded yet. That bears further investigation for a more proper fix, probably by trying to go ahead and load the world if it isn't loaded yet.
    Currently, I'd guess that any faction which sets their home in a world other than the main one will lose their home setting whenever you restart the server.

    @ravklok I'll take a look at the saving scheme later to see if it can be improved by more frequent saving.
     
  30. Offline

    Duendek86

    Seems to work fine now! but still i have a message with no sense to me :p
    Code:
    2011-04-04 19:42:11 [INFO] [Factions v1.1.5b] === INIT START ===
    2011-04-04 19:42:11 [INFO] [Factions v1.1.5b] Loading conf from disk
    2011-04-04 19:42:11 [INFO] [Factions v1.1.5b] Loading players from disk
    2011-04-04 19:42:11 [INFO] [Factions v1.1.5b] Loading factions from disk
    2011-04-04 19:42:11 [SEVERE] [Factions v1.1.5b] NPE encountered while deserializing a location
    2011-04-04 19:42:11 [SEVERE] [Factions v1.1.5b] NPE encountered while deserializing a location
    2011-04-04 19:42:11 [INFO] [Factions v1.1.5b] Loading board from disk
    2011-04-04 19:42:12 [INFO] [Factions v1.1.5b] Found and will use plugin Permissions v2.5
    2011-04-04 19:42:12 [INFO] [Factions v1.1.5b] === INIT DONE (Took 382ms) ===
    
    Thanks a lot by your work :) It's awesome.
     
Thread Status:
Not open for further replies.

Share This Page