Moving prefixes and chat from ConfServer to MConf

This commit is contained in:
Olof Larsson
2013-04-22 09:51:19 +02:00
parent ec8be2d2c0
commit b0871b0ee6
9 changed files with 100 additions and 132 deletions

View File

@@ -565,38 +565,6 @@ public class FPlayer extends SenderEntity<FPlayer> implements EconomyParticipato
return this.getColorTo(fplayer)+this.getNameAndTitle();
}
// Chat Tag:
// These are injected into the format of global chat messages.
public String getChatTag()
{
if ( ! this.hasFaction()) {
return "";
}
return String.format(ConfServer.chatTagFormat, this.role.getPrefix()+this.getTag());
}
// Colored Chat Tag
public String getChatTag(Faction faction)
{
if ( ! this.hasFaction()) {
return "";
}
return this.getRelationTo(faction).getColor()+getChatTag();
}
public String getChatTag(FPlayer fplayer)
{
if ( ! this.hasFaction())
{
return "";
}
return this.getColorTo(fplayer)+getChatTag();
}
// -------------------------------------------- //
// RELATION AND RELATION COLORS
// -------------------------------------------- //

View File

@@ -1,6 +1,10 @@
package com.massivecraft.factions.entity;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.ChatColor;
import org.bukkit.event.EventPriority;
import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.store.Entity;
@@ -30,5 +34,49 @@ public class MConf extends Entity<MConf>
public ChatColor colorFriendlyFire = ChatColor.DARK_RED;
//public ChatColor colorWilderness = ChatColor.DARK_GREEN;
// -------------------------------------------- //
// PREFIXES
// -------------------------------------------- //
public String prefixLeader = "**";
public String prefixOfficer = "*";
public String prefixMember = "+";
public String prefixRecruit = "-";
// -------------------------------------------- //
// CHAT
// -------------------------------------------- //
// We offer a simple standard way to set the format
public boolean chatSetFormat = false;
public EventPriority chatSetFormatAt = EventPriority.LOWEST;
public String chatSetFormatTo = "<{factions_relcolor}§l{factions_roleprefix}§r{factions_relcolor}{factions_tag|rp}§f%1$s> %2$s";
// We offer a simple standard way to parse the chat tags
public boolean chatParseTags = true;
public EventPriority chatParseTagsAt = EventPriority.LOW;
// HeroChat: The Faction Channel
public String herochatFactionName = "Faction";
public String herochatFactionNick = "F";
public String herochatFactionFormat = "{color}[&l{nick}&r{color} &l{factions_roleprefix}&r{color}{factions_title|rp}{sender}{color}] &f{msg}";
public ChatColor herochatFactionColor = ChatColor.GREEN;
public int herochatFactionDistance = 0;
public boolean herochatFactionIsShortcutAllowed = false;
public boolean herochatFactionCrossWorld = true;
public boolean herochatFactionMuted = false;
public Set<String> herochatFactionWorlds = new HashSet<String>();
// HeroChat: The Allies Channel
public String herochatAlliesName = "Allies";
public String herochatAlliesNick = "A";
public String herochatAlliesFormat = "{color}[&l{nick}&r&f {factions_relcolor}&l{factions_roleprefix}&r{factions_relcolor}{factions_tag|rp}{sender}{color}] &f{msg}";
public ChatColor herochatAlliesColor = ChatColor.DARK_PURPLE;
public int herochatAlliesDistance = 0;
public boolean herochatAlliesIsShortcutAllowed = false;
public boolean herochatAlliesCrossWorld = true;
public boolean herochatAlliesMuted = false;
public Set<String> herochatAlliesWorlds = new HashSet<String>();
}