Fixed the package structure

This commit is contained in:
Olof Larsson
2011-04-08 15:51:07 +02:00
parent ca16884273
commit 443fac354a
140 changed files with 366 additions and 361 deletions

View File

@@ -0,0 +1,37 @@
package org.mcteam.factions.struct;
import org.bukkit.ChatColor;
import org.mcteam.factions.Conf;
public enum Relation {
MEMBER(3, "member"),
ALLY(2, "ally"),
NEUTRAL(1, "neutral"),
ENEMY(0, "enemy");
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() {
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

@@ -0,0 +1,34 @@
package org.mcteam.factions.struct;
import org.mcteam.factions.Conf;
public enum Role {
ADMIN(2, "admin"),
MODERATOR(1, "moderator"),
NORMAL(0, "normal member");
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;
}
public String getPrefix() {
if (this == Role.ADMIN) {
return Conf.prefixAdmin;
}
if (this == Role.MODERATOR) {
return Conf.prefixMod;
}
return "";
}
}