Make titles update on levelup

This commit is contained in:
nossr50 2012-04-03 07:08:37 -07:00
parent 378de09ccd
commit a1283bfc0f
3 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Version 1.3.05-dev
+ Added bonus damage to Archery, every 50 levels you gain 10% bonus damage + Added bonus damage to Archery, every 50 levels you gain 10% bonus damage
+ Added ExperienceAPI and PartyAPI classes for developer use + Added ExperienceAPI and PartyAPI classes for developer use
+ Added ability to cap overall power level + Added ability to cap overall power level
+ Added showing powerlevel below a persons name if you run Spout (optional)
= Fixed errors when Spout would disable itself after start-up = Fixed errors when Spout would disable itself after start-up
= Fixed XP bar not updating when XP was gained = Fixed XP bar not updating when XP was gained
= Fixed bug with repairing wooden tools = Fixed bug with repairing wooden tools

View File

@ -33,7 +33,7 @@ public class mcSpoutListener implements Listener {
//TODO: Add custom titles based on skills //TODO: Add custom titles based on skills
if (LoadProperties.showPowerLevel) { if (LoadProperties.showPowerLevel) {
sPlayer.setTitle(sPlayer.getTitle() + "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl" sPlayer.setTitle(sPlayer.getName()+ "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl"
+ ChatColor.WHITE+"." + ChatColor.GREEN + String.valueOf(PPs.getPowerLevel())); + ChatColor.WHITE+"." + ChatColor.GREEN + String.valueOf(PPs.getPowerLevel()));
} }

View File

@ -224,6 +224,12 @@ public class Skills {
} }
SpoutStuff.levelUpNotification(skillType, sPlayer); SpoutStuff.levelUpNotification(skillType, sPlayer);
/* Update custom titles */
if(LoadProperties.showPowerLevel) {
sPlayer.setTitle(sPlayer.getName()+ "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl"
+ ChatColor.WHITE+"." + ChatColor.GREEN + String.valueOf(PP.getPowerLevel()));
}
} }
else { else {
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)})); player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));