mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-29 16:15:17 +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) {
|
if (cooldown > 0) {
|
||||||
String message = this.getPlugin().getLangYml().getMessage("on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
|
String message = this.getPlugin().getLangYml().getMessage("on-cooldown").replace("%seconds%", String.valueOf(cooldown)).replace("%name%", EnchantmentCache.getEntry(this).getRawName());
|
||||||
player.sendMessage(message);
|
player.sendMessage(message);
|
||||||
|
@ -25,3 +25,4 @@ config:
|
|||||||
cooldown: 90 # In seconds
|
cooldown: 90 # In seconds
|
||||||
power: 25 # Level of levitation to give
|
power: 25 # Level of levitation to give
|
||||||
ticks-per-level: 6
|
ticks-per-level: 6
|
||||||
|
not-while-sneaking: false
|
@ -24,3 +24,4 @@ config:
|
|||||||
activation-sound: ENTITY_FIREWORK_ROCKET_LAUNCH
|
activation-sound: ENTITY_FIREWORK_ROCKET_LAUNCH
|
||||||
cooldown: 40 # In seconds
|
cooldown: 40 # In seconds
|
||||||
velocity-per-level: 1.5
|
velocity-per-level: 1.5
|
||||||
|
not-while-sneaking: false
|
@ -28,3 +28,4 @@ config:
|
|||||||
- bedrock
|
- bedrock
|
||||||
base-bonus: 2 # Base extra blocks on all sides to break (1 = 3x3x3, 2 = 5x5x5, 3 = 7x7x7)
|
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
|
@ -26,3 +26,4 @@ config:
|
|||||||
cooldown: 40 # In seconds
|
cooldown: 40 # In seconds
|
||||||
velocity: 3
|
velocity: 3
|
||||||
damage-per-level: 8
|
damage-per-level: 8
|
||||||
|
not-while-sneaking: false
|
@ -25,3 +25,4 @@ config:
|
|||||||
cooldown: 40 # In seconds
|
cooldown: 40 # In seconds
|
||||||
damage-per-level: 3
|
damage-per-level: 3
|
||||||
radius-per-level: 2
|
radius-per-level: 2
|
||||||
|
not-while-sneaking: false
|
@ -26,3 +26,4 @@ general-config:
|
|||||||
config:
|
config:
|
||||||
activation-sound: ENTITY_PLAYER_LEVELUP
|
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