mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-25 06:01:40 +01:00
commit
3eaf7e682d
@ -223,6 +223,7 @@ import com.willfp.ecoenchants.enchantments.ecoenchants.special.Pentashot;
|
|||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Preservation;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Preservation;
|
||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Prosperity;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Prosperity;
|
||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Razor;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Razor;
|
||||||
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Reaper;
|
||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Repairing;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Repairing;
|
||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Soulbound;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Soulbound;
|
||||||
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Spring;
|
import com.willfp.ecoenchants.enchantments.ecoenchants.special.Spring;
|
||||||
@ -486,6 +487,7 @@ public class EcoEnchants {
|
|||||||
public static final EcoEnchant ANGER_ARTIFACT = new AngerArtifact();
|
public static final EcoEnchant ANGER_ARTIFACT = new AngerArtifact();
|
||||||
public static final EcoEnchant NAUTILUS_ARTIFACT = new NautilusArtifact();
|
public static final EcoEnchant NAUTILUS_ARTIFACT = new NautilusArtifact();
|
||||||
public static final EcoEnchant SWEEP_ARTIFACT = new SweepArtifact();
|
public static final EcoEnchant SWEEP_ARTIFACT = new SweepArtifact();
|
||||||
|
public static final EcoEnchant REAPER = new Reaper();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all registered {@link EcoEnchant}s.
|
* Get all registered {@link EcoEnchant}s.
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.willfp.ecoenchants.enchantments.ecoenchants.special;
|
||||||
|
|
||||||
|
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||||
|
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||||
|
|
||||||
|
public class Reaper extends EcoEnchant {
|
||||||
|
public Reaper() {
|
||||||
|
super(
|
||||||
|
"reaper", EnchantmentType.SPECIAL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,10 @@
|
|||||||
package com.willfp.ecoenchants.enchantments.ecoenchants.special;
|
package com.willfp.ecoenchants.enchantments.ecoenchants.special;
|
||||||
|
|
||||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||||
|
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||||
|
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||||
|
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -39,6 +42,17 @@ public class Soulbound extends EcoEnchant {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player.getKiller() instanceof Player) {
|
||||||
|
Player killer = (Player) player.getKiller();
|
||||||
|
if (EnchantChecks.mainhand(killer, EcoEnchants.REAPER)) {
|
||||||
|
if (!(EcoEnchants.REAPER.getDisabledWorlds().contains(killer.getWorld()))) {
|
||||||
|
int points = EnchantChecks.getMainhandLevel(killer, EcoEnchants.REAPER);
|
||||||
|
if (EnchantmentUtils.passedChance(EcoEnchants.REAPER, points)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
for (ItemStack itemStack : player.getInventory().getContents()) {
|
for (ItemStack itemStack : player.getInventory().getContents()) {
|
||||||
if (itemStack == null) {
|
if (itemStack == null) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# Reaper EcoEnchant
|
||||||
|
#
|
||||||
|
|
||||||
|
name: "Reaper"
|
||||||
|
description: Gives you a chance to knock out things with a soulbound.
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
obtaining:
|
||||||
|
table: true
|
||||||
|
villager: false
|
||||||
|
loot: false
|
||||||
|
rarity: veryspecial
|
||||||
|
|
||||||
|
general-config:
|
||||||
|
targets:
|
||||||
|
- hoe
|
||||||
|
grindstoneable: true
|
||||||
|
disabled-in-worlds: []
|
||||||
|
conflicts: []
|
||||||
|
maximum-level: 5
|
||||||
|
|
||||||
|
config:
|
||||||
|
chance-per-level: 2
|
Loading…
Reference in New Issue
Block a user