From 57f5372d43209bef1409149c8e6408c42dbebcf9 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 10 Apr 2013 09:40:39 +0200 Subject: [PATCH] Removing some deprecated stuff and fixing some ASCII art. --- src/com/massivecraft/factions/Faction.java | 60 +++---------------- .../massivecraft/factions/FactionColl.java | 20 +++---- .../factions/TerritoryAccess.java | 8 +-- 3 files changed, 21 insertions(+), 67 deletions(-) diff --git a/src/com/massivecraft/factions/Faction.java b/src/com/massivecraft/factions/Faction.java index ed233b47..35d66b1f 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -296,9 +296,9 @@ public class Faction extends Entity implements EconomyParticipator } // TODO: Implement a has enough feature. - //----------------------------------------------// + // -------------------------------------------- // // Power - //----------------------------------------------// + // -------------------------------------------- // public double getPower() { if (this.getFlag(FFlag.INFPOWER)) @@ -361,9 +361,9 @@ public class Faction extends Entity implements EconomyParticipator return this.getLandRounded() > this.getPowerRounded(); } - // ------------------------------- + // -------------------------------------------- // // FPlayers - // ------------------------------- + // -------------------------------------------- // // maintain the reference list of FPlayers in this faction public void refreshFPlayers() @@ -504,9 +504,9 @@ public class Faction extends Entity implements EconomyParticipator } } - //----------------------------------------------// + // -------------------------------------------- // // Messages - //----------------------------------------------// + // -------------------------------------------- // public void msg(String message, Object... args) { message = Factions.get().txt.parse(message, args); @@ -533,53 +533,9 @@ public class Faction extends Entity implements EconomyParticipator } } - //----------------------------------------------// - // Deprecated - //----------------------------------------------// - /** - * @deprecated As of release 1.7, replaced by {@link #getFPlayerLeader()} - */ - public FPlayer getFPlayerAdmin() - { - return getFPlayerLeader(); - } - - /** - * @deprecated As of release 1.7, replaced by {@link #getFlag()} - */ - public boolean isPeaceful() - { - return this.getFlag(FFlag.PEACEFUL); - } - - /** - * @deprecated As of release 1.7, replaced by {@link #getFlag()} - */ - public boolean getPeacefulExplosionsEnabled() - { - return this.getFlag(FFlag.EXPLOSIONS); - } - - /** - * @deprecated As of release 1.7, replaced by {@link #getFlag()} - */ - public boolean noExplosionsInTerritory() - { - return ! this.getFlag(FFlag.EXPLOSIONS); - } - - /** - * @deprecated As of release 1.7, replaced by {@link #getFlag()} - */ - public boolean isSafeZone() - { - return ! this.getFlag(FFlag.EXPLOSIONS); - } - - //----------------------------------------------// + // -------------------------------------------- // // Persistance and entity management - //----------------------------------------------// - + // -------------------------------------------- // @Override public void postDetach() diff --git a/src/com/massivecraft/factions/FactionColl.java b/src/com/massivecraft/factions/FactionColl.java index af1872c8..1985063c 100644 --- a/src/com/massivecraft/factions/FactionColl.java +++ b/src/com/massivecraft/factions/FactionColl.java @@ -43,9 +43,9 @@ public class FactionColl extends EntityCollection { if ( ! super.loadFromDisc()) return false; - //----------------------------------------------// + // -------------------------------------------- // // Create Default Special Factions - //----------------------------------------------// + // -------------------------------------------- // if ( ! this.exists("0")) { Faction faction = this.create("0"); @@ -69,9 +69,9 @@ public class FactionColl extends EntityCollection this.setFlagsForWarZone(faction); } - //----------------------------------------------// + // -------------------------------------------- // // Fix From Old Formats - //----------------------------------------------// + // -------------------------------------------- // Faction wild = this.get("0"); Faction safeZone = this.get("-1"); Faction warZone = this.get("-2"); @@ -99,9 +99,9 @@ public class FactionColl extends EntityCollection return true; } - //----------------------------------------------// + // -------------------------------------------- // // Flag Setters - //----------------------------------------------// + // -------------------------------------------- // public void setFlagsForWilderness(Faction faction) { faction.setOpen(false); @@ -172,9 +172,9 @@ public class FactionColl extends EntityCollection } - //----------------------------------------------// + // -------------------------------------------- // // GET - //----------------------------------------------// + // -------------------------------------------- // @Override public Faction get(String id) @@ -194,9 +194,9 @@ public class FactionColl extends EntityCollection return this.get("0"); } - //----------------------------------------------// + // -------------------------------------------- // // Faction tag - //----------------------------------------------// + // -------------------------------------------- // public static ArrayList validateTag(String str) { diff --git a/src/com/massivecraft/factions/TerritoryAccess.java b/src/com/massivecraft/factions/TerritoryAccess.java index 33cb4616..a59162d1 100644 --- a/src/com/massivecraft/factions/TerritoryAccess.java +++ b/src/com/massivecraft/factions/TerritoryAccess.java @@ -18,7 +18,7 @@ public class TerritoryAccess private boolean hostFactionAllowed = true; public boolean isHostFactionAllowed() { return this.hostFactionAllowed; } - public void setHostFactionAllowed(boolean allowed) { this.hostFactionAllowed = allowed; } + public void setHostFactionAllowed(boolean hostFactionAllowed) { this.hostFactionAllowed = hostFactionAllowed; } private Set factionIds = new LinkedHashSet(); public Set getFactionIds() { return this.factionIds; } @@ -30,11 +30,9 @@ public class TerritoryAccess // CONSTRUCT // -------------------------------------------- // - - - public TerritoryAccess(String factionID) + public TerritoryAccess(String hostFactionId) { - hostFactionId = factionID; + this.hostFactionId = hostFactionId; } public TerritoryAccess()