what?
This commit is contained in:
48
src/com/bukkit/mcteam/factions/struct/Relation.java
Normal file
48
src/com/bukkit/mcteam/factions/struct/Relation.java
Normal 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;
|
||||
}*/
|
||||
}
|
||||
20
src/com/bukkit/mcteam/factions/struct/Role.java
Normal file
20
src/com/bukkit/mcteam/factions/struct/Role.java
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user