Static Abuse Removal - TextComponentFactory

This commit is contained in:
nossr50
2019-07-02 21:45:42 -07:00
parent 5ec59536c7
commit bc183cd4f9
29 changed files with 144 additions and 147 deletions

View File

@@ -90,7 +90,7 @@ public class AcrobaticsCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.ACROBATICS);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.ACROBATICS);
return textComponents;
}

View File

@@ -89,7 +89,7 @@
// protected List<TextComponent> getTextComponents(Player player) {
// List<TextComponent> textComponents = new ArrayList<>();
//
// TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.ALCHEMY);
// pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.ALCHEMY);
//
// return textComponents;
// }

View File

@@ -86,7 +86,7 @@ public class ArcheryCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.ARCHERY);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.ARCHERY);
return textComponents;
}

View File

@@ -106,7 +106,7 @@ public class AxesCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES);
return textComponents;
}

View File

@@ -68,7 +68,7 @@ public class ExcavationCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.EXCAVATION);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.EXCAVATION);
return textComponents;
}

View File

@@ -179,7 +179,7 @@ public class FishingCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.FISHING);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.FISHING);
return textComponents;
}

View File

@@ -143,7 +143,7 @@ public class HerbalismCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.HERBALISM);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.HERBALISM);
return textComponents;
}

View File

@@ -112,7 +112,7 @@ public class MiningCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.MINING);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.MINING);
return textComponents;
}

View File

@@ -78,7 +78,7 @@ public class MmoInfoCommand implements TabExecutor {
if (abstractSubSkill != null) {
/* New System Skills are programmable */
abstractSubSkill.printInfo(player);
//TextComponentFactory.sendPlayerUrlHeader(player);
//pluginRef.getTextComponentFactory().sendPlayerUrlHeader(player);
} else {
/*
* Skill is only in the old system
@@ -95,6 +95,6 @@ public class MmoInfoCommand implements TabExecutor {
}
//Send Player Wiki Link
TextComponentFactory.sendPlayerSubSkillWikiLink(player, subSkillName);
pluginRef.getTextComponentFactory().sendPlayerSubSkillWikiLink(player, subSkillName);
}
}

View File

@@ -121,7 +121,7 @@ public class RepairCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.REPAIR);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.REPAIR);
return textComponents;
}

View File

@@ -66,7 +66,7 @@ public class SalvageCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.SALVAGE);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.SALVAGE);
return textComponents;
}

View File

@@ -93,7 +93,7 @@ public abstract class SkillCommand implements TabExecutor {
//Send JSON text components
TextComponentFactory.sendPlayerSubSkillList(player, subskillTextComponents);
pluginRef.getTextComponentFactory().sendPlayerSubSkillList(player, subskillTextComponents);
/*for(TextComponent tc : subskillTextComponents)
{
@@ -109,7 +109,7 @@ public abstract class SkillCommand implements TabExecutor {
//Link Header
if (pluginRef.getConfigManager().getConfigAds().isShowWebsiteLinks()) {
player.sendMessage(pluginRef.getLocaleManager().getString("Overhaul.mcMMO.Header"));
TextComponentFactory.sendPlayerUrlHeader(player);
pluginRef.getTextComponentFactory().sendPlayerUrlHeader(player);
}

View File

@@ -89,7 +89,7 @@ public class SmeltingCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.SMELTING);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.SMELTING);
return textComponents;
}

View File

@@ -112,7 +112,7 @@ public class SwordsCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.SWORDS);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.SWORDS);
return textComponents;
}

View File

@@ -108,7 +108,7 @@ public class TamingCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, this.skill);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, this.skill);
return textComponents;
}

View File

@@ -124,7 +124,7 @@ public class UnarmedCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.UNARMED);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.UNARMED);
return textComponents;
}

View File

@@ -85,7 +85,7 @@ public class WoodcuttingCommand extends SkillCommand {
protected List<TextComponent> getTextComponents(Player player) {
List<TextComponent> textComponents = new ArrayList<>();
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.WOODCUTTING);
pluginRef.getTextComponentFactory().getSubSkillTextComponents(player, textComponents, PrimarySkillType.WOODCUTTING);
return textComponents;
}