ElgarL / Towny

Towny Advanced plugin for Bukkit @ http://palmergames.com/towny/
http://palmergames.com/towny/
75 stars 91 forks source link

Removed Land Switching Hands in Flag War #134

Open RemlapVII opened 10 years ago

RemlapVII commented 10 years ago

Just a small edit I needed for Towny. I don't expect that this would be merged with the main branch, but I wanted to make sure that if someone needed it they can get access to this.

ErgoAsh commented 10 years ago

If you want it merged - make it optional.

RemlapVII commented 10 years ago

I've changed it to an option in the config.

Zren commented 10 years ago

Check your idents and try again. https://github.com/ElgarL/Towny/pull/134/files Mighta mixed tabs+spaces?

RemlapVII commented 10 years ago

Should be fixed, need to double check my preferences in Netbeans. It was working after I compiled it without issue though.

Zren commented 10 years ago

Better, but not quite. You just to an 8 spaces/tab indent after if (TownyWarConfig.cancapturechunks() == true) {

 -               selection.add(worldCoord);
 -               TownCommand.checkIfSelectionIsValid(attackingTown, selection, false, 0, false);
 -               new TownClaim(plugin, null, attackingTown, selection, false, true, false).start();
 -           } catch (TownyException te) {
 -               // Couldn't claim it.
 +           if (TownyWarConfig.cancapturechunks() == true) {
 +                            // Defender loses townblock
 +                            TownyUniverse.getDataSource().removeTownBlock(townBlock);
 +                            // Attacker Claim Automatically
 +                            try {
 +                                    List<WorldCoord> selection = new ArrayList<WorldCoord>();
RemlapVII commented 10 years ago

Tabs should be good now.

RemlapVII commented 10 years ago

I realized I hadn't forked my own code and was uploading test code to this. I have fixed it.

ErgoAsh commented 10 years ago

Maybe instead of damage add cooldown, item and money cost.

RemlapVII commented 10 years ago

I'll look into it but it seems I still failed to properly rollback my code to before my commit. New to using github.