This commit is contained in:
Olof Larsson
2011-02-06 13:36:11 +01:00
commit b3ac8f8614
27 changed files with 4173 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
package com.bukkit.mcteam.factions.struct;
import org.bukkit.ChatColor;
import com.bukkit.mcteam.factions.entities.*;
public enum Relation {
MEMBER(3, "member"),
ALLY(2, "ally"),
NEUTRAL(1, "neutral"),
ENEMY(0, "enemy");
//UNKNOWN(-1, "unknown");
public final int value;
public final String nicename;
private Relation(final int value, final String nicename) {
this.value = value;
this.nicename = nicename;
}
@Override
public String toString() {
return this.nicename;
}
public ChatColor getColor() {
return Conf.relationColor(this);
}
/*public String getChartDot() {
return Conf.chartDot(this);
}
public static Relation from(String str) {
if (str.equalsIgnoreCase("member")) {
return Relation.MEMBER;
} else if (str.equalsIgnoreCase("ally")) {
return Relation.ALLY;
} else if (str.equalsIgnoreCase("neutral")) {
return Relation.NEUTRAL;
} else if (str.equalsIgnoreCase("enemy")) {
return Relation.ENEMY;
}
return Relation.UNKNOWN;
}*/
}

View File

@@ -0,0 +1,20 @@
package com.bukkit.mcteam.factions.struct;
public enum Role {
ADMIN(2, "admin"),
MODERATOR(1, "moderator"),
NORMAL(0, "normal player");
public final int value;
public final String nicename;
private Role(final int value, final String nicename) {
this.value = value;
this.nicename = nicename;
}
@Override
public String toString() {
return this.nicename;
}
}