Added autoclose when minecraft is loaded