Пример #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);
   }
 }
Пример #2
0
  public boolean isAbilityEnabled() {

    return ExtendedPlayer.isAbilityEnabled(GuiPerks.player, PlayerClass.values()[cls], lvl)
        || ExtendedPlayer.isAbilityEnabled(
            Minecraft.getMinecraft().thePlayer, PlayerClass.values()[cls], lvl);
  }
Пример #3
0
 public boolean isAbilityPurchased() {
   return ExtendedPlayer.getAbilityLevelFor(GuiPerks.player, PlayerClass.values()[cls]) >= lvl
       || ExtendedPlayer.getAbilityLevelFor(
               Minecraft.getMinecraft().thePlayer, PlayerClass.values()[cls])
           >= lvl;
 }