refactor: fix some ide warnings

This commit is contained in:
ChomeNS
2025-04-15 11:23:34 +07:00
parent fcc816d0c9
commit c6e8585246
3 changed files with 3 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ public class FilterCommand extends Command {
if (
PlayerFilterPlugin.localList.stream()
.map(filteredPlayer -> filteredPlayer.playerName())
.map(FilteredPlayer::playerName)
.toList()
.contains(player)
) {

View File

@@ -67,10 +67,8 @@ public class FindAltsCommand extends Command {
if (future == null) return null;
final String tempFinalPlayer = player;
future.thenApply(targetIP -> {
context.sendOutput(handle(bot, targetIP, false, tempFinalPlayer, allServer));
context.sendOutput(handle(bot, targetIP, false, player, allServer));
return targetIP;
});

View File

@@ -86,7 +86,7 @@ public class IPFilterCommand extends Command {
case "clear" -> {
context.checkOverloadArgs(1);
DatabasePlugin.EXECUTOR_SERVICE.submit(() -> bot.ipFilter.clear());
DatabasePlugin.EXECUTOR_SERVICE.submit(bot.ipFilter::clear);
return Component.text("Cleared the filter").color(bot.colorPalette.defaultColor);
}
case "list" -> {