Spout overlay support is missing for the new relation coloring. Otherwise done.

This commit is contained in:
Olof Larsson
2011-10-21 20:08:54 +02:00
parent 89b53a577a
commit e6d45a6aa2
9 changed files with 63 additions and 52 deletions

View File

@ -2,7 +2,8 @@ package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf;
public enum Role {
public enum Role
{
ADMIN(2, "admin"),
MODERATOR(1, "moderator"),
NORMAL(0, "normal member");
@ -10,30 +11,37 @@ public enum Role {
public final int value;
public final String nicename;
private Role(final int value, final String nicename) {
private Role(final int value, final String nicename)
{
this.value = value;
this.nicename = nicename;
}
public boolean isAtLeast(Role role) {
public boolean isAtLeast(Role role)
{
return this.value >= role.value;
}
public boolean isAtMost(Role role) {
public boolean isAtMost(Role role)
{
return this.value <= role.value;
}
@Override
public String toString() {
public String toString()
{
return this.nicename;
}
public String getPrefix() {
if (this == Role.ADMIN) {
public String getPrefix()
{
if (this == Role.ADMIN)
{
return Conf.prefixAdmin;
}
if (this == Role.MODERATOR) {
if (this == Role.MODERATOR)
{
return Conf.prefixMod;
}