RanksGuiCommand.java

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
Location : onCommand
Killed by : sh.okx.rankup.ranksgui.RanksGuiTest.[engine:junit-jupiter]/[class:sh.okx.rankup.ranksgui.RanksGuiTest]/[method:testRowsWithGroup()]
negated conditional → KILLED

19

1.1
Location : onCommand
Killed by : none
replaced boolean return with true for sh/okx/rankup/ranksgui/RanksGuiCommand::onCommand → NO_COVERAGE

23

1.1
Location : onCommand
Killed by : sh.okx.rankup.ranksgui.RanksGuiTest.[engine:junit-jupiter]/[class:sh.okx.rankup.ranksgui.RanksGuiTest]/[method:testRowsWithGroup()]
removed call to sh/okx/rankup/ranksgui/RanksGuiListener::open → KILLED

24

1.1
Location : onCommand
Killed by : none
replaced boolean return with false for sh/okx/rankup/ranksgui/RanksGuiCommand::onCommand → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.7.0