Child Skill commands don't look so bad now

This commit is contained in:
nossr50 2019-01-17 11:44:01 -08:00
parent 1585d8157e
commit 6888a082fc
7 changed files with 48 additions and 20 deletions

View File

@ -24,7 +24,7 @@ Version 2.1.0
+ (Events) Starting an XP event will now use the title API (toggle this in advanced.yml) + (Events) Starting an XP event will now use the title API (toggle this in advanced.yml)
+ (Sound) Volume and Pitch of sounds can now be configured in the new sounds.yml file + (Sound) Volume and Pitch of sounds can now be configured in the new sounds.yml file
+ (MySQL) Added support for SSL for MySQL/MariaDB (On by default) + (MySQL) Added support for SSL for MySQL/MariaDB (On by default)
+ (Skills) Adding a new subskill to child skills called 'Understanding The Art' this adds nothing new, but tracks your progress in that child skill, which was previous a bit obfuscated. + (Skills) Added a new subskill to some skills 'Understanding The Art' this adds nothing new, but tracks benefits that increase together that seemed unrelated, which was previously a bit obfuscated.
+ (Skills) Tool alerts now are sent to the Action Bar + (Skills) Tool alerts now are sent to the Action Bar
+ (Skills) Super Ability activation alerts are now sent to the Action Bar + (Skills) Super Ability activation alerts are now sent to the Action Bar
+ (Skills) Certain Skill messages are now sent to the Action Bar + (Skills) Certain Skill messages are now sent to the Action Bar

View File

@ -25,6 +25,7 @@ import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -125,6 +126,10 @@ public abstract class SkillCommand implements TabExecutor {
if(!skill.isChildSkill()) if(!skill.isChildSkill())
{ {
/*
* NON-CHILD SKILLS
*/
//XP GAIN METHOD //XP GAIN METHOD
player.sendMessage(LocaleLoader.getString("Commands.XPGain.Overhaul", LocaleLoader.getString("Commands.XPGain." + StringUtils.getCapitalized(skill.toString())))); player.sendMessage(LocaleLoader.getString("Commands.XPGain.Overhaul", LocaleLoader.getString("Commands.XPGain." + StringUtils.getCapitalized(skill.toString()))));
@ -132,18 +137,40 @@ public abstract class SkillCommand implements TabExecutor {
player.sendMessage(LocaleLoader.getString("Effects.Level.Overhaul", skillValue, mcMMOPlayer.getSkillXpLevel(skill), mcMMOPlayer.getXpToLevel(skill))); player.sendMessage(LocaleLoader.getString("Effects.Level.Overhaul", skillValue, mcMMOPlayer.getSkillXpLevel(skill), mcMMOPlayer.getXpToLevel(skill)));
} else { } else {
//XP GAIN METHOD /*
player.sendMessage(LocaleLoader.getString("Commands.XPGain.Overhaul", LocaleLoader.getString("Commands.XPGain.Child"))); * CHILD SKILLS
*/
//LEVEL
player.sendMessage(LocaleLoader.getString("Effects.Child.Overhaul", skillValue, skillValue));
Set<PrimarySkillType> parents = FamilyTree.getParents(skill); Set<PrimarySkillType> parents = FamilyTree.getParents(skill);
ArrayList<PrimarySkillType> parentList = new ArrayList<>();
//TODO: Add JSON here //TODO: Add JSON here
for (PrimarySkillType parent : parents) { for (PrimarySkillType parent : parents) {
player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level.Overhaul", mcMMOPlayer.getSkillLevel(parent), mcMMOPlayer.getSkillXpLevel(parent), mcMMOPlayer.getXpToLevel(parent))); parentList.add(parent);
/*player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level.Overhaul", mcMMOPlayer.getSkillLevel(parent), mcMMOPlayer.getSkillXpLevel(parent), mcMMOPlayer.getXpToLevel(parent)))*/;
} }
String parentMessage = "";
for(int i = 0; i < parentList.size(); i++)
{
if(i+1 < parentList.size())
{
parentMessage += LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i)));
parentMessage += ChatColor.GRAY+", ";
} else {
parentMessage += LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i)));
}
}
//XP GAIN METHOD
player.sendMessage(LocaleLoader.getString("Commands.XPGain.Overhaul", LocaleLoader.getString("Commands.XPGain.Child")));
player.sendMessage(LocaleLoader.getString("Effects.Child.Overhaul", skillValue, parentMessage));
//LEVEL
//player.sendMessage(LocaleLoader.getString("Effects.Child.Overhaul", skillValue, skillValue));
} }
/* /*
if (!skill.isChildSkill()) { if (!skill.isChildSkill()) {

View File

@ -44,7 +44,7 @@ public enum PrimarySkillType {
HERBALISM(HerbalismManager.class, Color.GREEN, SuperAbilityType.GREEN_TERRA, ToolType.HOE, ImmutableList.of(SubSkillType.HERBALISM_GREEN_TERRA, SubSkillType.HERBALISM_FARMERS_DIET, SubSkillType.HERBALISM_GREEN_THUMB, SubSkillType.HERBALISM_DOUBLE_DROPS, SubSkillType.HERBALISM_HYLIAN_LUCK, SubSkillType.HERBALISM_SHROOM_THUMB)), HERBALISM(HerbalismManager.class, Color.GREEN, SuperAbilityType.GREEN_TERRA, ToolType.HOE, ImmutableList.of(SubSkillType.HERBALISM_GREEN_TERRA, SubSkillType.HERBALISM_FARMERS_DIET, SubSkillType.HERBALISM_GREEN_THUMB, SubSkillType.HERBALISM_DOUBLE_DROPS, SubSkillType.HERBALISM_HYLIAN_LUCK, SubSkillType.HERBALISM_SHROOM_THUMB)),
MINING(MiningManager.class, Color.GRAY, SuperAbilityType.SUPER_BREAKER, ToolType.PICKAXE, ImmutableList.of(SubSkillType.MINING_SUPER_BREAKER, SubSkillType.MINING_DEMOLITIONS_EXPERTISE, SubSkillType.MINING_BIGGER_BOMBS, SubSkillType.MINING_BLAST_MINING, SubSkillType.MINING_DOUBLE_DROPS)), MINING(MiningManager.class, Color.GRAY, SuperAbilityType.SUPER_BREAKER, ToolType.PICKAXE, ImmutableList.of(SubSkillType.MINING_SUPER_BREAKER, SubSkillType.MINING_DEMOLITIONS_EXPERTISE, SubSkillType.MINING_BIGGER_BOMBS, SubSkillType.MINING_BLAST_MINING, SubSkillType.MINING_DOUBLE_DROPS)),
REPAIR(RepairManager.class, Color.SILVER, ImmutableList.of(SubSkillType.REPAIR_ARCANE_FORGING, SubSkillType.REPAIR_REPAIR_MASTERY, SubSkillType.REPAIR_SUPER_REPAIR)), REPAIR(RepairManager.class, Color.SILVER, ImmutableList.of(SubSkillType.REPAIR_ARCANE_FORGING, SubSkillType.REPAIR_REPAIR_MASTERY, SubSkillType.REPAIR_SUPER_REPAIR)),
SALVAGE(SalvageManager.class, Color.ORANGE, ImmutableList.of(SubSkillType.SALVAGE_UNDERSTANDING_THE_ART, SubSkillType.SALVAGE_ADVANCED_SALVAGE, SubSkillType.SALVAGE_ARCANE_SALVAGE)), SALVAGE(SalvageManager.class, Color.ORANGE, ImmutableList.of(SubSkillType.SALVAGE_ADVANCED_SALVAGE, SubSkillType.SALVAGE_ARCANE_SALVAGE)),
SMELTING(SmeltingManager.class, Color.YELLOW, ImmutableList.of(SubSkillType.SMELTING_UNDERSTANDING_THE_ART, SubSkillType.SMELTING_FLUX_MINING, SubSkillType.SMELTING_FUEL_EFFICIENCY, SubSkillType.SMELTING_SECOND_SMELT)), SMELTING(SmeltingManager.class, Color.YELLOW, ImmutableList.of(SubSkillType.SMELTING_UNDERSTANDING_THE_ART, SubSkillType.SMELTING_FLUX_MINING, SubSkillType.SMELTING_FUEL_EFFICIENCY, SubSkillType.SMELTING_SECOND_SMELT)),
SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), SuperAbilityType.SERRATED_STRIKES, ToolType.SWORD, ImmutableList.of(SubSkillType.SWORDS_SERRATED_STRIKES, SubSkillType.SWORDS_BLEED, SubSkillType.SWORDS_COUNTER_ATTACK)), SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), SuperAbilityType.SERRATED_STRIKES, ToolType.SWORD, ImmutableList.of(SubSkillType.SWORDS_SERRATED_STRIKES, SubSkillType.SWORDS_BLEED, SubSkillType.SWORDS_COUNTER_ATTACK)),
TAMING(TamingManager.class, Color.PURPLE, ImmutableList.of(SubSkillType.TAMING_BEAST_LORE, SubSkillType.TAMING_CALL_OF_THE_WILD, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE, SubSkillType.TAMING_FAST_FOOD_SERVICE, SubSkillType.TAMING_GORE, SubSkillType.TAMING_HOLY_HOUND, SubSkillType.TAMING_SHARPENED_CLAWS, SubSkillType.TAMING_SHOCK_PROOF, SubSkillType.TAMING_THICK_FUR, SubSkillType.TAMING_PUMMEL)), TAMING(TamingManager.class, Color.PURPLE, ImmutableList.of(SubSkillType.TAMING_BEAST_LORE, SubSkillType.TAMING_CALL_OF_THE_WILD, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE, SubSkillType.TAMING_FAST_FOOD_SERVICE, SubSkillType.TAMING_GORE, SubSkillType.TAMING_HOLY_HOUND, SubSkillType.TAMING_SHARPENED_CLAWS, SubSkillType.TAMING_SHOCK_PROOF, SubSkillType.TAMING_THICK_FUR, SubSkillType.TAMING_PUMMEL)),

View File

@ -60,8 +60,7 @@ public enum SubSkillType {
/* Salvage */ /* Salvage */
SALVAGE_ADVANCED_SALVAGE, SALVAGE_ADVANCED_SALVAGE,
SALVAGE_ARCANE_SALVAGE, SALVAGE_ARCANE_SALVAGE(8),
SALVAGE_UNDERSTANDING_THE_ART(8),
/* Smelting */ /* Smelting */
SMELTING_FLUX_MINING(1), SMELTING_FLUX_MINING(1),

View File

@ -70,10 +70,10 @@ public class TextComponentFactory {
Player.Spigot spigotPlayer = player.spigot(); Player.Spigot spigotPlayer = player.spigot();
TextComponent prefix = new TextComponent("[| "); TextComponent prefix = new TextComponent(LocaleLoader.getString("Overhaul.mcMMO.Url.Wrap.Prefix") + " ");
prefix.setColor(ChatColor.DARK_AQUA); /*prefix.setColor(ChatColor.DARK_AQUA);*/
TextComponent suffix = new TextComponent(" |]"); TextComponent suffix = new TextComponent(" "+LocaleLoader.getString("Overhaul.mcMMO.Url.Wrap.Suffix"));
suffix.setColor(ChatColor.DARK_AQUA); /*suffix.setColor(ChatColor.DARK_AQUA);*/
TextComponent emptySpace = new TextComponent(" "); TextComponent emptySpace = new TextComponent(" ");

View File

@ -60,21 +60,23 @@ JSON.Acrobatics.SubSkill.Roll.Details.Tips=If you hold sneak while falling you c
# BEGIN STYLING # BEGIN STYLING
Ability.Generic.Refresh=[[GREEN]]**ABILITIES REFRESHED!** Ability.Generic.Refresh=[[GREEN]]**ABILITIES REFRESHED!**
Ability.Generic.Template.Lock=[[GRAY]]{0} Ability.Generic.Template.Lock=[[GRAY]]{0}
Ability.Generic.Template=[[GOLD]]{0}: [[DARK_AQUA]]{1}
# Skill Command Styling # Skill Command Styling
Ability.Generic.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1}
Skills.Overhaul.Header=[[RED]][]=====[][[GREEN]] {0} [[RED]][]=====[]
Effects.Effects=EFFECTS Effects.Effects=EFFECTS
Effects.SubSkills.Overhaul=Sub-Skills Effects.SubSkills.Overhaul=Sub-Skills
Effects.Child=[[DARK_GRAY]]LVL: [[GREEN]]{0} # Effects.Child=[[DARK_AQUA]]Child Lv.[[YELLOW]] {0}[[DARK_AQUA]]: {1}
Effects.Child.Overhaul=[[DARK_GRAY]]LVL: [[GREEN]]{0} Effects.Child.Overhaul=[[DARK_AQUA]]Child Lv.[[YELLOW]] {0}[[DARK_AQUA]]: {1}
# Effects.Level=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]]) Effects.Child.ParentList=[[GREEN]]{0}[[GOLD]]([[DARK_AQUA]]Lv.[[YELLOW]]{1}[[GOLD]])
Effects.Level.Overhaul=[[GOLD]]LVL: [[YELLOW]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]]) Effects.Level.Overhaul=[[GOLD]]LVL: [[YELLOW]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
Effects.Parent=[[GOLD]]{0} - Effects.Parent=[[GOLD]]{0} -
Effects.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1} Effects.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1}
Commands.Stats.Self.Overhaul=Stats Commands.Stats.Self.Overhaul=Stats
Commands.XPGain.Overhaul=[[GOLD]]XP GAIN: [[DARK_AQUA]]{0} Commands.XPGain.Overhaul=[[GOLD]]XP GAIN: [[DARK_AQUA]]{0}
MOTD.Version.Overhaul=[[GOLD]][mcMMO] [[DARK_AQUA]]Overhaul Era[[GOLD]] - [[DARK_AQUA]]{0} MOTD.Version.Overhaul=[[GOLD]][mcMMO] [[DARK_AQUA]]Overhaul Era[[GOLD]] - [[DARK_AQUA]]{0}
Skills.Overhaul.Header=[[DARK_AQUA]][]=====[][[GOLD]] {0} [[DARK_AQUA]][]=====[] Overhaul.mcMMO.Header=[[RED]][]=====[][[GREEN]] mcMMO - Overhaul Era [[RED]][]=====[]
Overhaul.mcMMO.Header=[[DARK_AQUA]][]=====[][[GOLD]] mcMMO - Overhaul Era [[DARK_AQUA]][]=====[] Overhaul.mcMMO.Url.Wrap.Prefix=[[RED]][|
Overhaul.mcMMO.Url.Wrap.Suffix=[[RED]]|]
Overhaul.ASCII.Art.HeaderOne=[[DARK_AQUA]]|||||||||||||||||||||||||||||||||||||| [[GOLD]] {0} [[DARK_AQUA]]|||||||||||||||||||||||||||||||||||||| Overhaul.ASCII.Art.HeaderOne=[[DARK_AQUA]]|||||||||||||||||||||||||||||||||||||| [[GOLD]] {0} [[DARK_AQUA]]||||||||||||||||||||||||||||||||||||||
# END STYLING # END STYLING

View File

@ -191,7 +191,7 @@ Smelting:
Rank_7: 850 Rank_7: 850
Rank_8: 1000 Rank_8: 1000
Salvage: Salvage:
UnderstandingTheArt: ArcaneSalvage:
Standard: Standard:
Rank_1: 10 Rank_1: 10
Rank_2: 25 Rank_2: 25