Core/Commands: Restored old functionality of getSelectedPlayer in chat commands

Also fixed build