Create file `pm.js` to directory `packages/keker/commands` with the following code: findPlayerByIdOrNickname = playerName => { let foundPlayer = null; // If playerName is numberic if (playerName == parseInt(playerName)) { // search player by ID foundPlayer = mp.players.at(playerName); } // or search player by nickname if (!foundPlayer) { mp.players.forEach((_player) => { if (_player.name === playerName) { foundPlayer = _player; } });