mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-05 14:33:44 +00:00
Update canBind() for spirits.
This commit is contained in:
parent
a922b8bd17
commit
995b20f7e0
1 changed files with 13 additions and 0 deletions
|
@ -28,6 +28,8 @@ import com.projectkorra.projectkorra.event.PlayerCooldownChangeEvent;
|
|||
import com.projectkorra.projectkorra.event.PlayerCooldownChangeEvent.Result;
|
||||
import com.projectkorra.projectkorra.storage.DBConnection;
|
||||
import com.projectkorra.projectkorra.waterbending.Bloodbending;
|
||||
import com.projectkorra.spirits.SpiritElement;
|
||||
import com.projectkorra.spirits.SpiritPlayer;
|
||||
|
||||
/**
|
||||
* Class that presents a player and stores all bending information about the player.
|
||||
|
@ -241,6 +243,17 @@ public class BendingPlayer {
|
|||
if (!hasElement(subElement.getParentElement())) {
|
||||
return false;
|
||||
}
|
||||
if (GeneralMethods.hasSpirits()) {
|
||||
if (GeneralMethods.hasSpirits()) {
|
||||
SpiritPlayer sPlayer = SpiritPlayer.getSpiritPlayer(player);
|
||||
if (subElement.equals(SpiritElement.DARK) && sPlayer.isLightSpirit()) {
|
||||
return false;
|
||||
}
|
||||
if (subElement.equals(SpiritElement.LIGHT) && sPlayer.isDarkSpirit()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue