mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-29 16:15:17 +01:00
Fixed spells never being able to activate
This commit is contained in:
parent
2ccb1efd73
commit
46542a5ce5
@ -116,10 +116,6 @@ public abstract class Spell extends EcoEnchant {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tracker.containsKey(player.getUniqueId())) {
|
|
||||||
tracker.put(player.getUniqueId(), System.currentTimeMillis() + (long) ((this.getCooldownTime() * 1000L) * Spell.getCooldownMultiplier(player)));
|
|
||||||
}
|
|
||||||
|
|
||||||
int cooldown = getCooldown(this, player);
|
int cooldown = getCooldown(this, player);
|
||||||
|
|
||||||
if (event.getClickedBlock() != null) {
|
if (event.getClickedBlock() != null) {
|
||||||
@ -140,6 +136,7 @@ public abstract class Spell extends EcoEnchant {
|
|||||||
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_BASS, 1, 0.5f);
|
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_BASS, 1, 0.5f);
|
||||||
} else {
|
} else {
|
||||||
tracker.remove(player.getUniqueId());
|
tracker.remove(player.getUniqueId());
|
||||||
|
tracker.put(player.getUniqueId(), System.currentTimeMillis() + (long) ((this.getCooldownTime() * 1000L) * Spell.getCooldownMultiplier(player)));
|
||||||
|
|
||||||
SpellActivateEvent spellActivateEvent = new SpellActivateEvent(player, this);
|
SpellActivateEvent spellActivateEvent = new SpellActivateEvent(player, this);
|
||||||
Bukkit.getPluginManager().callEvent(spellActivateEvent);
|
Bukkit.getPluginManager().callEvent(spellActivateEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user