mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-01-23 07:11:28 +01:00
1.0.0-SNAPSHOT-U121
+ Started the implementation of the CustomSkillEditorPanel
This commit is contained in:
parent
0d31b2b008
commit
52769478f9
@ -1693,4 +1693,63 @@ ModifyCommandEditorPanel:
|
||||
- '&7'
|
||||
- '&bRight Click &8» &f-1.0%'
|
||||
- '&bShift Right-Click &8» &f-0.1%'
|
||||
Button: Chance
|
||||
Button: Chance
|
||||
CustomSkillEditorPanel:
|
||||
name: '&b&l{name} Skill Editor'
|
||||
slots: 9
|
||||
Settings:
|
||||
backButton: true
|
||||
emptySpaceFiller: true
|
||||
EmptySpaceFiller:
|
||||
type: WHITE_STAINED_GLASS_PANE
|
||||
name: '&7'
|
||||
Buttons:
|
||||
backButton: 9
|
||||
Items:
|
||||
'4':
|
||||
type: BOOK
|
||||
name: '&e&lCustom Skill Type'
|
||||
lore:
|
||||
- '&bCurrently: &f{type}'
|
||||
- '&7'
|
||||
- '&7Click here to choose from one'
|
||||
- '&7of the connected and set up'
|
||||
- '&7custom skill types. This will'
|
||||
- '&7also display any of the external'
|
||||
- '&7custom skill types that are properly'
|
||||
- '&7connected to the plugin.'
|
||||
Button: Type
|
||||
'5':
|
||||
type: DIAMOND
|
||||
name: '&e&lSpecial Settings'
|
||||
lore:
|
||||
- '&7Click here to edit any special settings that'
|
||||
- '&7are also included in this custom skill. If'
|
||||
- '&7there is none then this button will not open'
|
||||
- '&7another GUI.'
|
||||
Button: SpecialSettings
|
||||
'6':
|
||||
type: REDSTONE
|
||||
name: '&e&lMultiplier'
|
||||
lore:
|
||||
- '&bCurrently: &f{multiplier}'
|
||||
- '&7'
|
||||
- '&7Click here to adjust the multiplier'
|
||||
- '&7for the custom skill. Some skills will'
|
||||
- '&7use this option, but some won''t. This'
|
||||
- '&7custom skill &f{usesMultiplier}&7 use'
|
||||
- '&7multiplier option.'
|
||||
- '&7'
|
||||
- '&bLeft Click &8» &f+1.0'
|
||||
- '&bShift Left-Click &8» &f+0.1'
|
||||
- '&7'
|
||||
- '&bMiddle Click &8» &7Removes multiplier'
|
||||
- '&7'
|
||||
- '&bRight Click &8» &f-1.0'
|
||||
- '&bShift Right-Click &8» &f-0.1'
|
||||
Button: Multiplier
|
||||
'9':
|
||||
type: PAPER
|
||||
name: '&e&lGo Back'
|
||||
lore:
|
||||
- '&7Click here to go back.'
|
@ -0,0 +1,46 @@
|
||||
package com.songoda.epicbosses.panel.skills.custom;
|
||||
|
||||
import com.songoda.epicbosses.CustomBosses;
|
||||
import com.songoda.epicbosses.managers.BossPanelManager;
|
||||
import com.songoda.epicbosses.managers.BossSkillManager;
|
||||
import com.songoda.epicbosses.managers.files.SkillsFileManager;
|
||||
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 12-Dec-18
|
||||
*/
|
||||
public class CustomSkillEditorPanel extends VariablePanelHandler<Skill> {
|
||||
|
||||
private SkillsFileManager skillsFileManager;
|
||||
private BossSkillManager bossSkillManager;
|
||||
private CustomBosses plugin;
|
||||
|
||||
public CustomSkillEditorPanel(BossPanelManager bossPanelManager, PanelBuilder panelBuilder, CustomBosses plugin) {
|
||||
super(bossPanelManager, panelBuilder);
|
||||
|
||||
this.plugin = plugin;
|
||||
this.bossSkillManager = plugin.getBossSkillManager();
|
||||
this.skillsFileManager = plugin.getSkillsFileManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillPanel(Panel panel, Skill skill) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openFor(Player player, Skill skill) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializePanel(PanelBuilder panelBuilder) {
|
||||
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -13,6 +14,10 @@ import java.util.List;
|
||||
*/
|
||||
public interface ISkillHandler<T> {
|
||||
|
||||
boolean doesUseMultiplier();
|
||||
|
||||
Map<String, Class<?>> getOtherSkillData();
|
||||
|
||||
void castSkill(Skill skill, T t, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities);
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,22 @@ public class Cage extends CustomSkillHandler {
|
||||
@Getter private static final Map<Location, CageLocationData> cageLocationDataMap = new HashMap<>();
|
||||
@Getter private static final List<UUID> playersInCage = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
Map<String, Class<?>> map = new HashMap<>();
|
||||
|
||||
map.put("flatType", String.class);
|
||||
map.put("wallType", String.class);
|
||||
map.put("insideType", String.class);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
nearbyEntities.forEach(livingEntity -> {
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -22,6 +23,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Disarm extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
nearbyEntities.forEach(livingEntity -> {
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -16,6 +17,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Fireball extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
LivingEntity boss = activeBossHolder.getLivingEntity();
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -17,6 +18,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Grapple extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
Location bossLocation = activeBossHolder.getLocation();
|
||||
|
@ -7,6 +7,7 @@ import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -15,6 +16,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Insidious extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
Double multiplier = customSkillElement.getCustom().getMultiplier();
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -17,6 +18,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Knockback extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
Double multiplier = customSkillElement.getCustom().getMultiplier();
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -16,6 +17,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Launch extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
Location bossLocation = activeBossHolder.getLocation();
|
||||
|
@ -7,6 +7,7 @@ import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -15,6 +16,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Lightning extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
nearbyEntities.forEach(livingEntity -> livingEntity.getWorld().strikeLightningEffect(livingEntity.getEyeLocation()));
|
||||
|
@ -7,7 +7,9 @@ import com.songoda.epicbosses.skills.Skill;
|
||||
import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -16,6 +18,21 @@ import java.util.List;
|
||||
*/
|
||||
public class Minions extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
Map<String, Class<?>> map = new HashMap<>();
|
||||
|
||||
map.put("amount", Integer.class);
|
||||
map.put("minionToSpawn", String.class);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
BossAPI.spawnNewMinion(activeBossHolder, skill);
|
||||
|
@ -7,6 +7,7 @@ import com.songoda.epicbosses.skills.types.CustomSkillElement;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -15,6 +16,16 @@ import java.util.List;
|
||||
*/
|
||||
public class Warp extends CustomSkillHandler {
|
||||
|
||||
@Override
|
||||
public boolean doesUseMultiplier() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Class<?>> getOtherSkillData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSkill(Skill skill, CustomSkillElement customSkillElement, ActiveBossHolder activeBossHolder, List<LivingEntity> nearbyEntities) {
|
||||
LivingEntity target = nearbyEntities.get(0);
|
||||
|
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-U120</plugin.version>
|
||||
<plugin.version>1.0.0-U121</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