refactor: make queries less spammy in console like bukkit.lastKnownName and seen <uuid>

fix: `*mail sendselecteditem` and `*music playitem` invalid/doesn't exist/empty check not working
This commit is contained in:
ChomeNS
2025-04-05 17:52:08 +07:00
parent ac44bedf8c
commit 65cc3971af
6 changed files with 124 additions and 55 deletions

View File

@@ -99,7 +99,7 @@ public class PlayersPlugin extends Bot.Listener implements TickPlugin.Listener {
return;
}
final CompletableFuture<Component> trackedCoreFuture = bot.core.runTracked("essentials:seen " + target.profile.getIdAsString());
final CompletableFuture<Component> trackedCoreFuture = bot.core.runTracked(true, "essentials:seen " + target.profile.getIdAsString());
if (trackedCoreFuture == null) {
outputFuture.complete(null);
@@ -251,7 +251,7 @@ public class PlayersPlugin extends Bot.Listener implements TickPlugin.Listener {
}
private CompletableFuture<String> getLastKnownName (String uuid) {
return bot.query.entity(uuid, "bukkit.lastKnownName");
return bot.query.entity(true, uuid, "bukkit.lastKnownName");
}
private void check (PlayerEntry target) {