1 | package sh.okx.rankup.ranksgui; | |
2 | ||
3 | import lombok.RequiredArgsConstructor; | |
4 | import org.bukkit.command.Command; | |
5 | import org.bukkit.command.CommandExecutor; | |
6 | import org.bukkit.command.CommandSender; | |
7 | import org.bukkit.entity.Player; | |
8 | import org.jetbrains.annotations.NotNull; | |
9 | import sh.okx.rankup.RankupPlugin; | |
10 | ||
11 | @RequiredArgsConstructor | |
12 | public class RanksGuiCommand implements CommandExecutor { | |
13 | private final RankupPlugin plugin; | |
14 | private final RanksGuiListener listener; | |
15 | ||
16 | @Override | |
17 | public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { | |
18 |
1
1. onCommand : negated conditional → KILLED |
if (!(sender instanceof Player)) { |
19 |
1
1. onCommand : replaced boolean return with true for sh/okx/rankup/ranksgui/RanksGuiCommand::onCommand → NO_COVERAGE |
return false; |
20 | } | |
21 | Player player = (Player) sender; | |
22 | ||
23 |
1
1. onCommand : removed call to sh/okx/rankup/ranksgui/RanksGuiListener::open → KILLED |
listener.open(new RanksGui(plugin, player)); |
24 |
1
1. onCommand : replaced boolean return with false for sh/okx/rankup/ranksgui/RanksGuiCommand::onCommand → SURVIVED |
return true; |
25 | } | |
26 | } | |
Mutations | ||
18 |
1.1 |
|
19 |
1.1 |
|
23 |
1.1 |
|
24 |
1.1 |