From 259cf71e27dad4e03244e063d8dee9b2bcd478d1 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 4 Mar 2016 14:10:54 +0100 Subject: [PATCH] MassiveCore - Various Improvements --- src/com/massivecraft/factions/cmd/CmdFactions.java | 14 +++++++------- .../massivecraft/factions/entity/FactionColl.java | 6 +----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index 3d33f1e9..5a46ab5c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -5,8 +5,8 @@ import java.util.List; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MConf; -import com.massivecraft.massivecore.command.DeprecatedCommand; -import com.massivecraft.massivecore.command.VersionCommand; +import com.massivecraft.massivecore.command.MassiveCommandDeprecated; +import com.massivecraft.massivecore.command.MassiveCommandVersion; public class CmdFactions extends FactionsCommand { @@ -67,7 +67,7 @@ public class CmdFactions extends FactionsCommand public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband(); public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost(); public CmdFactionsSetpower cmdFactionsSetpower = new CmdFactionsSetpower(); - public VersionCommand cmdFactionsVersion = new VersionCommand(Factions.get(), Perm.VERSION.node, "v", "version"); + public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get(), Perm.VERSION.node, "v", "version"); // -------------------------------------------- // // CONSTRUCT @@ -125,10 +125,10 @@ public class CmdFactions extends FactionsCommand this.addChild(this.cmdFactionsVersion); // Deprecated Commands - this.addChild(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim")); - this.addChild(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall")); - this.addChild(new DeprecatedCommand(this.cmdFactionsFlag, "open")); - this.addChild(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who")); + this.addChild(new MassiveCommandDeprecated(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim")); + this.addChild(new MassiveCommandDeprecated(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall")); + this.addChild(new MassiveCommandDeprecated(this.cmdFactionsFlag, "open")); + this.addChild(new MassiveCommandDeprecated(this.cmdFactionsFaction, "show", "who")); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/FactionColl.java b/src/com/massivecraft/factions/entity/FactionColl.java index c3d8599c..767510fa 100644 --- a/src/com/massivecraft/factions/entity/FactionColl.java +++ b/src/com/massivecraft/factions/entity/FactionColl.java @@ -254,6 +254,7 @@ public class FactionColl extends Coll return errors; } + @Override public Faction getByName(String name) { String compStr = MiscUtil.getComparisonString(name); @@ -266,11 +267,6 @@ public class FactionColl extends Coll } return null; } - - public boolean isNameTaken(String str) - { - return this.getByName(str) != null; - } // -------------------------------------------- // // PREDICATE LOGIC