mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Added option to not drop xp in InfernalTouch
This commit is contained in:
parent
1c00b6b109
commit
ebbf40d9a2
@ -4,6 +4,7 @@ import com.willfp.eco.util.drops.DropQueue;
|
||||
import com.willfp.eco.util.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.util.tuplets.Pair;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -65,6 +66,7 @@ public class InfernalTouch extends EcoEnchant {
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void infernalTouchBreak(@NotNull final BlockDropItemEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
@ -116,6 +118,10 @@ public class InfernalTouch extends EcoEnchant {
|
||||
|
||||
event.getItems().clear();
|
||||
|
||||
if (!this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "drop-xp")) {
|
||||
experience = 0;
|
||||
}
|
||||
|
||||
new DropQueue(player)
|
||||
.setLocation(block.getLocation())
|
||||
.addItems(drops)
|
||||
|
@ -22,4 +22,4 @@ general-config:
|
||||
- stone_switcher
|
||||
|
||||
config:
|
||||
# No config is available for this enchantment
|
||||
drop-xp: true # If experience should be given
|
Loading…
Reference in New Issue
Block a user