Merge branch 'master' of github.com:MassiveCraft/Factions

This commit is contained in:
Olof Larsson
2011-10-08 18:45:08 +02:00
36 changed files with 1051 additions and 193 deletions

View File

@ -0,0 +1,28 @@
package com.massivecraft.factions.struct;
public enum ChatMode {
FACTION(2, "faction chat"),
ALLIANCE(1, "alliance chat"),
PUBLIC(0, "public chat");
public final int value;
public final String nicename;
private ChatMode(final int value, final String nicename) {
this.value = value;
this.nicename = nicename;
}
public boolean isAtLeast(ChatMode role) {
return this.value >= role.value;
}
public boolean isAtMost(ChatMode role) {
return this.value <= role.value;
}
@Override
public String toString() {
return this.nicename;
}
}