mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Updated block breaking
This commit is contained in:
parent
dc66408d3d
commit
cd91978a63
@ -2,7 +2,6 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.core.integrations.anticheat.AnticheatManager;
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.util.BlockUtils;
|
||||
import com.willfp.eco.util.VectorUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
@ -64,7 +63,7 @@ public class Drill extends EcoEnchant {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockUtils.breakBlock(player, block1);
|
||||
player.breakBlock(block1);
|
||||
block1.removeMetadata("block-ignore", this.getPlugin());
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.spell;
|
||||
|
||||
import com.willfp.eco.core.integrations.anticheat.AnticheatManager;
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.util.BlockUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Spell;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -72,11 +72,7 @@ public class Dynamite extends Spell {
|
||||
}
|
||||
}
|
||||
|
||||
toBreak.forEach((block1 -> {
|
||||
block1.setMetadata("block-ignore", this.getPlugin().getMetadataValueFactory().create(true));
|
||||
BlockUtils.breakBlock(player, block1);
|
||||
block1.removeMetadata("block-ignore", this.getPlugin());
|
||||
}));
|
||||
EnchantmentUtils.rehandleBreaking(player, toBreak, this.getPlugin());
|
||||
|
||||
AnticheatManager.unexemptPlayer(player);
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.willfp.ecoenchants.enchantments.util;
|
||||
import com.willfp.eco.core.EcoPlugin;
|
||||
import com.willfp.eco.core.integrations.placeholder.PlaceholderManager;
|
||||
import com.willfp.eco.core.placeholder.PlayerPlaceholder;
|
||||
import com.willfp.eco.util.BlockUtils;
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.eco.util.StringUtils;
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
@ -185,7 +184,7 @@ public class EnchantmentUtils {
|
||||
@NotNull final EcoPlugin plugin) {
|
||||
for (Block block : toBreak) {
|
||||
block.setMetadata("block-ignore", plugin.getMetadataValueFactory().create(true));
|
||||
BlockUtils.breakBlock(player, block);
|
||||
player.breakBlock(block);
|
||||
block.removeMetadata("block-ignore", plugin);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user