From 2a4f5f88df1062e3e080a4165cf00d4c69d4865c Mon Sep 17 00:00:00 2001 From: Annie Date: Sat, 21 Mar 2020 20:07:48 +0000 Subject: [PATCH 1/3] Fix issues with Divergent.yml --- .../enchants/legendary/Divergent.yml | 46 +------------------ 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/src/main/resources/enchants/legendary/Divergent.yml b/src/main/resources/enchants/legendary/Divergent.yml index 9ed5b7c..bacebd7 100644 --- a/src/main/resources/enchants/legendary/Divergent.yml +++ b/src/main/resources/enchants/legendary/Divergent.yml @@ -1,4 +1,4 @@ -#Who made this? +#Who made this? Author: Auora @@ -6,14 +6,10 @@ Author: Auora identifier: Divergent -  - # The max level for this enchant. max-level: 4 -  - # The group of this enchant. Configure the groups in the groups.yml file. group: LEGENDARY @@ -22,64 +18,34 @@ group: LEGENDARY book-item: -  - -  material: BOOKa - -  +  material: BOOK   display-name: "&c&lDivergent {level}" -  -   # The lore on the enchantments books. -   -   lore: -  -     - "&7Drag on to enchant" - -  -     - "&a{success_rate}% Success Rate" - -  -     - "&c{destroy_rate}% Destroy Rate" -  - -  - -  - # How the enchant should be formatted on the enchanted item. -  - applied-format: "&cDivergent {level}" -  - # Description description:   - "A chance of giving your opponent slowness and you speed!" -  - # What items this enchant can be applied to. item-whitelist:   - "ARMOR" -  - # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: @@ -98,12 +64,8 @@ effects:     potion-type: SLOWNESS -  -     amplifier: "{level}" -  -     duration: "{level} * 3"     # Chance of the effect firing. @@ -124,12 +86,8 @@ effects:     potion-type: SPEED -  -     amplifier: "{level}" -  -     duration: "{level} * 3"     # Chance of the effect firing. From 58bea2acd07946e763a5d0a9550788cebb5d3b80 Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 2 May 2020 05:01:20 -0400 Subject: [PATCH 2/3] head --- .../songoda/epicenchants/effect/effects/DropHead.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/epicenchants/effect/effects/DropHead.java b/src/main/java/com/songoda/epicenchants/effect/effects/DropHead.java index 9f6808e..cc11b1b 100644 --- a/src/main/java/com/songoda/epicenchants/effect/effects/DropHead.java +++ b/src/main/java/com/songoda/epicenchants/effect/effects/DropHead.java @@ -3,7 +3,6 @@ package com.songoda.epicenchants.effect.effects; import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.enums.EventType; -import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -26,7 +25,7 @@ public class DropHead extends EffectExecutor { private Optional getHead(Entity entity) { ItemStack out = CompatibleMaterial.PLAYER_HEAD.getItem(); - String skin = ""; + String skin = null; switch (entity.getType()) { case CHICKEN: @@ -75,6 +74,9 @@ public class DropHead extends EffectExecutor { break; case IRON_GOLEM: skin = "MHF_Golem"; + break; + case WITHER_SKELETON: + out = CompatibleMaterial.WITHER_SKELETON_SKULL.getItem(); case PLAYER: break; default: @@ -83,7 +85,9 @@ public class DropHead extends EffectExecutor { SkullMeta skullMeta = (SkullMeta) out.getItemMeta(); - skullMeta.setOwner(entity instanceof Player ? entity.getName() : skin); + if (skin != null && CompatibleMaterial.getMaterial(out) == CompatibleMaterial.PLAYER_HEAD + || entity instanceof Player) + skullMeta.setOwner(entity instanceof Player ? entity.getName() : skin); out.setItemMeta(skullMeta); return Optional.of(out); From 9ad17c3c48321b77dcb81d65382f2360d78b30ea Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 2 May 2020 05:02:29 -0400 Subject: [PATCH 3/3] version 1.1.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 365dd3f..c65dfef 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ com.songoda EpicEnchants 4.0.0 - 1.1.4 + 1.1.5 clean install EpicEnchants-${project.version}