diff --git a/TODO b/TODO index c2171aa..66208ed 100644 --- a/TODO +++ b/TODO @@ -15,4 +15,5 @@ TODO: Setup API TODO: Setup GUI aspect to allow for in-game boss setup TODO: Write a documentation up about how to use the plugin TODO: Make the 2.x.x - 3.x.x converter (an executable jar, NOT a plugin) - +TODO: Write particle system so u can make bosses change particles when they get hit, or use skills, etc. +TODO: Make a (sorted) drop table viewer \ No newline at end of file diff --git a/plugin-modules/Core/resources/editor.yml b/plugin-modules/Core/resources/editor.yml new file mode 100644 index 0000000..29cbe9e --- /dev/null +++ b/plugin-modules/Core/resources/editor.yml @@ -0,0 +1,153 @@ +MainPanel: + name: '&b&l{name} Editor' + slots: 45 + EmptySpaceFiller: + enabled: true + Item: + type: '160:0' + name: '&7' + Items: + '12': + type: DIAMOND + name: '&c&lDrops Manager' + lore: + - '&7Click here to manage the drop table' + - '&7that is attached to this boss.' + Button: Drops + '14': + type: DIAMOND_HELMET + name: '&c&lEquipment Manager' + lore: + - '&7Click here to manage the equipment' + - '&7that the boss has equipped.' + Button: Equipment + '16': + type: BONE + name: '&a&lTargeting Manager' + lore: + - '&7Click here to edit how the boss handles' + - '&7targeting of players and mobs.' + Button: Targeting + '22': + type: BOW + name: '&c&lWeapon Manager' + lore: + - '&7Click here to manage the weapon(s)' + - '&7that the boss has equipped.' + Button: Weapon + '23': + type: BARRIER + name: '&c&l!&4&l!&c&l! &4&lWARNING &c&l!&4&l!&c&l!' + lore: + - '&7While editing is enabled for this boss' + - '&7no one will be able to spawn it, nor' + - '&7will it spawn naturally.' + '24': + type: BLAZE_POWDER + name: '&c&lSkill Manager' + lore: + - '&7Click here to manage the assigned' + - '&7skill(s) the boss has and their occurrence' + - '&7chances.' + Button: Skill + '32': + type: '351:4' + name: '&a&lStatistics Manager' + lore: + - '&7Click here to edit the statistics of the' + - '&7boss, including things like: health,' + - '&7potion effects, commands on spawn, etc.' + Button: Stats + '39': + type: REDSTONE + name: '&a&lParticle Manager' + lore: + - '&7Click here to manage the particles the' + - '&7boss has equipped during certain events.' + Button: Particle + '41': + type: GRASS + name: '&a&lSpawning Manager' + lore: + - '&7Click here to edit how the boss handles' + - '&7spawning.' + Button: Spawning + '43': + type: BOOK + name: '&a&lText Manager' + lore: + - '&7Click here to edit the taunts, sayings,' + - '&7etc. for this boss.' + Button: Text +DropsPanel: + name: '&b&l{name} Editor' + slots: 54 + Settings: + fillTo: 45 + Items: + '46': + type: DIAMOND + name: '&b&lSelected Drop Table' + lore: + - '&7The current selected drop' + - '&7table is: &b{dropTable}&7.' + - '&7' + - '&b&lHints' + - '&b&l* &7If this shows N/A it means' + - '&7 there was an issue loading the' + - '&7 previous table, or it doesn''t' + - '&7 have one selected.' + - '&b&l* &7Click here to go straight to the' + - '&7 editing screen of the drop table.' + '47': + type: STAINED_GLASS_PANE + name: '&7' + '48': + type: STAINED_GLASS_PANE + name: '&7' + '49': + type: PAPER + name: '&e&l&m<-&e&l Previous Page' + lore: + - '&7Click here to go to the previous' + - '&7page of drop tables.' + - '&7' + - '&7Currently viewing page &e{currentPage}/{maxPages}&7.' + PreviousPage: true + '50': + type: DIAMOND_BLOCK + name: '&a&lCreate a new Drop Table' + lore: + - '&7Click here to create a new drop' + - '&7table. It will automatically be' + - '&7assigned to this boss when created.' + Button: CreateDropTable + '51': + type: PAPER + name: '&e&lNext Page &e&l&m->' + lore: + - '&7Click here to go to the next' + - '&7page of drop tables.' + - '&7' + - '&7Currently viewing page &e{currentPage}/{maxPages}&7.' + NextPage: true + '52': + type: STAINED_GLASS_PANE + name: '&7' + '53': + type: STAINED_GLASS_PANE + name: '&7' + '54': + type: BOOK + name: '&c&lDrops Guide' + lore: + - '&7When selecting the drop table for this custom boss' + - '&7you can either choose from one of the above listed' + - '&7pre-configured drop tables or you can make a' + - '&7new one for this boss.' + - '&7' + - '&c&lHints' + - '&c&l* &7The currently selected drop table will be shown' + - '&7 with an emerald which states so.' + - '&c&l* &7Every d rop table from every boss will be listed' + - '&7 here as an available drop table.' diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/CustomBossBuilder.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/CustomBossBuilder.java new file mode 100644 index 0000000..638215b --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/CustomBossBuilder.java @@ -0,0 +1,33 @@ +package net.aminecraftdev.custombosses.builders; + +import net.aminecraftdev.custombosses.builders.base.CustomEntityBuilder; +import net.aminecraftdev.custombosses.builders.entity.ISpawnItemBuilderComponent; +import net.aminecraftdev.custombosses.entities.CustomBoss; +import org.bukkit.inventory.ItemStack; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public class CustomBossBuilder extends CustomEntityBuilder implements ISpawnItemBuilderComponent { + + private ItemStack spawnItem = null; + + public CustomBossBuilder(String identifier) { + super(identifier); + } + + @Override + public void setSpawnItem(ItemStack itemStack) { + this.spawnItem = itemStack; + } + + @Override + public CustomBoss build() { + if(this.health <= 0) return null; + + return new CustomBoss(this.identifier, this.potionEffects, this.equipment, this.customSkills, this.canDropHand, this.canDropEquipment, this.description, this.mainHand, this.offHand, this.entityType, this.displayName, this.health, this.spawnItem); + } + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/base/CustomEntityBuilder.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/base/CustomEntityBuilder.java new file mode 100644 index 0000000..ce0c1da --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/base/CustomEntityBuilder.java @@ -0,0 +1,110 @@ +package net.aminecraftdev.custombosses.builders.base; + +import net.aminecraftdev.custombosses.builders.entity.*; +import net.aminecraftdev.custombosses.utils.IBuilder; +import net.aminecraftdev.custombosses.utils.identifier.IIdentifier; +import net.aminecraftdev.custombosses.utils.identifier.Identifier; +import org.bukkit.entity.EntityType; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public abstract class CustomEntityBuilder implements IIdentifier, IBuilder, IStatsBuilderComponent, IEquipmentBuilderComponent, IHandBuilderComponent, IPotionBuilderComponent, ISkillBuilderComponent { + + protected final List potionEffects = new ArrayList<>(); + protected final Map equipment = new HashMap<>(); + protected final List customSkills = new ArrayList<>(); + protected final Identifier identifier; + + protected boolean canDropHand = true, canDropEquipment = true; + protected List description = new ArrayList<>(); + protected ItemStack mainHand = null, offHand = null; + protected EntityType entityType = null; + protected String displayName = null; + protected double health = 0; + + public CustomEntityBuilder(String identifier) { + this.identifier = new Identifier<>(identifier); + } + + @Override + public Identifier getIdentifier() { + return this.identifier; + } + + @Override + public void setArmor(int slot, ItemStack itemStack) { + if(slot > 4 || slot < 1) return; + + this.equipment.put(slot, itemStack); + } + + @Override + public void setCanDropEquipment(boolean bool) { + this.canDropEquipment = bool; + } + + @Override + public void setMainHand(ItemStack itemStack) { + this.mainHand = itemStack; + } + + @Override + public void setOffHand(ItemStack itemStack) { + this.offHand = itemStack; + } + + @Override + public void setCanDropHands(boolean bool) { + this.canDropHand = bool; + } + + @Override + public void addPotionEffect(PotionEffect potionEffect) { + this.potionEffects.add(potionEffect); + } + + @Override + public void removePotionEffect(PotionEffect potionEffect) { + this.potionEffects.remove(potionEffect); + } + + @Override + public void addSkill(Object object) { + this.customSkills.add(object); + } + + @Override + public void removeSkill(Object object) { + this.customSkills.remove(object); + } + + @Override + public void setEntityType(EntityType entityType) { + this.entityType = entityType; + } + + @Override + public void setMaxHealth(double health) { + this.health = health; + } + + @Override + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + @Override + public void setDescription(List description) { + this.description = description; + } +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IEquipmentBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IEquipmentBuilderComponent.java new file mode 100644 index 0000000..3f0fe44 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IEquipmentBuilderComponent.java @@ -0,0 +1,15 @@ +package net.aminecraftdev.custombosses.builders.entity; + +import org.bukkit.inventory.ItemStack; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public interface IEquipmentBuilderComponent { + + void setArmor(int slot, ItemStack itemStack); + + void setCanDropEquipment(boolean bool); +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IHandBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IHandBuilderComponent.java new file mode 100644 index 0000000..fccfe84 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IHandBuilderComponent.java @@ -0,0 +1,18 @@ +package net.aminecraftdev.custombosses.builders.entity; + +import org.bukkit.inventory.ItemStack; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public interface IHandBuilderComponent { + + void setMainHand(ItemStack itemStack); + + void setOffHand(ItemStack itemStack); + + void setCanDropHands(boolean bool); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IPotionBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IPotionBuilderComponent.java new file mode 100644 index 0000000..9666127 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IPotionBuilderComponent.java @@ -0,0 +1,16 @@ +package net.aminecraftdev.custombosses.builders.entity; + +import org.bukkit.potion.PotionEffect; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public interface IPotionBuilderComponent { + + void addPotionEffect(PotionEffect potionEffect); + + void removePotionEffect(PotionEffect potionEffect); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISkillBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISkillBuilderComponent.java new file mode 100644 index 0000000..97a59ee --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISkillBuilderComponent.java @@ -0,0 +1,14 @@ +package net.aminecraftdev.custombosses.builders.entity; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public interface ISkillBuilderComponent { + + void addSkill(Object object); + + void removeSkill(Object object); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISpawnItemBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISpawnItemBuilderComponent.java new file mode 100644 index 0000000..d79bc04 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/ISpawnItemBuilderComponent.java @@ -0,0 +1,14 @@ +package net.aminecraftdev.custombosses.builders.entity; + +import org.bukkit.inventory.ItemStack; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public interface ISpawnItemBuilderComponent { + + void setSpawnItem(ItemStack itemStack); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IStatsBuilderComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IStatsBuilderComponent.java new file mode 100644 index 0000000..b943f60 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/builders/entity/IStatsBuilderComponent.java @@ -0,0 +1,22 @@ +package net.aminecraftdev.custombosses.builders.entity; + +import org.bukkit.entity.EntityType; + +import java.util.List; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 25-Mar-18 + */ +public interface IStatsBuilderComponent { + + void setEntityType(EntityType entityType); + + void setMaxHealth(double health); + + void setDisplayName(String displayName); + + void setDescription(List description); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/BossEntity.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/BossEntity.java deleted file mode 100644 index 9fba60b..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/BossEntity.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.aminecraftdev.custombosses.entities; - -import net.aminecraftdev.custombosses.entities.base.CustomEntity; -import net.aminecraftdev.custombosses.handlers.EntityHandler; -import net.aminecraftdev.custombosses.models.CustomEntityModel; -import org.bukkit.Location; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author AMinecraftDev - * @version 1.0.0 - * @since 06-Sep-17 - */ -public class BossEntity extends CustomEntity { - - private List possibleSpawns = new ArrayList<>(); - private List minions = new ArrayList<>(); - private boolean randomWorldSpawns = false; - - public BossEntity(String identifier, CustomEntityModel customEntityModel) { - super(identifier, customEntityModel); - } - - -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomBoss.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomBoss.java new file mode 100644 index 0000000..63a1ccd --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomBoss.java @@ -0,0 +1,38 @@ +package net.aminecraftdev.custombosses.entities; + +import net.aminecraftdev.custombosses.entities.base.CustomEntity; +import net.aminecraftdev.custombosses.utils.identifier.Identifier; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; + +import java.util.List; +import java.util.Map; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public class CustomBoss extends CustomEntity { + + private ItemStack spawnItemStack; + private boolean isEditing; + + public CustomBoss(Identifier identifier, List potionEffects, Map equipment, List customSkills, boolean canDropHand, boolean canDropEquipment, List description, ItemStack mainHand, ItemStack offHand, EntityType entityType, String displayName, double health, ItemStack spawnItem) { + super(identifier, potionEffects, equipment, customSkills, canDropHand, canDropEquipment, description, mainHand, offHand, entityType, displayName, health); + + this.isEditing = true; + } + + @Override + public void toggleEditing(boolean bool) { + this.isEditing = bool; + } + + @Override + public void openEditor(Player player) { + + } +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomMinion.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomMinion.java new file mode 100644 index 0000000..c492967 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/CustomMinion.java @@ -0,0 +1,9 @@ +package net.aminecraftdev.custombosses.entities; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public class CustomMinion { +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/base/CustomEntity.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/base/CustomEntity.java index ea9ba3b..433fed3 100644 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/base/CustomEntity.java +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/base/CustomEntity.java @@ -1,109 +1,51 @@ package net.aminecraftdev.custombosses.entities.base; -import net.aminecraftdev.custombosses.handlers.EntityHandler; -import net.aminecraftdev.custombosses.utils.IIdentifier; -import net.aminecraftdev.custombosses.models.CustomEntityModel; -import net.aminecraftdev.custombosses.skills.CustomSkill; -import org.bukkit.Location; -import org.bukkit.entity.LivingEntity; -import org.bukkit.inventory.EntityEquipment; +import net.aminecraftdev.custombosses.utils.IEditor; +import net.aminecraftdev.custombosses.utils.identifier.IIdentifier; +import net.aminecraftdev.custombosses.utils.identifier.Identifier; +import org.bukkit.entity.EntityType; import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; -import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author Charles Cullen * @version 1.0.0 - * @since 08-Mar-18 + * @since 25-Mar-18 */ -public class CustomEntity implements IIdentifier { +public abstract class CustomEntity implements IIdentifier, IEditor { - private List customSkills = new ArrayList<>(); - private CustomEntityModel customEntityModel; - private String identifier; + private final boolean canDropHand, canDropEquipment; + private final Map equipment; + private final List potionEffects; + private final List customSkills; + private final List description; + private final Identifier identifier; + private final ItemStack mainHand, offHand; + private final EntityType entityType; + private final String displayName; + private final double health; - public CustomEntity(String identifier, CustomEntityModel customEntityModel) { + public CustomEntity(Identifier identifier, List potionEffects, Map equipment, List customSkills, boolean canDropHand, boolean canDropEquipment, List description, ItemStack mainHand, ItemStack offHand, EntityType entityType, String displayName, double health) { this.identifier = identifier; - this.customEntityModel = customEntityModel; + + this.entityType = entityType; + this.health = health; + this.displayName = displayName; + this.mainHand = mainHand; + this.offHand = offHand; + this.description = description; + this.customSkills = customSkills; + this.potionEffects = potionEffects; + this.equipment = equipment; + this.canDropHand = canDropHand; + this.canDropEquipment = canDropEquipment; } @Override - public String getIdentifier() { + public Identifier getIdentifier() { return this.identifier; } - - public List getCustomSkills() { - return this.customSkills; - } - - public EntityHandler spawn(Location location) { - LivingEntity livingEntity = (LivingEntity) location.getWorld().spawn(location, this.customEntityModel.getEntityType().getEntityClass()); - EntityEquipment entityEquipment = livingEntity.getEquipment(); - - /* SETTING HEALTH */ - livingEntity.setMaxHealth(this.customEntityModel.getMaxHealth()); - livingEntity.setHealth(this.customEntityModel.getMaxHealth()); - - /* SETTING DISPLAY NAME */ - if(this.customEntityModel.getDisplayName() != null) { - livingEntity.setCustomName(this.customEntityModel.getDisplayName()); - livingEntity.setCustomNameVisible(true); - } - - /* SETTING MAIN HAND */ - if(this.customEntityModel.getMainHand() != null) { - entityEquipment.setItemInMainHand(this.customEntityModel.getMainHand()); - - if(cannotDrop()) entityEquipment.setItemInMainHandDropChance(0); - } - - /* SETTING OFF HAND */ - if(this.customEntityModel.getOffHand() != null) { - entityEquipment.setItemInOffHand(this.customEntityModel.getOffHand()); - - if(cannotDrop()) entityEquipment.setItemInOffHandDropChance(0); - } - - /* SETTING ARMOUR */ - if(!this.customEntityModel.getArmor().isEmpty()) { - Map equipment = this.customEntityModel.getArmor(); - - if(equipment.getOrDefault(0, null) != null) { - entityEquipment.setHelmet(equipment.get(0)); - - if(cannotDrop()) entityEquipment.setHelmetDropChance(0); - } - - if(equipment.getOrDefault(1, null) != null) { - entityEquipment.setChestplate(equipment.get(1)); - - if(cannotDrop()) entityEquipment.setChestplateDropChance(0); - } - - if(equipment.getOrDefault(2, null) != null) { - entityEquipment.setLeggings(equipment.get(2)); - - if(cannotDrop()) entityEquipment.setLeggingsDropChance(0); - } - - if(equipment.getOrDefault(3, null) != null) { - entityEquipment.setBoots(equipment.get(3)); - - if(cannotDrop()) entityEquipment.setBootsDropChance(0); - } - } - - /* SETTINGS POTIONS */ - if(!this.customEntityModel.getPotionEffects().isEmpty()) { - livingEntity.addPotionEffects(this.customEntityModel.getPotionEffects()); - } - - return new EntityHandler(livingEntity, this); - } - - private boolean cannotDrop() { - return !this.customEntityModel.canDropEquipment(); - } } diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/PotionEffectComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/PotionEffectComponent.java deleted file mode 100644 index aef87e1..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/PotionEffectComponent.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components; - -import com.google.gson.annotations.Expose; -import org.bukkit.potion.PotionEffectType; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class PotionEffectComponent { - - @Expose private PotionEffectType potionEffectType; - @Expose private int duration, level; - - public PotionEffectComponent(PotionEffectType potionEffectType, int duration, int level) { - this.potionEffectType = potionEffectType; - this.duration = duration; - this.level = level; - } - - public PotionEffectType getPotionEffectType() { - return potionEffectType; - } - - public void setPotionEffectType(PotionEffectType potionEffectType) { - this.potionEffectType = potionEffectType; - } - - public int getDuration() { - return duration; - } - - public void setDuration(int duration) { - this.duration = duration; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/ArmorComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/ArmorComponent.java deleted file mode 100644 index 93c8e9f..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/ArmorComponent.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.entity; - -import com.google.gson.annotations.Expose; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class ArmorComponent { - - @Expose private String helmet, chestplate, leggings, boots; - - public ArmorComponent(String helmet, String chestplate, String leggings, String boots, String mainHand, String offHand) { - this.helmet = helmet; - this.chestplate = chestplate; - this.leggings = leggings; - this.boots = boots; - } - - public String getHelmet() { - return helmet; - } - - public void setHelmet(String helmet) { - this.helmet = helmet; - } - - public String getChestplate() { - return chestplate; - } - - public void setChestplate(String chestplate) { - this.chestplate = chestplate; - } - - public String getLeggings() { - return leggings; - } - - public void setLeggings(String leggings) { - this.leggings = leggings; - } - - public String getBoots() { - return boots; - } - - public void setBoots(String boots) { - this.boots = boots; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/HandComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/HandComponent.java deleted file mode 100644 index 75d5aaf..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/entity/HandComponent.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.entity; - -import com.google.gson.annotations.Expose; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class HandComponent { - - @Expose private String mainHand, offHand; - - public HandComponent(String mainHand, String offHand) { - this.mainHand = mainHand; - this.offHand = offHand; - } - - public String getMainHand() { - return mainHand; - } - - public void setMainHand(String mainHand) { - this.mainHand = mainHand; - } - - public String getOffHand() { - return offHand; - } - - public void setOffHand(String offHand) { - this.offHand = offHand; - } - -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillComponent.java deleted file mode 100644 index 114428a..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillComponent.java +++ /dev/null @@ -1,87 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.skills; - -import com.google.gson.annotations.Expose; -import net.aminecraftdev.custombosses.utils.base.BaseSkillData; -import net.aminecraftdev.custombosses.skills.enums.SkillTarget; -import net.aminecraftdev.custombosses.skills.enums.SkillType; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class SkillComponent { - - @Expose private String name; - @Expose private int radius; - @Expose private SkillTarget skillTarget; - @Expose private SkillType skillType; - @Expose private String showName, customMessage; - @Expose private BaseSkillData skillData; - @Expose private SkillGroupComponent skillGroupComponent; - - public SkillComponent(String name, int radius, SkillTarget skillTarget, SkillType skillType, String showName, String customMessage, BaseSkillData skillData, SkillGroupComponent skillGroupComponent) { - this.name = name; - - setRadius(radius); - setSkillTarget(skillTarget); - setSkillType(skillType, skillData); - setShowName(showName); - setCustomMessage(customMessage); - - this.skillGroupComponent = skillGroupComponent; - } - - public String getName() { - return name; - } - - public SkillTarget getSkillTarget() { - return skillTarget; - } - - public void setSkillTarget(SkillTarget skillTarget) { - this.skillTarget = skillTarget; - } - - public SkillType getSkillType() { - return skillType; - } - - public void setSkillType(SkillType skillType, BaseSkillData baseSkillData) { - this.skillType = skillType; - this.skillData = baseSkillData; - } - - public int getRadius() { - return radius; - } - - public void setRadius(int radius) { - this.radius = radius; - } - - public String getShowName() { - return showName; - } - - public void setShowName(String showName) { - this.showName = showName; - } - - public String getCustomMessage() { - return customMessage; - } - - public void setCustomMessage(String customMessage) { - this.customMessage = customMessage; - } - - public BaseSkillData getSkillData() { - return skillData; - } - - public SkillGroupComponent getSkillGroupComponent() { - return skillGroupComponent; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillGroupComponent.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillGroupComponent.java deleted file mode 100644 index c6f8d05..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/SkillGroupComponent.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.skills; - -import com.google.gson.annotations.Expose; - -import java.util.List; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class SkillGroupComponent { - - @Expose private boolean isGroup; - @Expose private List connectedSkills; - - public SkillGroupComponent(boolean isGroup, List connectedSkills) { - this.isGroup = isGroup; - this.connectedSkills = connectedSkills; - } - - public boolean isGroup() { - return this.isGroup; - } - - public void setGroup(boolean group) { - isGroup = group; - } - - public List getConnectedSkills() { - return connectedSkills; - } - - public void setConnectedSkills(List connectedSkills) { - this.connectedSkills = connectedSkills; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CommandSkillData.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CommandSkillData.java deleted file mode 100644 index 3846fa1..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CommandSkillData.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.skills.data; - -import com.google.gson.annotations.Expose; -import net.aminecraftdev.custombosses.utils.base.BaseSkillData; - -import java.util.List; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class CommandSkillData extends BaseSkillData { - - @Expose private List commands; - - public CommandSkillData(List commands) { - this.commands = commands; - } - - public List getCommands() { - return commands; - } - -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CustomSkillData.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CustomSkillData.java deleted file mode 100644 index af83788..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/CustomSkillData.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.skills.data; - -import com.google.gson.annotations.Expose; -import net.aminecraftdev.custombosses.utils.base.BaseSkillData; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class CustomSkillData extends BaseSkillData { - - @Expose private Object customData; - - public CustomSkillData(Object object) { - this.customData = object; - } - - public Object getCustomData() { - return customData; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/PotionSkillData.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/PotionSkillData.java deleted file mode 100644 index 21a2417..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/entities/components/skills/data/PotionSkillData.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.aminecraftdev.custombosses.entities.components.skills.data; - -import com.google.gson.annotations.Expose; -import net.aminecraftdev.custombosses.entities.components.PotionEffectComponent; -import net.aminecraftdev.custombosses.utils.base.BaseSkillData; - -import java.util.List; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 11-Mar-18 - */ -public class PotionSkillData extends BaseSkillData { - - @Expose private List potionEffects; - - public PotionSkillData(List potionEffectComponents) { - this.potionEffects = potionEffectComponents; - } - - public List getPotionEffects() { - return potionEffects; - } - -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/handlers/EntityHandler.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/handlers/EntityHandler.java deleted file mode 100644 index a0f8bf4..0000000 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/handlers/EntityHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.aminecraftdev.custombosses.handlers; - -import net.aminecraftdev.custombosses.entities.base.CustomEntity; -import org.bukkit.entity.LivingEntity; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 08-Mar-18 - */ -public class EntityHandler { - - private CustomEntity customEntity; - private LivingEntity livingEntity; - - public EntityHandler(LivingEntity livingEntity, CustomEntity customEntity) { - this.customEntity = customEntity; - this.livingEntity = livingEntity; - } - - public CustomEntity getCustomEntity() { - return this.customEntity; - } - - public LivingEntity getLivingEntity() { - return this.livingEntity; - } -} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/models/CustomEntityModel.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/models/CustomEntityModel.java index 7f82b9b..b3bd03d 100644 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/models/CustomEntityModel.java +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/models/CustomEntityModel.java @@ -1,6 +1,6 @@ package net.aminecraftdev.custombosses.models; -import net.aminecraftdev.custombosses.utils.IIdentifier; +import net.aminecraftdev.custombosses.utils.identifier.IIdentifier; import net.aminecraftdev.custombosses.handlers.ValidationHandler; import net.aminecraftdev.custombosses.utils.models.IEquipmentHandler; import net.aminecraftdev.custombosses.utils.models.IPotionHandler; diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/skills/CustomSkill.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/skills/CustomSkill.java index 328cdcc..b5a71ce 100644 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/skills/CustomSkill.java +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/skills/CustomSkill.java @@ -1,7 +1,7 @@ package net.aminecraftdev.custombosses.skills; import net.aminecraftdev.custombosses.entities.components.skills.SkillComponent; -import net.aminecraftdev.custombosses.utils.IIdentifier; +import net.aminecraftdev.custombosses.utils.identifier.IIdentifier; import net.aminecraftdev.custombosses.skills.enums.SkillTarget; import net.aminecraftdev.custombosses.skills.enums.SkillType; import org.bukkit.entity.Player; diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IIdentifier.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IBuilder.java similarity index 56% rename from plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IIdentifier.java rename to plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IBuilder.java index 8c8d3d9..934a31d 100644 --- a/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IIdentifier.java +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IBuilder.java @@ -3,10 +3,10 @@ package net.aminecraftdev.custombosses.utils; /** * @author Charles Cullen * @version 1.0.0 - * @since 08-Mar-18 + * @since 25-Mar-18 */ -public interface IIdentifier { +public interface IBuilder { - String getIdentifier(); + T build(); } diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IEditor.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IEditor.java new file mode 100644 index 0000000..1b67565 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/IEditor.java @@ -0,0 +1,16 @@ +package net.aminecraftdev.custombosses.utils; + +import org.bukkit.entity.Player; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public interface IEditor { + + void toggleEditing(boolean bool); + + void openEditor(Player player); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/IIdentifier.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/IIdentifier.java new file mode 100644 index 0000000..65cd301 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/IIdentifier.java @@ -0,0 +1,12 @@ +package net.aminecraftdev.custombosses.utils.identifier; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 08-Mar-18 + */ +public interface IIdentifier { + + Identifier getIdentifier(); + +} diff --git a/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/Identifier.java b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/Identifier.java new file mode 100644 index 0000000..0c747b1 --- /dev/null +++ b/plugin-modules/Core/src/net/aminecraftdev/custombosses/utils/identifier/Identifier.java @@ -0,0 +1,19 @@ +package net.aminecraftdev.custombosses.utils.identifier; + +/** + * @author Charles Cullen + * @version 1.0.0 + * @since 30-Mar-18 + */ +public class Identifier { + + private T identifier; + + public Identifier(T newIdentity) { + this.identifier = newIdentity; + } + + public T getIdentifier() { + return this.identifier; + } +} diff --git a/pom.xml b/pom.xml index 62dba0c..0ae8310 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 3.0.0b + 3.0.0c