[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:

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

    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
    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.
    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


    Thanks for the update but any chance for a fix on the whole unable to edit the config file. Also a command to take all safe zones away would be great.
    Pim1234 likes this.
  3. Offline


    how do you accept a join request?
  4. Offline


    could it be that this permissions node is
    A: out of format since normaly its factionS.something
    B: got a tipo

  5. Offline


    When someone has invited you to their faction simply type "/f join [Clan Tag]"

    On to my request.

    It has been a known bug for some time that when you remove something from the "TerritoryProtectedMaterials" it doesn't really remove the protection. This is a really gamebreaking thing on my Realistic MC server, since when you invade another faction you wanna lick them dry. And it's not really realistic that you can't open doors/chests :p.

    So any ETA on when this will be fixed?
  6. Offline


    Yes; I just copied the note from derenix without looking at it closely enough, it is indeed factions.disband (with the extra "s"). Corrected my post.

    That... should not be happening. It does have code to determine whether the material is in the list and abort if it's not. Can anyone else confirm? I'll test for it when I get a chance.
  7. Offline


    And also, now when I updated the mod to the latest version. Every faction and every config + claimed land on the server got wiped.. This is not fun :(. I'll have to re-do all again.
  8. Offline


    This didn't happen to me from my brief testing. Did you get an error message in your server log?
  9. Offline


    I have a question... how do I unclaim all safezone land? I made my safezone a bit too big and want it gone..
  10. Offline


    Just wanted to leave this here and see what people think.
    It is a pain on my server to tell which faction is which.
    So I made a small modification to the getMap function.
    	public static ArrayList<String> getMap(Faction faction, FLocation flocation, double inDegrees) {
    		ArrayList<String> ret = new ArrayList<String>();
    		ret.add(TextUtil.titleize("("+flocation.getCoordString()+") "+getFactionAt(flocation).getTag(faction)));
    		int halfWidth = Conf.mapWidth / 2;
    		int halfHeight = Conf.mapHeight / 2;
    		FLocation topLeft = flocation.getRelative(-halfHeight, halfWidth);
    		int width = halfWidth * 2 + 1;
    		int height = halfHeight * 2 + 1;
    		Hashtable<String, Character> fList = new Hashtable<String, Character>();
    		int chrIdx = 0;
    		char[] chrs = "\\/#?$%=_+&^abcdeghjmnopqrsuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ1234567890".toCharArray();
    		// For each row
    		for (int dx = 0; dx < height; dx++) {
    			// Draw and add that row
    			String row = "";
    			for (int dz = 0; dz > -width; dz--) {
    				if(dz == -(halfWidth) && dx == halfHeight) {
    					row += ChatColor.AQUA+"+";
    				} else {
    					FLocation flocationHere = topLeft.getRelative(dx, dz);
    					Faction factionHere = getFactionAt(flocationHere);
    					if (factionHere.isNone()) {
    						row += ChatColor.GRAY+"-";
    					} else if (factionHere.isSafeZone()) {
    						row += ChatColor.GOLD+"+";
    					} else {
    						if (!fList.containsKey(factionHere.getTag()))
    							fList.put(factionHere.getTag(), chrs[chrIdx++]);
    						char tag = fList.get(factionHere.getTag());
    						row += factionHere.getRelation(faction).getColor() + "" + tag;
    		// Get the compass
    		ArrayList<String> asciiCompass = AsciiCompass.getAsciiCompass(inDegrees, ChatColor.RED, Conf.colorChrome);
    		// Add the compass
    		ret.set(1, asciiCompass.get(0)+ret.get(1).substring(3*3));
    		ret.set(2, asciiCompass.get(1)+ret.get(2).substring(3*3));
    		ret.set(3, asciiCompass.get(2)+ret.get(3).substring(3*3));
    		String fRow = "";
    		for(String key : fList.keySet())
    			fRow += String.format("%s%s: %s ", ChatColor.GRAY, fList.get(key), key);
    		return ret;
    Also, requesting a admin command that will unclaim OTHER factions land chunk by chunk. {So that server admins can go cleanup random claims without disbanding the faction}
  11. Offline


    People have been confirming this the last couple pages. Along with the safe-zone issue and the need for a /f unclaimall safezone or something like that.
  12. Offline


    Anyone has the same problem as i do? the config file keeps reverting back to original settings?
  13. Offline


    Please add this feature that LexManos developted! And make factions can choose their symble(and dont let others factions choose symbols already set).
  14. Offline


    That's pretty awesome. The only minor nitpick would be to simply switch the lowercase letters to the end of the list, since the font used in Minecraft isn't monospaced.
    A quick related question: if there are more factions listed on the map than can fit on one line, it just wraps around to another line, right?
    If you have an account on GitHub, could you fork the source and submit a pull request?

    That would probably be pretty easy. It could even be hooked into the admin bypass toggle to keep it from being used accidentally, where you could then just use the normal /f unclaim command.

    I must have missed those. OK, I just tested it by stopping my server, editing the file to remove wooden doors from the "territoryProtectedMaterials" list in conf.json, starting the server back up, and interacting with a wooden door in another faction's territory. It worked without a hitch, letting me open and close the door. I then double-checked interaction with a chest (which was still in the list) and I was properly prevented from using it.
    So, can you explain in more detail what you're trying with the "territoryProtectedMaterials" list and how it's not working? A step-by-step indication of what you did would be very useful.

    EDIT: by the way, as always, it's recommended that you back up any config files before editing them. If you accidentally mess something up in the file which prevents it from being parsed correctly by Factions, the data will be lost. Backups are always a good idea.
    Also, if data is lost in this manner, you should get an error message in the server log when Factions starts up. That error message is extremely useful if you need to ask for help.
  15. Offline


    Humm I thought the alphabet chrs were the same width lower and upper, oh well. And yes, Bukkit automatically splits up your messages if theya re to long, and it also propogates colors properly. {if a line runs off the end it'll make the next line the same color}
    And I'm feeling a bit lazy took like 10 seconds to make th edit.

    Ya I wrote it, its useful on my server already :p
    package org.mcteam.factions.commands;
    import org.bukkit.command.CommandSender;
    import org.mcteam.factions.Board;
    import org.mcteam.factions.Conf;
    import org.mcteam.factions.FLocation;
    import org.mcteam.factions.Faction;
    import org.mcteam.factions.Factions;
    public class FCommandUnclaimOther extends FBaseCommand {
    	public FCommandUnclaimOther() {
    		helpDescription = "Unclaim the land where you are standing for another faction";
    	public boolean hasPermission(CommandSender sender) {
    		return Factions.hasPermUnclaimOther(sender);
    	public void perform() {
    		if( isLocked() ) {
    		FLocation flocation = new FLocation(me);
    		Faction otherFaction = Board.getFactionAt(flocation);
    		if (otherFaction.isSafeZone()) {
    			if (Factions.hasPermManageSafeZone(sender)) {
    				sendMessage("Safe zone was unclaimed.");
    			} else {
    				sendMessage("This is a safe zone. You lack permissions to unclaim.");
    		me.getPlayer().getServer().broadcastMessage(String.format("%s[Factions] %s unclaimed land owned by \"%s\" at (%s)",
    				Conf.colorSystem, me.getPlayerName(), otherFaction.getTag(), flocation.getCoordString()));
    And ya, im having issues with the config being saved as well. edit conf.json

    "allowNoSlashCommand": true,

    "allowNoSlashCommand": false,
    Save, start the server.. nothing.
  16. Offline


    This is all that it said. After the first wipe and when it swapped from 1.7>1.8. Another wierd thing is that before I installed this version I only had access to config.json .
    Now I have 3 more files, (using MultiPlay); conf, board, players.

    And after I restarted the server yesterday again, it wiped my files, AGAIN.

    The above is after the server restart, when I changed some configs. It wiped it again. I restarted it earlier this morning and it didn't wipe.
    I had this problem before but it fixed itself.

    So my only problem left now, is your plugin wiping my configs for no reason sometimes. It hasn't wiped it now for 3 restarts, and it usually didn't wipe at all. After the update of the plugin the code at the top came up, and after the restart the code above came up. So.. Let's hope you can find the problem :)!

    EDIT3; So now I managed to remove both the Chest and WoodenDoor protection, this is really wierd. I've had this problem for a while now and suddenly it works. This Plugin is playing with me :(.
    I think it has something to do with that I didn't have the 3 new files before. Just my guess.
  17. Offline


    That part of your file was messed up, as the error indicates. It looks like you removed the comma by accident ("0.25" should be "0.25,").

    EDIT: Each configuration file stores data of types generally indicated by their names (factions.json = faction data, players.json = player data, board.json = claimed land, conf.json = general configuration).

    What do you mean by "nothing"? That option allows in-game players to just type for example "f list" rather than "/f list". Is it still accepting commands without the slash when you disabled it? Does the configuration file still show it set properly to "false"?

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


    Humm seems to be working properly now, Must of screwed something up and just missed the error.
    Also another request a admin command that lets us edit any conf entry in-game. Wouldn't be to hard with reflection :p
  19. Offline


    Someone please tell me? is it only me having the problem of config file reverting back to original settings? i used jsonvalid everything seems to be ok but still reverts back after every /rel or restart and doesnt take any effect.
    Please help! :(
  20. Offline


    Embty: Don't use /reload or /restart use /f reload
    When factions is unloaded it saves its current config to file.
    Thats probably whats causing you to overwrite your save. So Edit the file then do /f reload and it should work.
  21. Offline


    Hmm seems to be working now...I did change what I used to edit the file to wordpad from note pad..so maybe that had something to do with it. Also any chance for the unclaim all safezone command? I did /f claim 20 thinking it would do 20 blocks but it ended up claiming 1k+ and I have to unclaim each one manually and that is proving a hassle.

    Sorry if I came off a bit crass before.. you have a great mod here and I applicate that it is still being worked on.
  22. Offline


    Can someone tell me how to enable grief?
    Also how to Make others be able to open chest and doors would be much appreciated.......
  23. Offline


    You need to edit the config file. To do this manually stop the server then go into the config file and edit the "territoryprotectedmaterials" delete the items you want to be free use on any land.
  24. Offline


    what changes are in 1.1.8??
  25. Offline


    Is there a way to configure what a "safe zone" blocks or allows? I'm looking for a way to have sort of a sem-safe zone... perhaps allow creep damage, but not pvp, and in other cases, allow both pvp, and creep damage, but always block destruction or placing blocks...
    I apologize if this has already been discussed... I've looked at other plugins that do what I'm looking for, sorta, but it seems like the mechanics are already in Factions, and could just be tweaked a bit to allow more configurability of safe zones, or even create the ability to configure different types of safe zones...
  26. Offline


    I tried to config the files but it dosent work can anyone send my there config files or help me a bit more would really appreciate it......
    and also i want to enable grief anyone have a answer for that?
  27. Offline


    Can someone elaborate on how claiming areas work? I have a huge city I want to belong to one faction but don't understand why it won't work.
  28. Offline


    admin cant see chest in the faction territory.. pls can u fix it?
  29. Offline


    Thank you for your reply. I tried using f reload but the command doesnt work it only give me a msg to use f help.
  30. Offline


    another thing with f safe 100, it make 100 chunk safe not radius.. and there isent a command to unsafe all 100 chunk.. now atime we have 160.000 blocks in safe zone damn!
  31. Offline


    Yup seems a fair amount of people including myself have ran into that problem. I personally did 20 so I feel very sorry for you doing 100.
Thread Status:
Not open for further replies.

Share This Page