| 1 | package sh.okx.rankup.requirements.requirement.towny; | |
| 2 | ||
| 3 | import org.bukkit.entity.Player; | |
| 4 | import sh.okx.rankup.RankupPlugin; | |
| 5 | import sh.okx.rankup.requirements.Requirement; | |
| 6 | ||
| 7 | public class TownyResidentRequirement extends Requirement { | |
| 8 | public TownyResidentRequirement(RankupPlugin plugin) { | |
| 9 | super(plugin, "towny-resident"); | |
| 10 | } | |
| 11 | ||
| 12 | protected TownyResidentRequirement(Requirement clone) { | |
| 13 | super(clone); | |
| 14 | } | |
| 15 | ||
| 16 | @Override | |
| 17 | public boolean check(Player player) { | |
| 18 |
2
1. check : negated conditional → NO_COVERAGE 2. check : replaced boolean return with true for sh/okx/rankup/requirements/requirement/towny/TownyResidentRequirement::check → NO_COVERAGE |
return TownyUtils.getInstance().isResident(player) == getValueBoolean(); |
| 19 | } | |
| 20 | ||
| 21 | @Override | |
| 22 | public Requirement clone() { | |
| 23 |
1
1. clone : replaced return value with null for sh/okx/rankup/requirements/requirement/towny/TownyResidentRequirement::clone → NO_COVERAGE |
return new TownyResidentRequirement(this); |
| 24 | } | |
| 25 | } | |
Mutations | ||
| 18 |
1.1 2.2 |
|
| 23 |
1.1 |