| 1 | package sh.okx.rankup.ranks; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | import lombok.AccessLevel; | |
| 5 | import lombok.EqualsAndHashCode; | |
| 6 | import lombok.Getter; | |
| 7 | import lombok.RequiredArgsConstructor; | |
| 8 | import org.bukkit.Bukkit; | |
| 9 | import org.bukkit.configuration.ConfigurationSection; | |
| 10 | import org.bukkit.entity.Player; | |
| 11 | import sh.okx.rankup.RankupPlugin; | |
| 12 | import sh.okx.rankup.ranks.requirements.RankRequirements; | |
| 13 | import sh.okx.rankup.requirements.Requirement; | |
| 14 | ||
| 15 |
59
1. canEqual : replaced boolean return with false for sh/okx/rankup/ranks/Rank::canEqual → SURVIVED 2. canEqual : replaced boolean return with true for sh/okx/rankup/ranks/Rank::canEqual → SURVIVED 3. equals : negated conditional → SURVIVED 4. equals : negated conditional → SURVIVED 5. equals : negated conditional → SURVIVED 6. equals : negated conditional → NO_COVERAGE 7. equals : negated conditional → SURVIVED 8. equals : negated conditional → NO_COVERAGE 9. equals : negated conditional → NO_COVERAGE 10. equals : negated conditional → NO_COVERAGE 11. equals : negated conditional → NO_COVERAGE 12. equals : negated conditional → NO_COVERAGE 13. equals : negated conditional → NO_COVERAGE 14. equals : negated conditional → NO_COVERAGE 15. equals : negated conditional → NO_COVERAGE 16. equals : negated conditional → NO_COVERAGE 17. equals : negated conditional → NO_COVERAGE 18. equals : negated conditional → NO_COVERAGE 19. equals : negated conditional → NO_COVERAGE 20. equals : negated conditional → NO_COVERAGE 21. equals : negated conditional → NO_COVERAGE 22. equals : negated conditional → NO_COVERAGE 23. equals : negated conditional → NO_COVERAGE 24. equals : negated conditional → NO_COVERAGE 25. equals : negated conditional → NO_COVERAGE 26. equals : replaced boolean return with false for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 27. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 28. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 29. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 30. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 31. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 32. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 33. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 34. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → NO_COVERAGE 35. hashCode : Replaced integer multiplication with division → NO_COVERAGE 36. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 37. hashCode : Replaced integer multiplication with division → NO_COVERAGE 38. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 39. hashCode : Replaced integer multiplication with division → NO_COVERAGE 40. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 41. hashCode : Replaced integer multiplication with division → NO_COVERAGE 42. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 43. hashCode : Replaced integer multiplication with division → NO_COVERAGE 44. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 45. hashCode : Replaced integer multiplication with division → NO_COVERAGE 46. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 47. hashCode : Replaced integer multiplication with division → NO_COVERAGE 48. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 49. hashCode : negated conditional → NO_COVERAGE 50. hashCode : negated conditional → NO_COVERAGE 51. hashCode : negated conditional → NO_COVERAGE 52. hashCode : negated conditional → NO_COVERAGE 53. hashCode : negated conditional → NO_COVERAGE 54. hashCode : negated conditional → NO_COVERAGE 55. hashCode : negated conditional → NO_COVERAGE 56. hashCode : replaced int return with 0 for sh/okx/rankup/ranks/Rank::hashCode → NO_COVERAGE 57. equals : negated conditional → KILLED 58. equals : replaced boolean return with false for sh/okx/rankup/ranks/Rank::equals → KILLED 59. equals : replaced boolean return with true for sh/okx/rankup/ranks/Rank::equals → KILLED |
@EqualsAndHashCode |
| 16 | @RequiredArgsConstructor(access = AccessLevel.PROTECTED) | |
| 17 | public class Rank { | |
| 18 |
1
1. getSection : replaced return value with null for sh/okx/rankup/ranks/Rank::getSection → KILLED |
@Getter |
| 19 | protected final ConfigurationSection section; | |
| 20 | protected final RankupPlugin plugin; | |
| 21 |
1
1. getNext : replaced return value with "" for sh/okx/rankup/ranks/Rank::getNext → KILLED |
@Getter |
| 22 | protected final String next; | |
| 23 |
1
1. getRank : replaced return value with "" for sh/okx/rankup/ranks/Rank::getRank → KILLED |
@Getter |
| 24 | protected final String rank; | |
| 25 |
1
1. getDisplayName : replaced return value with "" for sh/okx/rankup/ranks/Rank::getDisplayName → KILLED |
@Getter |
| 26 | protected final String displayName; | |
| 27 |
1
1. getRequirements : replaced return value with null for sh/okx/rankup/ranks/Rank::getRequirements → KILLED |
@Getter |
| 28 | protected final RankRequirements requirements; | |
| 29 |
1
1. getCommands : replaced return value with Collections.emptyList for sh/okx/rankup/ranks/Rank::getCommands → NO_COVERAGE |
@Getter |
| 30 | protected final List<String> commands; | |
| 31 | ||
| 32 | public boolean isIn(Player player) { | |
| 33 |
2
1. isIn : replaced boolean return with false for sh/okx/rankup/ranks/Rank::isIn → KILLED 2. isIn : replaced boolean return with true for sh/okx/rankup/ranks/Rank::isIn → KILLED |
return plugin.getPermissions().inGroup(player.getUniqueId(), rank); |
| 34 | } | |
| 35 | ||
| 36 | public boolean hasRequirements(Player player) { | |
| 37 |
2
1. hasRequirements : replaced boolean return with false for sh/okx/rankup/ranks/Rank::hasRequirements → KILLED 2. hasRequirements : replaced boolean return with true for sh/okx/rankup/ranks/Rank::hasRequirements → KILLED |
return requirements.hasRequirements(player); |
| 38 | } | |
| 39 | ||
| 40 | public Requirement getRequirement(Player player, String name) { | |
| 41 |
1
1. getRequirement : replaced return value with null for sh/okx/rankup/ranks/Rank::getRequirement → KILLED |
return requirements.getRequirement(player, name); |
| 42 | } | |
| 43 | ||
| 44 | public void applyRequirements(Player player) { | |
| 45 |
1
1. applyRequirements : removed call to sh/okx/rankup/ranks/requirements/RankRequirements::applyRequirements → KILLED |
requirements.applyRequirements(player); |
| 46 | } | |
| 47 | ||
| 48 | public void runCommands(Player player, Rank next) { | |
| 49 | for (String command : commands) { | |
| 50 | String string = plugin.newMessageBuilder(command).replacePlayer(player).replaceOldRank(this).replaceRank(next).toString(player); | |
| 51 | Bukkit.dispatchCommand(Bukkit.getConsoleSender(), string); | |
| 52 | } | |
| 53 | } | |
| 54 | ||
| 55 | @Override | |
| 56 | public String toString() { | |
| 57 |
1
1. toString : replaced return value with "" for sh/okx/rankup/ranks/Rank::toString → NO_COVERAGE |
return "Rank{" + |
| 58 | "next='" + next + '\'' + | |
| 59 | ", rank='" + rank + '\'' + | |
| 60 | ", commands=" + commands + | |
| 61 | '}'; | |
| 62 | } | |
| 63 | } | |
Mutations | ||
| 15 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11 12.12 13.13 14.14 15.15 16.16 17.17 18.18 19.19 20.20 21.21 22.22 23.23 24.24 25.25 26.26 27.27 28.28 29.29 30.30 31.31 32.32 33.33 34.34 35.35 36.36 37.37 38.38 39.39 40.40 41.41 42.42 43.43 44.44 45.45 46.46 47.47 48.48 49.49 50.50 51.51 52.52 53.53 54.54 55.55 56.56 57.57 58.58 59.59 |
|
| 18 |
1.1 |
|
| 21 |
1.1 |
|
| 23 |
1.1 |
|
| 25 |
1.1 |
|
| 27 |
1.1 |
|
| 29 |
1.1 |
|
| 33 |
1.1 2.2 |
|
| 37 |
1.1 2.2 |
|
| 41 |
1.1 |
|
| 45 |
1.1 |
|
| 57 |
1.1 |