perf: remove redundant collection operation

This commit is contained in:
Breno A. 2024-06-09 09:59:16 -03:00
parent 8f8a6a7bfe
commit 85ca8777c9
2 changed files with 7 additions and 8 deletions

View File

@ -27,7 +27,7 @@ public class PacketPlayerWorldSceneInfoListNotify extends BasePacket {
/* Add scene-specific data */
// Scenetags
if (sceneTags.keySet().contains(scene)) {
if (sceneTags.containsKey(scene)) {
worldInfoBuilder.addAllSceneTagIdList(
sceneTags.entrySet().stream()
.filter(e -> e.getKey().equals(scene))

View File

@ -61,13 +61,12 @@ public interface StartupArguments {
// Aliases.
"-v",
StartupArguments::printVersion));
putAll(
Map.of(
"-debugall",
parameter -> {
StartupArguments.enableDebug("all");
return false;
}));
put(
"-debugall",
parameter -> {
StartupArguments.enableDebug("all");
return false;
});
}
};