mirror of
https://github.com/songoda/EpicEnchants.git
synced 2024-09-27 23:27:42 +02:00
Merge branch 'development'
This commit is contained in:
commit
94c2b984b9
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicEnchants</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.1.4</version>
|
||||
<version>1.1.5</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicEnchants-${project.version}</finalName>
|
||||
|
@ -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<ItemStack> 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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user