Managed to get rid of some commands. This needs to be rethought even more though.

This commit is contained in:
Olof Larsson
2011-10-22 17:03:49 +02:00
parent 45d6a6628a
commit a78a4dff98
15 changed files with 61 additions and 347 deletions

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.util;
import java.util.Arrays;
import java.util.HashSet;
import org.bukkit.ChatColor;
import org.bukkit.entity.Creature;
import org.bukkit.entity.CreatureType;
import org.bukkit.entity.Entity;
@ -51,6 +52,8 @@ public class MiscUtil
{
String ret = "";
str = ChatColor.stripColor(str);
for (char c : str.toCharArray())
{
if (substanceChars.contains(String.valueOf(c)))

View File

@ -116,10 +116,25 @@ public class RelationUtil
public static ChatColor getColorOfThatToMe(RelationParticipator that, RelationParticipator me)
{
if (getFaction(that) != null && getFaction(that).isPeaceful() && getFaction(that) != getFaction(me))
Faction thatFaction = getFaction(that);
if (thatFaction != null)
{
return Conf.colorPeaceful;
if (thatFaction.isPeaceful() && thatFaction != getFaction(me))
{
return Conf.colorPeaceful;
}
if (thatFaction.isSafeZone() && thatFaction != getFaction(me))
{
return Conf.colorPeaceful;
}
if (thatFaction.isWarZone() && thatFaction != getFaction(me))
{
return Conf.colorWar;
}
}
return getRelationTo(that, me).getColor();
}
}