Skip to content

Commit

Permalink
Add more debugging to attack cooldown module
Browse files Browse the repository at this point in the history
  • Loading branch information
kernitus committed Mar 16, 2024
1 parent a196e6e commit dab1e02
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package kernitus.plugin.OldCombatMechanics.module;

import kernitus.plugin.OldCombatMechanics.OCMMain;
import kernitus.plugin.OldCombatMechanics.utilities.storage.PlayerStorage;
import org.bukkit.Bukkit;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
Expand Down Expand Up @@ -77,6 +78,9 @@ public void setAttackSpeed(Player player, double attackSpeed) {

final double baseValue = attribute.getBaseValue();

final String modesetName = PlayerStorage.getPlayerData(player.getUniqueId()).getModesetForWorld(player.getWorld().getUID());
debug(String.format("Setting attack speed to %.2f (was: %.2f) for %s in mode %s", attackSpeed, baseValue, player.getName(), modesetName));

if (baseValue != attackSpeed) {
debug(String.format("Setting attack speed to %.2f (was: %.2f)", attackSpeed, baseValue), player);

Expand Down

0 comments on commit dab1e02

Please sign in to comment.