Better chat integration with other plugins. In fact the whole chat system has been reprogrammed. Fix ascii compass typo. Fix claim at the border of enemy territory bug. New faction chat. Some refactoring

This commit is contained in:
Olof Larsson
2011-02-12 18:05:05 +01:00
parent d554bc18ec
commit da89ff4ecd
15 changed files with 417 additions and 329 deletions

View File

@@ -24,6 +24,14 @@ public enum Relation {
}
public ChatColor getColor() {
return Conf.relationColor(this);
if (this == Relation.MEMBER) {
return Conf.colorMember;
} else if (this == Relation.ALLY) {
return Conf.colorAlly;
} else if (this == Relation.NEUTRAL) {
return Conf.colorNeutral;
} else { //if (relation == FactionRelation.ENEMY) {
return Conf.colorEnemy;
}
}
}

View File

@@ -1,5 +1,7 @@
package com.bukkit.mcteam.factions.struct;
import com.bukkit.mcteam.factions.entities.Conf;
public enum Role {
ADMIN(2, "admin"),
MODERATOR(1, "moderator"),
@@ -17,4 +19,16 @@ public enum Role {
public String toString() {
return this.nicename;
}
public String getPrefix() {
if (this == Role.ADMIN) {
return Conf.prefixAdmin;
}
if (this == Role.MODERATOR) {
return Conf.prefixMod;
}
return "";
}
}