Managed to get rid of some commands. This needs to be rethought even more though.
This commit is contained in:
@ -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)))
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user