changed namespace to com.massivecraft

This commit is contained in:
Olof Larsson
2011-07-18 22:06:02 +02:00
parent 60603892c6
commit 8aefae5679
151 changed files with 988 additions and 949 deletions

View File

@ -0,0 +1,54 @@
package com.massivecraft.factions.struct;
import org.bukkit.ChatColor;
import com.massivecraft.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 boolean isMember() {
return this == Relation.MEMBER;
}
public boolean isAlly() {
return this == Relation.ALLY;
}
public boolean isNeutral() {
return this == Relation.NEUTRAL;
}
public boolean isEnemy() {
return this == Relation.ENEMY;
}
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 com.massivecraft.factions.struct;
import com.massivecraft.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 "";
}
}