MouseListener won't call attack method if player is moving