mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Enforce the species blacklist
This commit is contained in:
parent
f413e92223
commit
3d3409730e
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,7 @@ class PlayerCapabilities implements IPlayer, ICaster<EntityPlayer> {
|
|||
if (getOwner() == null) {
|
||||
return Race.HUMAN;
|
||||
}
|
||||
|
||||
return Race.fromId(getOwner().getDataManager().get(PLAYER_RACE));
|
||||
}
|
||||
|
||||
|
@ -57,6 +58,10 @@ class PlayerCapabilities implements IPlayer, ICaster<EntityPlayer> {
|
|||
public void setPlayerSpecies(Race race) {
|
||||
EntityPlayer self = getOwner();
|
||||
|
||||
if (!PlayerSpeciesList.instance().speciesPermitted(race)) {
|
||||
race = Race.HUMAN;
|
||||
}
|
||||
|
||||
if (self != null) {
|
||||
getOwner().getDataManager().set(PLAYER_RACE, race.ordinal());
|
||||
|
||||
|
|
Loading…
Reference in a new issue