Merge branch 'development'

This commit is contained in:
Brianna 2020-06-07 20:12:09 -05:00
commit 94c2b984b9
3 changed files with 10 additions and 48 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>EpicEnchants</artifactId> <artifactId>EpicEnchants</artifactId>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>1.1.4</version> <version>1.1.5</version>
<build> <build>
<defaultGoal>clean install</defaultGoal> <defaultGoal>clean install</defaultGoal>
<finalName>EpicEnchants-${project.version}</finalName> <finalName>EpicEnchants-${project.version}</finalName>

View File

@ -3,7 +3,6 @@ package com.songoda.epicenchants.effect.effects;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.effect.EffectExecutor;
import com.songoda.epicenchants.enums.EventType; import com.songoda.epicenchants.enums.EventType;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
@ -26,7 +25,7 @@ public class DropHead extends EffectExecutor {
private Optional<ItemStack> getHead(Entity entity) { private Optional<ItemStack> getHead(Entity entity) {
ItemStack out = CompatibleMaterial.PLAYER_HEAD.getItem(); ItemStack out = CompatibleMaterial.PLAYER_HEAD.getItem();
String skin = ""; String skin = null;
switch (entity.getType()) { switch (entity.getType()) {
case CHICKEN: case CHICKEN:
@ -75,6 +74,9 @@ public class DropHead extends EffectExecutor {
break; break;
case IRON_GOLEM: case IRON_GOLEM:
skin = "MHF_Golem"; skin = "MHF_Golem";
break;
case WITHER_SKELETON:
out = CompatibleMaterial.WITHER_SKELETON_SKULL.getItem();
case PLAYER: case PLAYER:
break; break;
default: default:
@ -83,6 +85,8 @@ public class DropHead extends EffectExecutor {
SkullMeta skullMeta = (SkullMeta) out.getItemMeta(); SkullMeta skullMeta = (SkullMeta) out.getItemMeta();
if (skin != null && CompatibleMaterial.getMaterial(out) == CompatibleMaterial.PLAYER_HEAD
|| entity instanceof Player)
skullMeta.setOwner(entity instanceof Player ? entity.getName() : skin); skullMeta.setOwner(entity instanceof Player ? entity.getName() : skin);
out.setItemMeta(skullMeta); out.setItemMeta(skullMeta);

View File

@ -1,4 +1,4 @@
#Who made this? #Who made this?
Author: Auora Author: Auora
@ -6,14 +6,10 @@ Author: Auora
identifier: Divergent identifier: Divergent
 
# The max level for this enchant. # The max level for this enchant.
max-level: 4 max-level: 4
 
# The group of this enchant. Configure the groups in the groups.yml file. # The group of this enchant. Configure the groups in the groups.yml file.
group: LEGENDARY group: LEGENDARY
@ -22,64 +18,34 @@ group: LEGENDARY
book-item: book-item:
    material: BOOK
  material: BOOKa
 
  display-name: "&c&lDivergent {level}"   display-name: "&c&lDivergent {level}"
 
  # The lore on the enchantments books.   # The lore on the enchantments books.
   
  lore:   lore:
 
    - "&7Drag on to enchant"     - "&7Drag on to enchant"
 
    - "&a{success_rate}% Success Rate"     - "&a{success_rate}% Success Rate"
 
    - "&c{destroy_rate}% Destroy Rate"     - "&c{destroy_rate}% Destroy Rate"
 
 
 
# How the enchant should be formatted on the enchanted item. # How the enchant should be formatted on the enchanted item.
 
applied-format: "&cDivergent {level}" applied-format: "&cDivergent {level}"
 
# Description # Description
description: description:
  - "A chance of giving your opponent slowness and you speed!"   - "A chance of giving your opponent slowness and you speed!"
 
# What items this enchant can be applied to. # What items this enchant can be applied to.
item-whitelist: item-whitelist:
  - "ARMOR"   - "ARMOR"
 
# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials
effects: effects:
@ -98,12 +64,8 @@ effects:
    potion-type: SLOWNESS     potion-type: SLOWNESS
 
    amplifier: "{level}"     amplifier: "{level}"
 
    duration: "{level} * 3"     duration: "{level} * 3"
    # Chance of the effect firing.     # Chance of the effect firing.
@ -124,12 +86,8 @@ effects:
    potion-type: SPEED     potion-type: SPEED
 
    amplifier: "{level}"     amplifier: "{level}"
 
    duration: "{level} * 3"     duration: "{level} * 3"
    # Chance of the effect firing.     # Chance of the effect firing.