Some bugs fixed.

This commit is contained in:
Olof Larsson
2011-10-10 01:21:05 +02:00
parent a5c8e2de49
commit 3cc7766fa7
26 changed files with 275 additions and 235 deletions

View File

@@ -40,32 +40,32 @@ public class CmdHome extends FCommand
// TODO: Hide this command on help also.
if ( ! Conf.homesEnabled)
{
fme.sendMessage("Sorry, Faction homes are disabled on this server.");
fme.sendMessageParsed("<b>Sorry, Faction homes are disabled on this server.");
return;
}
if ( ! Conf.homesTeleportCommandEnabled)
{
fme.sendMessage("Sorry, the ability to teleport to Faction homes is disabled on this server.");
fme.sendMessageParsed("<b>Sorry, the ability to teleport to Faction homes is disabled on this server.");
return;
}
if ( ! myFaction.hasHome())
{
fme.sendMessage("You faction does not have a home. " + (fme.getRole().value < Role.MODERATOR.value ? " Ask your leader to:" : "You should:"));
fme.sendMessage(new CmdSethome().getUseageTemplate());
fme.sendMessageParsed("<b>You faction does not have a home. " + (fme.getRole().value < Role.MODERATOR.value ? "<i> Ask your leader to:" : "<i>You should:"));
fme.sendMessage(p.cmdBase.cmdSethome.getUseageTemplate());
return;
}
if ( ! Conf.homesTeleportAllowedFromEnemyTerritory && fme.isInEnemyTerritory())
{
fme.sendMessage("You cannot teleport to your faction home while in the territory of an enemy faction.");
fme.sendMessageParsed("<b>You cannot teleport to your faction home while in the territory of an enemy faction.");
return;
}
if ( ! Conf.homesTeleportAllowedFromDifferentWorld && me.getWorld().getUID() != myFaction.getHome().getWorld().getUID())
{
fme.sendMessage("You cannot teleport to your faction home while in a different world.");
fme.sendMessageParsed("<b>You cannot teleport to your faction home while in a different world.");
return;
}
@@ -114,7 +114,7 @@ public class CmdHome extends FCommand
if (dx > max || dy > max || dz > max)
continue;
fme.sendMessage("You cannot teleport to your faction home while an enemy is within " + Conf.homesTeleportAllowedEnemyDistance + " blocks of you.");
fme.sendMessageParsed("<b>You cannot teleport to your faction home while an enemy is within " + Conf.homesTeleportAllowedEnemyDistance + " blocks of you.");
return;
}
}