Towny icon indicating copy to clipboard operation
Towny copied to clipboard

Removed Land Switching Hands in Flag War

Open RemlapVII opened this issue 11 years ago • 9 comments

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.

RemlapVII avatar May 24 '14 01:05 RemlapVII

If you want it merged - make it optional.

ErgoAsh avatar May 24 '14 05:05 ErgoAsh

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

RemlapVII avatar May 24 '14 16:05 RemlapVII

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

Zren avatar May 24 '14 16:05 Zren

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

RemlapVII avatar May 24 '14 16:05 RemlapVII

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>();

Zren avatar May 24 '14 17:05 Zren

Tabs should be good now.

RemlapVII avatar May 24 '14 17:05 RemlapVII

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

RemlapVII avatar May 26 '14 02:05 RemlapVII

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

ErgoAsh avatar May 26 '14 05:05 ErgoAsh

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

RemlapVII avatar May 26 '14 06:05 RemlapVII