/** * This method returns the cap amount of experience that the experience bar can hold. With each level, the * experience cap on the player's experience bar is raised by 10. */ public int xpBarCap() { return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2); }