VotingPluginPointsDeductibleRequirement.java

1
package sh.okx.rankup.requirements.requirement.votingplugin;
2
3
import com.bencodez.votingplugin.user.UserManager;
4
import com.bencodez.votingplugin.user.VotingPluginUser;
5
import org.bukkit.entity.Player;
6
import sh.okx.rankup.RankupPlugin;
7
import sh.okx.rankup.requirements.DeductibleRequirement;
8
import sh.okx.rankup.requirements.Requirement;
9
10
public class VotingPluginPointsDeductibleRequirement extends VotingPluginPointsRequirement implements DeductibleRequirement {
11
12
  public VotingPluginPointsDeductibleRequirement(RankupPlugin plugin, String name) {
13
    super(plugin, name);
14
  }
15
16
  protected VotingPluginPointsDeductibleRequirement(Requirement clone) {
17
    super(clone);
18
  }
19
20
  @Override
21
  public void apply(Player player, double multiplier) {
22
    VotingPluginUser user = UserManager.getInstance().getVotingPluginUser(player);
23 1 1. apply : negated conditional → NO_COVERAGE
    if(!user.removePoints(getValueInt()))  {
24
      plugin.getLogger().warning("Unable to remove VotingPlugin points");
25
    }
26
  }
27
28
  @Override
29
  public Requirement clone() {
30 1 1. clone : replaced return value with null for sh/okx/rankup/requirements/requirement/votingplugin/VotingPluginPointsDeductibleRequirement::clone → NO_COVERAGE
    return new VotingPluginPointsDeductibleRequirement(this);
31
  }
32
}

Mutations

23

1.1
Location : apply
Killed by : none
negated conditional → NO_COVERAGE

30

1.1
Location : clone
Killed by : none
replaced return value with null for sh/okx/rankup/requirements/requirement/votingplugin/VotingPluginPointsDeductibleRequirement::clone → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.7.0