From 62f80a607b2d7a43dd30a86e8549d6d536be859d Mon Sep 17 00:00:00 2001 From: Brettflan Date: Fri, 19 Aug 2011 19:41:28 -0500 Subject: [PATCH] minor cleanup --- src/com/massivecraft/factions/Econ.java | 10 +++++----- .../massivecraft/factions/commands/FCommandCreate.java | 2 +- .../factions/listeners/FactionsChatEarlyListener.java | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/com/massivecraft/factions/Econ.java b/src/com/massivecraft/factions/Econ.java index aa992b33..32c9918c 100644 --- a/src/com/massivecraft/factions/Econ.java +++ b/src/com/massivecraft/factions/Econ.java @@ -23,8 +23,8 @@ public class Econ { if (enabled()) { return; } - - if (!iConomyHooked()) { + + if (!iConomyHooked()) { Plugin plug = factions.getServer().getPluginManager().getPlugin("iConomy"); if (plug != null && plug.getClass().getName().equals("com.iConomy.iConomy") && plug.isEnabled()) { iConomySet(true); @@ -35,13 +35,13 @@ public class Econ { if (plug != null && plug.isEnabled()) { essentialsEcoSet(true); } - } + } } public static void iConomySet(boolean enable) { iConomyUse = enable; if (enable) { - Factions.log("Hooked into iConomy, "+(Conf.econIConomyEnabled ? "and interface is enabled" : "but interface is currently disabled (\"econIConomyEnabled\": false)")+"."); + Factions.log("iConomy hook available, "+(Conf.econIConomyEnabled ? "and interface is enabled" : "but disabled (\"econIConomyEnabled\": false)")+"."); } else { Factions.log("Un-hooked from iConomy."); @@ -51,7 +51,7 @@ public class Econ { public static void essentialsEcoSet(boolean enable) { essEcoUse = enable; if (enable) { - Factions.log("Hooked into EssentialsEco, "+(Conf.econEssentialsEcoEnabled ? "and interface is enabled" : "but interface is currently disabled (\"econEssentialsEcoEnabled\": false)")+"."); + Factions.log("EssentialsEco hook available, "+(Conf.econEssentialsEcoEnabled ? "and interface is enabled" : "but disabled (\"econEssentialsEcoEnabled\": false)")+"."); } else { Factions.log("Un-hooked from EssentialsEco."); diff --git a/src/com/massivecraft/factions/commands/FCommandCreate.java b/src/com/massivecraft/factions/commands/FCommandCreate.java index 205e5bab..bba362e4 100644 --- a/src/com/massivecraft/factions/commands/FCommandCreate.java +++ b/src/com/massivecraft/factions/commands/FCommandCreate.java @@ -61,7 +61,7 @@ public class FCommandCreate extends FBaseCommand { faction.setTag(tag); me.setRole(Role.ADMIN); me.setFaction(faction); - + for (FPlayer follower : FPlayer.getAllOnline()) { follower.sendMessage(me.getNameAndRelevant(follower)+Conf.colorSystem+" created a new faction "+faction.getTag(follower)); } diff --git a/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java b/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java index 369520fd..07bcd569 100644 --- a/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java @@ -20,6 +20,7 @@ public class FactionsChatEarlyListener extends PlayerListener{ @Override public void onPlayerChat(PlayerChatEvent event) { + // Is it a slashless Factions command? if ((event.getMessage().startsWith(Factions.instance.getBaseCommand()+" ") || event.getMessage().equals(Factions.instance.getBaseCommand())) && Conf.allowNoSlashCommand) { String msg = event.getMessage().trim(); // make sure command isn't denied due to being in enemy/neutral territory