mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-17 04:41:21 +01:00
Added magnetic disable-while-sneaking
This commit is contained in:
parent
94b07b3d18
commit
af8db80813
@ -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)) {
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user