1.0.0-SNAPSHOT-U128

+ Connected the CustomSkillTypeEditorPanel to the CustomSkillEditorPanel
+ Some small optimizations
This commit is contained in:
Charles 2018-12-16 17:34:59 +08:00
parent f727fe3588
commit d63555d933
2 changed files with 5 additions and 5 deletions

View File

@ -49,12 +49,13 @@ public class CustomSkillEditorPanel extends VariablePanelHandler<Skill> {
panelBuilder.addReplaceData(replaceMap);
PanelBuilderCounter counter = panelBuilder.getPanelBuilderCounter();
CustomSkillElement customSkillElement = this.bossSkillManager.getCustomSkillElement(skill);
Panel panel = panelBuilder.getPanel()
.setParentPanelHandler(this.bossPanelManager.getMainSkillEditMenu(), skill);
counter.getSlotsWith("Type").forEach(slot -> panel.setOnClick(slot, event -> {}));
counter.getSlotsWith("Type").forEach(slot -> panel.setOnClick(slot, event -> this.bossPanelManager.getCustomSkillTypeEditorMenu().openFor((Player) event.getWhoClicked(), skill, customSkillElement)));
counter.getSlotsWith("SpecialSettings").forEach(slot -> panel.setOnClick(slot, event -> {}));
counter.getSlotsWith("Multiplier").forEach(slot -> panel.setOnClick(slot, getMultiplierAction(skill)));
counter.getSlotsWith("Multiplier").forEach(slot -> panel.setOnClick(slot, getMultiplierAction(skill, customSkillElement)));
panel.openFor(player);
}
@ -69,10 +70,9 @@ public class CustomSkillEditorPanel extends VariablePanelHandler<Skill> {
}
private ClickAction getMultiplierAction(Skill skill) {
private ClickAction getMultiplierAction(Skill skill, CustomSkillElement customSkillElement) {
return event -> {
ClickType clickType = event.getClick();
CustomSkillElement customSkillElement = this.bossSkillManager.getCustomSkillElement(skill);
Double amountToModifyBy;
if(clickType == ClickType.SHIFT_LEFT) {

View File

@ -20,7 +20,7 @@
<properties>
<!--<plugin.version>maven-version-number-SNAPSHOT-U90</plugin.version>-->
<plugin.version>1.0.0-U127</plugin.version>
<plugin.version>1.0.0-U128</plugin.version>
<plugin.name>EpicBosses</plugin.name>
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
<plugin.author>AMinecraftDev</plugin.author>