ModPE Script: get currently selected slot ID, fix level listener dereferencing a null pointer