package com.gmail.nossr50.util.compat.layers.attackcooldown;

import com.gmail.nossr50.util.nms.NMSVersion;
import org.bukkit.entity.Player;

import java.lang.reflect.InvocationTargetException;

public class DummyPlayerAttackCooldownExploitPreventionLayer extends PlayerAttackCooldownExploitPreventionLayer {
    public DummyPlayerAttackCooldownExploitPreventionLayer() {
        super(NMSVersion.UNSUPPORTED);
    }

    @Override
    public boolean initializeLayer() {
        return noErrorsOnInitialize;
    }

    @Override
    public float getAttackStrength(Player player) throws InvocationTargetException, IllegalAccessException {
        return 1.0F; //Always full strength
    }

    @Override
    public float getCooldownValue(Player player) throws InvocationTargetException, IllegalAccessException {
        return 0F;
    }

    @Override
    public void resetAttackStrength(Player player) throws InvocationTargetException, IllegalAccessException {
        //Do nothing
    }
}
