9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-27 10:59:23 +00:00

Added EconomyHandler#isEnabled checks

This commit is contained in:
Auxilor
2021-10-04 10:50:18 +01:00
parent 0af4113c38
commit d1ccd06d73
2 changed files with 6 additions and 2 deletions

View File

@@ -14,6 +14,8 @@ class EffectRewardBlockBreak : Effect("reward_kill") {
event: BlockBreakEvent,
config: JSONConfig
) {
EconomyHandler.getInstance().depositPlayer(player, config.getDouble("amount"))
if (EconomyHandler.isEnabled()) {
EconomyHandler.getInstance().depositPlayer(player, config.getDouble("amount"))
}
}
}

View File

@@ -14,6 +14,8 @@ class EffectRewardKill : Effect("reward_kill") {
event: EntityDeathByEntityEvent,
config: JSONConfig
) {
EconomyHandler.getInstance().depositPlayer(killer, config.getDouble("amount"))
if (EconomyHandler.isEnabled()) {
EconomyHandler.getInstance().depositPlayer(killer, config.getDouble("amount"))
}
}
}