mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-03-12 22:49:13 +01:00
1.0.0-SNAPSHOT-U101
+ Updated config.yml to have the new Skill section in it + Added SkillTypeEditorPanel + Updated editor.yml to have the SkillTypeEditorPanel + Connected CustomSkillsPanel to the MainSkillEditorPanel
This commit is contained in:
parent
28f9e23625
commit
85959dba90
@ -114,12 +114,15 @@ Display:
|
||||
lore:
|
||||
- '&3Cost: &a$&f{price}'
|
||||
Skills:
|
||||
menuName: '&b&lEpicBosses &3&lSkills'
|
||||
name: '&b&l{name} Skill'
|
||||
lore:
|
||||
- '&3Type: &7{type}'
|
||||
- '&3Display Name: &7{displayName}'
|
||||
- '&3Custom Message: &7{customMessage}'
|
||||
- '&3Radius: &7{radius}'
|
||||
- '&7'
|
||||
- '&7Click to edit the custom skill.'
|
||||
Main:
|
||||
menuName: '&b&lEpicBosses &3&lSkills'
|
||||
name: '&b&l{name} Skill'
|
||||
lore:
|
||||
- '&3Type: &7{type}'
|
||||
- '&3Display Name: &7{displayName}'
|
||||
- '&3Custom Message: &7{customMessage}'
|
||||
- '&3Radius: &7{radius}'
|
||||
- '&7'
|
||||
- '&7Click to edit the custom skill.'
|
||||
MainEdit:
|
||||
menuName: '&b&l{name} Skill Editor'
|
@ -1355,4 +1355,77 @@ SkillEditorPanel:
|
||||
- '&7in mind that when you change your skill'
|
||||
- '&7type the previous custom data will be erased'
|
||||
- '&7to make room for the new custom data.'
|
||||
Button: Type
|
||||
Button: Type
|
||||
SkillTypeEditorPanel:
|
||||
name: '&b&l{name} Skill Editor'
|
||||
slots: 9
|
||||
Settings:
|
||||
backButton: true
|
||||
emptySpaceFiller: true
|
||||
EmptySpaceFiller:
|
||||
type: WHITE_STAINED_GLASS_PANE
|
||||
name: '&7'
|
||||
Buttons:
|
||||
backButton: 5
|
||||
Items:
|
||||
'2':
|
||||
type: BOOK
|
||||
name: '&e&lCommand Skill Type'
|
||||
lore:
|
||||
- '&7If you set this to the skill type'
|
||||
- '&7then you will be able to set commands'
|
||||
- '&7to be applied to the targeted players'
|
||||
- '&7when this skill is called.'
|
||||
- '&7'
|
||||
- '&c&lWARNING'
|
||||
- '&7This will remove any previous'
|
||||
- '&7custom skill data.'
|
||||
Button: Command
|
||||
'3':
|
||||
type: EMERALD
|
||||
name: '&e&lCustom Skill Type'
|
||||
lore:
|
||||
- '&7If you want to use a custom skill for'
|
||||
- '&7this skill, select this skill type then'
|
||||
- '&7in your custom data configuration you'
|
||||
- '&7can select which custom skill it is'
|
||||
- '&7assigned to.'
|
||||
- '&7'
|
||||
- '&c&lWARNING'
|
||||
- '&7This will remove any previous'
|
||||
- '&7custom skill data.'
|
||||
Button: Custom
|
||||
'5':
|
||||
type: PAPER
|
||||
name: '&e&lGo Back'
|
||||
lore:
|
||||
- '&7Click here to go back.'
|
||||
'7':
|
||||
type: SPLASH_POTION
|
||||
name: '&e&lPotion Skill Type'
|
||||
lore:
|
||||
- '&7If you want to apply potions to'
|
||||
- '&7the targeted players when this skill is'
|
||||
- '&7called you can use this skill type.'
|
||||
- '&7'
|
||||
- '&c&lWARNING'
|
||||
- '&7This will remove any previous'
|
||||
- '&7custom skill data.'
|
||||
Button: Potion
|
||||
'8':
|
||||
type: CREEPER_HEAD
|
||||
name: '&e&lGroup Skill Type'
|
||||
lore:
|
||||
- '&7If you want to have multiple skills under'
|
||||
- '&7one skill select this skill type and you'
|
||||
- '&7can connect it to some of the already existing'
|
||||
- '&7skills so you can have more then one go off'
|
||||
- '&7from one skill calling. Only this displayName'
|
||||
- '&7and customMessage will be used, the connected'
|
||||
- '&7skill displayName and customMessage will be'
|
||||
- '&7ignored.'
|
||||
- '&7'
|
||||
- '&c&lWARNING'
|
||||
- '&7This will remove any previous'
|
||||
- '&7custom skill data.'
|
||||
Button: Group
|
||||
|
@ -1,13 +1,9 @@
|
||||
package com.songoda.epicbosses.handlers;
|
||||
|
||||
import com.songoda.epicbosses.entity.BossEntity;
|
||||
import com.songoda.epicbosses.entity.elements.EntityStatsElement;
|
||||
import com.songoda.epicbosses.managers.files.BossesFileManager;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.utils.IHandler;
|
||||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.ISubVariablePanelHandler;
|
||||
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
@ -20,6 +20,7 @@ import com.songoda.epicbosses.panel.bosses.weapons.MainHandEditorPanel;
|
||||
import com.songoda.epicbosses.panel.bosses.weapons.OffHandEditorPanel;
|
||||
import com.songoda.epicbosses.panel.handlers.*;
|
||||
import com.songoda.epicbosses.panel.skills.MainSkillEditorPanel;
|
||||
import com.songoda.epicbosses.panel.skills.SkillTypeEditorPanel;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.utils.panel.base.ISubVariablePanelHandler;
|
||||
import com.songoda.epicbosses.utils.panel.base.IVariablePanelHandler;
|
||||
@ -31,6 +32,7 @@ import com.songoda.epicbosses.utils.IReloadable;
|
||||
import com.songoda.epicbosses.utils.StringUtils;
|
||||
import com.songoda.epicbosses.utils.panel.base.IPanelHandler;
|
||||
import com.songoda.epicbosses.utils.panel.builder.PanelBuilder;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -59,7 +61,7 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
onTauntTextEditMenu;
|
||||
@Getter private BossListEditorPanel equipmentListEditMenu, weaponListEditMenu, statisticListEditMenu;
|
||||
|
||||
@Getter private IVariablePanelHandler<Skill> mainSkillEditMenu, customMessageEditMenu;
|
||||
@Getter private IVariablePanelHandler<Skill> mainSkillEditMenu, customMessageEditMenu, skillTypeEditMenu;
|
||||
|
||||
private final CustomBosses customBosses;
|
||||
|
||||
@ -156,9 +158,10 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
private void loadSkillEditMenus() {
|
||||
FileConfiguration editor = this.customBosses.getEditor();
|
||||
PanelBuilder panelBuilder = new PanelBuilder(editor.getConfigurationSection("SkillEditorPanel"));
|
||||
PanelBuilder panelBuilder1 = new PanelBuilder(editor.getConfigurationSection("SkillTypeEditorPanel"));
|
||||
|
||||
this.mainSkillEditMenu = new MainSkillEditorPanel(this, panelBuilder, this.customBosses);
|
||||
this.customMessageEditMenu = new SingleMessageListEditor<Skill>(this, getListMenu("Skill.Main"), this.customBosses) {
|
||||
this.customMessageEditMenu = new SingleMessageListEditor<Skill>(this, getListMenu("Skills.MainEdit"), this.customBosses) {
|
||||
|
||||
@Override
|
||||
public String getCurrent(Skill object) {
|
||||
@ -181,14 +184,17 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
return BossAPI.getSkillName(object);
|
||||
}
|
||||
};
|
||||
this.skillTypeEditMenu = new SkillTypeEditorPanel(this, panelBuilder1, this.customBosses);
|
||||
}
|
||||
|
||||
private void reloadSkillEditMenus() {
|
||||
FileConfiguration editor = this.customBosses.getEditor();
|
||||
PanelBuilder panelBuilder = new PanelBuilder(editor.getConfigurationSection("SkillEditorPanel"));
|
||||
PanelBuilder panelBuilder1 = new PanelBuilder(editor.getConfigurationSection("SkillTypeEditorPanel"));
|
||||
|
||||
this.mainSkillEditMenu.initializePanel(panelBuilder);
|
||||
this.customMessageEditMenu.initializePanel(getListMenu("Skill.Main"));
|
||||
this.customMessageEditMenu.initializePanel(getListMenu("Skills.MainEdit"));
|
||||
this.skillTypeEditMenu.initializePanel(panelBuilder1);
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
@ -607,11 +613,11 @@ public class BossPanelManager implements ILoadable, IReloadable {
|
||||
//---------------------------------------------
|
||||
|
||||
private void loadCustomSkillsMenu() {
|
||||
this.customSkills = new CustomSkillsPanel(this, getListMenu("Skills"), this.customBosses);
|
||||
this.customSkills = new CustomSkillsPanel(this, getListMenu("Skills.Main"), this.customBosses);
|
||||
}
|
||||
|
||||
private void reloadCustomSkills() {
|
||||
this.customSkills.initializePanel(getListMenu("Skills"));
|
||||
this.customSkills.initializePanel(getListMenu("Skills.Main"));
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
|
@ -14,6 +14,7 @@ import com.songoda.epicbosses.utils.itemstack.holder.ItemStackHolder;
|
||||
import com.songoda.epicbosses.utils.panel.Panel;
|
||||
import com.songoda.epicbosses.utils.panel.builder.PanelBuilder;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -74,13 +75,11 @@ public class CustomSkillsPanel extends MainListPanelHandler {
|
||||
replaceMap.put("{customMessage}", skill.getCustomMessage());
|
||||
replaceMap.put("{radius}", NumberUtils.get().formatDouble(skill.getRadius()));
|
||||
|
||||
ItemStackUtils.applyDisplayName(itemStack, this.plugin.getConfig().getString("Display.Skills.name"), replaceMap);
|
||||
ItemStackUtils.applyDisplayLore(itemStack, this.plugin.getConfig().getStringList("Display.Skills.lore"), replaceMap);
|
||||
ItemStackUtils.applyDisplayName(itemStack, this.plugin.getConfig().getString("Display.Skills.Main.name"), replaceMap);
|
||||
ItemStackUtils.applyDisplayLore(itemStack, this.plugin.getConfig().getStringList("Display.Skills.Main.lore"), replaceMap);
|
||||
|
||||
|
||||
panel.setItem(realisticSlot, itemStack, e -> {
|
||||
//TODO: Add Edit Skill
|
||||
});
|
||||
panel.setItem(realisticSlot, itemStack, e -> this.bossPanelManager.getMainSkillEditMenu().openFor((Player) e.getWhoClicked(), skill));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.songoda.epicbosses.panel.skills;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.utils.panel.Panel;
|
||||
import com.songoda.epicbosses.utils.panel.base.handlers.VariablePanelHandler;
|
||||
import com.songoda.epicbosses.utils.panel.builder.PanelBuilder;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
* @version 1.0.0
|
||||
* @since 02-Dec-18
|
||||
*/
|
||||
public class SkillTypeEditorPanel extends VariablePanelHandler<Skill> {
|
||||
|
||||
public SkillTypeEditorPanel(BossPanelManager bossPanelManager, PanelBuilder panelBuilder, CustomBosses plugin) {
|
||||
super(bossPanelManager, panelBuilder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillPanel(Panel panel, Skill skill) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openFor(Player player, Skill skill) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializePanel(PanelBuilder panelBuilder) {
|
||||
|
||||
}
|
||||
}
|
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
||||
|
||||
<properties>
|
||||
<!--<plugin.version>maven-version-number-SNAPSHOT-U90</plugin.version>-->
|
||||
<plugin.version>1.0.0-U100</plugin.version>
|
||||
<plugin.version>1.0.0-U101</plugin.version>
|
||||
<plugin.name>EpicBosses</plugin.name>
|
||||
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
||||
<plugin.author>AMinecraftDev</plugin.author>
|
||||
|
Loading…
Reference in New Issue
Block a user