Example #1
0
 public void clicked() {
   EntityPlayer p = GuiPerks.player;
   if (ExtendedPlayer.hasPlayerAquired(p, PlayerClass.values()[cls], lvl)) {
     ExtendedPlayer.toggleAbilityChecked(
         p,
         !ExtendedPlayer.isAbilityEnabled(p, PlayerClass.values()[cls], lvl),
         PlayerClass.values()[cls],
         lvl);
   } else {
     ExtendedPlayer.requestUnlockLevel(p, PlayerClass.values()[cls], lvl);
   }
 }
Example #2
0
  public boolean isAbilityEnabled() {

    return ExtendedPlayer.isAbilityEnabled(GuiPerks.player, PlayerClass.values()[cls], lvl)
        || ExtendedPlayer.isAbilityEnabled(
            Minecraft.getMinecraft().thePlayer, PlayerClass.values()[cls], lvl);
  }