mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Added option to spells to not activate while sneaking
This commit is contained in:
parent
cc922e08ad
commit
7af645dae8
@ -242,6 +242,12 @@ public abstract class Spell extends EcoEnchant {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "not-while-sneaking")) {
|
||||
if (player.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (cooldown > 0) {
|
||||
String message = this.getPlugin().getLangYml().getMessage("on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
|
||||
player.sendMessage(message);
|
||||
|
@ -24,4 +24,5 @@ config:
|
||||
activation-sound: ENTITY_FIREWORK_ROCKET_LARGE_BLAST
|
||||
cooldown: 90 # In seconds
|
||||
power: 25 # Level of levitation to give
|
||||
ticks-per-level: 6
|
||||
ticks-per-level: 6
|
||||
not-while-sneaking: false
|
@ -23,4 +23,5 @@ general-config:
|
||||
config:
|
||||
activation-sound: ENTITY_FIREWORK_ROCKET_LAUNCH
|
||||
cooldown: 40 # In seconds
|
||||
velocity-per-level: 1.5
|
||||
velocity-per-level: 1.5
|
||||
not-while-sneaking: false
|
@ -27,4 +27,5 @@ config:
|
||||
blacklisted-blocks:
|
||||
- bedrock
|
||||
base-bonus: 2 # Base extra blocks on all sides to break (1 = 3x3x3, 2 = 5x5x5, 3 = 7x7x7)
|
||||
per-level-bonus: 1 # Extra blocks on all sides per level
|
||||
per-level-bonus: 1 # Extra blocks on all sides per level
|
||||
not-while-sneaking: true
|
@ -25,4 +25,5 @@ config:
|
||||
activation-sound: ENTITY_WITHER_SHOOT
|
||||
cooldown: 40 # In seconds
|
||||
velocity: 3
|
||||
damage-per-level: 8
|
||||
damage-per-level: 8
|
||||
not-while-sneaking: false
|
@ -24,4 +24,5 @@ config:
|
||||
activation-sound: ENTITY_ENDER_DRAGON_GROWL
|
||||
cooldown: 40 # In seconds
|
||||
damage-per-level: 3
|
||||
radius-per-level: 2
|
||||
radius-per-level: 2
|
||||
not-while-sneaking: false
|
@ -25,4 +25,5 @@ general-config:
|
||||
|
||||
config:
|
||||
activation-sound: ENTITY_PLAYER_LEVELUP
|
||||
cooldown: 450 # In seconds
|
||||
cooldown: 450 # In seconds
|
||||
not-while-sneaking: false
|
Loading…
Reference in New Issue
Block a user