mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Use ordinal instead of value for Gender.
This commit is contained in:
@@ -10,26 +10,12 @@ public enum Gender {
|
||||
/**
|
||||
* The male gender.
|
||||
*/
|
||||
MALE(0),
|
||||
MALE,
|
||||
|
||||
/**
|
||||
* The female gender.
|
||||
*/
|
||||
FEMALE(1);
|
||||
|
||||
/**
|
||||
* The numerical value used by the client.
|
||||
*/
|
||||
private final int value;
|
||||
|
||||
/**
|
||||
* Creates the gender.
|
||||
*
|
||||
* @param value The numerical value.
|
||||
*/
|
||||
private Gender(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
FEMALE;
|
||||
|
||||
/**
|
||||
* Converts this gender to an integer.
|
||||
@@ -37,7 +23,7 @@ public enum Gender {
|
||||
* @return The numerical value used by the client.
|
||||
*/
|
||||
public int toInteger() {
|
||||
return value;
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user