Added magnetic disable-while-sneaking

This commit is contained in:
Auxilor 2021-08-25 18:13:36 +01:00
parent 94b07b3d18
commit af8db80813
2 changed files with 7 additions and 3 deletions

View File

@ -65,8 +65,11 @@ public class Magnetic extends EcoEnchant implements TimedRunnable {
if (this.getDisabledWorlds().contains(player.getWorld())) {
return;
}
if(player.isSneaking()) {
return;
if (this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "disable-while-sneaking")) {
if (player.isSneaking()) {
return;
}
}
for (Entity e : player.getWorld().getNearbyEntities(player.getLocation(), distance, 2.0d, distance)) {

View File

@ -24,4 +24,5 @@ general-config:
config:
initial-distance: 2.5 # Initial item pickup range
bonus-per-level: 0.6 # Bonus range per level (Level 1 also includes bonus)
repeat-ticks: 3 # Check magnetic every few ticks. Lower values give smoother animations and feels better to the end user, however may cause lag on lower-end hardware.
repeat-ticks: 3 # Check magnetic every few ticks. Lower values give smoother animations and feels better to the end user, however may cause lag on lower-end hardware.
disable-while-sneaking: true