minor cleanup
This commit is contained in:
parent
4e7aa893a3
commit
62f80a607b
@ -23,8 +23,8 @@ public class Econ {
|
|||||||
if (enabled()) {
|
if (enabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iConomyHooked()) {
|
if (!iConomyHooked()) {
|
||||||
Plugin plug = factions.getServer().getPluginManager().getPlugin("iConomy");
|
Plugin plug = factions.getServer().getPluginManager().getPlugin("iConomy");
|
||||||
if (plug != null && plug.getClass().getName().equals("com.iConomy.iConomy") && plug.isEnabled()) {
|
if (plug != null && plug.getClass().getName().equals("com.iConomy.iConomy") && plug.isEnabled()) {
|
||||||
iConomySet(true);
|
iConomySet(true);
|
||||||
@ -35,13 +35,13 @@ public class Econ {
|
|||||||
if (plug != null && plug.isEnabled()) {
|
if (plug != null && plug.isEnabled()) {
|
||||||
essentialsEcoSet(true);
|
essentialsEcoSet(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void iConomySet(boolean enable) {
|
public static void iConomySet(boolean enable) {
|
||||||
iConomyUse = enable;
|
iConomyUse = enable;
|
||||||
if (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 {
|
else {
|
||||||
Factions.log("Un-hooked from iConomy.");
|
Factions.log("Un-hooked from iConomy.");
|
||||||
@ -51,7 +51,7 @@ public class Econ {
|
|||||||
public static void essentialsEcoSet(boolean enable) {
|
public static void essentialsEcoSet(boolean enable) {
|
||||||
essEcoUse = enable;
|
essEcoUse = enable;
|
||||||
if (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 {
|
else {
|
||||||
Factions.log("Un-hooked from EssentialsEco.");
|
Factions.log("Un-hooked from EssentialsEco.");
|
||||||
|
@ -61,7 +61,7 @@ public class FCommandCreate extends FBaseCommand {
|
|||||||
faction.setTag(tag);
|
faction.setTag(tag);
|
||||||
me.setRole(Role.ADMIN);
|
me.setRole(Role.ADMIN);
|
||||||
me.setFaction(faction);
|
me.setFaction(faction);
|
||||||
|
|
||||||
for (FPlayer follower : FPlayer.getAllOnline()) {
|
for (FPlayer follower : FPlayer.getAllOnline()) {
|
||||||
follower.sendMessage(me.getNameAndRelevant(follower)+Conf.colorSystem+" created a new faction "+faction.getTag(follower));
|
follower.sendMessage(me.getNameAndRelevant(follower)+Conf.colorSystem+" created a new faction "+faction.getTag(follower));
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ public class FactionsChatEarlyListener extends PlayerListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerChat(PlayerChatEvent event) {
|
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) {
|
if ((event.getMessage().startsWith(Factions.instance.getBaseCommand()+" ") || event.getMessage().equals(Factions.instance.getBaseCommand())) && Conf.allowNoSlashCommand) {
|
||||||
String msg = event.getMessage().trim();
|
String msg = event.getMessage().trim();
|
||||||
// make sure command isn't denied due to being in enemy/neutral territory
|
// make sure command isn't denied due to being in enemy/neutral territory
|
||||||
|
Loading…
Reference in New Issue
Block a user