[SEC/FUN] Factions 2.0.0 - Guilds, War and user-controlled antigrief [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by MassiveCraft, May 29, 2011.

  1. Offline

    oliverw92

    Factions is loaded before MultiInv, so the respawn relocate happens before MultiInv has a chance to update the inventory for the non-faction world
     
  2. Offline

    Brettflan

    New release.
    Ah, so two possibilities then.
    1. You could set the priority for the MultiInv PLAYER_RESPAWN listener to a lower priority so that it is run first; Bukkit runs through from lowest priority to highest so that higher priority listeners get last say in what happens. The PLAYER_RESPAWN listener for Factions is set to High priority.
    2. Assuming you have the priority set to High for yours as well and you don't want to change it, I could add a softdepend for MultiInv to the plugin.yml for Factions. That would have your plugin always loaded first. It would only make a difference if you also have priority set to exactly High though.

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

    Darcion

    i deactivated multiinv before factions 1.3.3 was realeased and get the player_respawn error

    Code:
    2011-06-30 16:43:08 [SEVERE] Could not pass event PLAYER_RESPAWN to Factions
    java.lang.NullPointerException
        at org.mcteam.factions.FLocation.<init>(FLocation.java:33)
        at org.mcteam.factions.Faction.confirmValidHome(Faction.java:114)
        at org.mcteam.factions.Faction.getHome(Faction.java:104)
        at org.mcteam.factions.listeners.FactionsPlayerListener.onPlayerRespawn(FactionsPlayerListener.java:336)
        at org.bukkit.plugin.java.JavaPluginLoader$3.execute(JavaPluginLoader.java:258)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:240)
        at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:206)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:892)
        at net.minecraft.server.Packet9Respawn.a(SourceFile:18)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    edit:

    found a missspelled world in this option

    "worldsNoPowerLoss":

    is it possible that this caused this error?


    edit2:

    i dont find the 2 new options after restart, i'll put it manually in
     
  4. Offline

    Brettflan

    Right, that's a bug. So:
     
  5. Offline

    Darcion

    is this right now? i got this after 1.3.4

    "worldsNoClaiming": [
    null,
    "free2playV2_nether",
    "free2fly"
    ],
    "worldsNoPowerLoss": [
    null,
    "free2playV2_nether",
    "free2fly"
    ]
     
  6. Offline

    Brettflan

    None of the code which handles adding to or saving those particular settings has changed lately. It shouldn't cause problems having an odd null show up in there; let me know if it does.
     
  7. Offline

    Darcion

    now i get this errors for /f who or /f show

    2011-06-30 18:16:39 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'f' in plugin Factions v1.3.4 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:298) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:725) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:691) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:684) at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32) at net.minecraft.server.NetworkManager.b(NetworkManager.java:223) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75) at net.minecraft.server.NetworkListenThread.a(SourceFile:105) at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361) at net.minecraft.server.ThreadServerApplication.run(SourceFile:422) Caused by: java.lang.NullPointerException at org.mcteam.factions.commands.FCommandShow.perform(FCommandShow.java:42) at org.mcteam.factions.commands.FBaseCommand.execute(FBaseCommand.java:61) at org.mcteam.factions.Factions.handleCommand(Factions.java:356) at org.mcteam.factions.Factions.onCommand(Factions.java:341) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35) ... 12 more
     
  8. Offline

    Brettflan

    Well, that's embarrassing. I'm beginning to feel like Notch with these bugfix releases:
     
    Kain888 likes this.
  9. I think my post was missed.

     
  10. Offline

    oliverw92

    I don't know what the priority is in MultiInv - I would have to decompile the source since the author hasn't updated his repository in months. It isn't an issue now though - at the moment I'm simply a modified version with that pull request i submitted.
     
  11. Offline

    40540057

    So essentially you made the wilderness for no purpose then if people have more than one world? ... wonderful ... major functionality missing for a lot of the people out there ... how difficult is it to fix this?
     
  12. Offline

    oliverw92

    Could you make a few more server admin commands, like the ability to kick people out of factions?
     
  13. Offline

    Greu

    Thanks a lot to take care of this awesome plugin Brettflan. We use it on our server since a few month and players really love it.

    Here are my suggestions/ideas to improve it :


    Add an option to show on the "/f map" only allies and war/safe zone territories. It's war so players don't have to know where their ennemies are ;). I did it with a preprocess command event to overwrite the FCommandMap but it's pretty fast to implement it in Board.getMap():

    Code:
    // in Board.getMap()
    ...
    Relation relation = factionHere.getRelation(faction);
      if(relation.equals(Relation.ALLY) || relation.equals(Relation.MEMBER)){
        if (!fList.containsKey(factionHere.getTag()))
            fList.put(factionHere.getTag(), Conf.mapKeyChrs[chrIdx++]);
        char tag = fList.get(factionHere.getTag());
        row += factionHere.getRelation(faction).getColor() + "" + tag;
    }
    ...
    

    Add an option to have a minimum distance between claims of differents factions and safe/war zone. I don't like to see players claiming territories near the safe/war zone or near other factions, it's an easy way to protect their territories or to be safe when attacking another faction territory. It's also pretty fast to do it, here my code on a preprocess event (The /autoclaim command is disabled on my server) :

    Code:
    if(message.startsWith("/f claim")){
    
        Chunk playerChunk = event.getPlayer().getWorld().getChunkAt(event.getPlayer().getLocation());
        World world = event.getPlayer().getWorld();
        int playerFactionId = FPlayer.get(event.getPlayer()).getFaction().getId();
        int distance = 2; //add to configuration
        for(int x = -distance; x <= distance; x++){
            for(int z = -distance; z <= distance; z++){
                Chunk chunk = world.getChunkAt(playerChunk.getX() + x, playerChunk.getZ() + z);
                FLocation flocation = new FLocation(chunk.getBlock(0, 0, 0).getLocation());
                int factionId = Board.getIdAt(flocation);
                if(factionId != 0 && factionId != playerFactionId){
                    event.getPlayer().sendMessage("You can't claim that territory because your are at less than " + distance + " chunks of another protected chunk.");
                    event.setCancelled(true);
                    return;
                }
            }
        }
    }
    
    Add a max players per factions options. Too avoid one big faction with 50 players and 20 smalls with 5 players we added this options. Same on a preprocess event :

    Code:
    if(message.startsWith("/f join")){
        String[] args = message.split(" ");
        if(args.length > 2){
            int maxPlayer = 25; // Add to configuration
            for(Faction f : Faction.getAll()){
                if(f.getTag().equals(args[2])){
                    if(f.getFPlayers().size() >= maxPlayer){
                        event.setCancelled(true);
                        event.getPlayer().sendMessage(ChatColor.RED + maxPlayer + " players maximum per factions");
                    }
                }
            }
        }
    }
    
    I know you are not planning it, but it can be great if you can implement iConomy (or other money plugin) api in Factions to have to pay for:
    • Create a faction. We did it again with a preprocess event. On our server each player begin with 50$. To create a faction you have to pay 150$. So you have to be at least three to create a faction. Like that we almost don't have any factions with 1 or 2 players and a lot of bigs fats factions :)
    • Change the tag of your faction. It' boring to have Factions changing their name each days. Players are lost sometimes.
    • Join a faction.
    To finish, one thing i really would like to have is a minimum time before to cancel an alliance or a war declaration.

    Example : Faction A wants to have Faction B as ally. Faction B is agree so their are now allies. Players of Factions A go on the territory of Faction B safely and one minute after, Faction A declare the war to Faction B and kill them all.

    I think it's too easy and moreover it's not good for players relationships. When you sign peace or declare war is not for 1 minutes, it's for hours or days at least.


    Sorry for the long post and my poor english, and thanks again for this awesome plugins !
     
  14. Offline

    embty

    Back stabbing is fun sometimes :)
     
  15. Offline

    Greu

    @embty : I agree but most of the time it's frustrating and source of conflict between players :/

    I forgot to test land inflation in my /f claim modification :

    Code:
    if(message.startsWith("/f claim")){
    	Chunk playerChunk = event.getPlayer().getWorld().getChunkAt(event.getPlayer().getLocation());
    	World world = event.getPlayer().getWorld();
    	int playerFactionId = FPlayer.get(event.getPlayer()).getFaction().getId();
    	int distance = 2; //Add to config
    	for(int x = -distance; x <= distance; x++){
    		for(int z = -distance; z <= distance; z++){
    			Chunk chunk = world.getChunkAt(playerChunk.getX() + x, playerChunk.getZ() + z);
    			FLocation flocation = new FLocation(chunk.getBlock(0, 0, 0).getLocation());
    			int factionId = Board.getIdAt(flocation);
    			if(factionId != 0 && factionId != playerFactionId){
    				if(!(Faction.get(factionId).hasLandInflation() && Board.isBorderLocation(flocation))){
    					event.getPlayer().sendMessage("You can't claim that territory because your are at less than " + distance + " chunks of another protected chunk.");
    					event.setCancelled(true);
    					return;
    				}
    			}
    		}    			
    	}
    }
    
     
  16. Offline

    Zorkin3

    Hi.. is the territorry now piston protected? So the enemy faction pistons couldn't push blocks to other faction territorry?
     
  17. Offline

    ebol4anthr4x

    Is there a way to set a specific cuboid area where there is no power loss?
     
  18. Offline

    Deathfromace

    Thanks for the quick updates and the amount of them always fun to see what things are being added.
     
  19. Offline

    XSaracen

    Love this but i want to know how when someone gets in my faction limits i cant kill them unless i declare war. Is there a way to let me kill him in the config?
     
  20. Offline

    Djrowling

    Does this work on 953? I really love this plugin it's the best.
     
  21. Offline

    DoomBunnyPwn

    My users are reporting some minor chunk claiming issues, but it mostly works great!
     
  22. Offline

    The_Basilisk

    Can you release a version compatible with Minecraft 1.7.2? With your current version, it sometimes swaps chunk labels, e.g: a safe zone is sometimes marked as wilderness.
     
  23. Offline

    Nalestom

    Just a quick question regarding warring factions...

    Can two factions that are at war with each other destroy blocks on each other's territory, as well as take from opposing faction's chests?

    Thanks.
     
  24. Offline

    Rogueleader89

    Could we get building in faction territory and destroying blocks in faction territory to be seperate settings? Or better yet, a whitelist/blacklist of things that can be placed/destroyed (I'd like my players to be able to place tnt in enemy areas when they are online for instance, but I don't want them to be able to tower over walls)
     
  25. Offline

    Brettflan

    Not currently planned.

    Thanks for the feedback and code snippets. I'll check over them.

    Pistons are not treated differently from any other block at the moment. I'm not sure whether I'll actually address this or not; could be a pain to try to handle.

    War Zones can be configured to have power loss disabled, and whole worlds can have power loss disabled, but otherwise no.

    I just now briefly tested in 953. Confirmed, and very bizarre. I might not have believed it if I hadn't seen it myself. I'll be looking into it.

    No, but they can hurt enemies in the enemy territory (albeit with normally decreased damage), and can claim enemy territories if the enemy power level drops far enough.
     
  26. Offline

    OutLawGam3r

    is there a way to disable monsters spawning when they enter factions?
     
  27. Offline

    Arubian

    i have a bug when i get in my safe zone it will say some time's wild and when i get in wild it will safe zone any help?
     
  28. Offline

    Nalestom

    Is it possible to add such a thing in the config? Is it as simple as enabling build/destroy rights between two factions, or would you have to rewrite a major part of the plugin?

    This is an amazing plugin that my entire server is based around, so I'd kill to have something like that enabled. =)
     
  29. Offline

    crohakon

    The autoclaim for safe zones is not working. It confirms that the command was typed correctly, claims the land you are on, but does not continue claiming as you move.
     
  30. Offline

    e_zach

    the author already knows about this bug and is working on a fix
     

Share This Page